[mythtv-users] tv: tv: Play in reverse (-1x)
myth at robinhill.me.uk
Thu Apr 12 14:58:09 UTC 2007
On Thu Apr 12, 2007 at 09:09:54AM -0500, David Schmidt wrote:
> With some fancy coding, you *might* get better than one frame per
> second and no audio, but I doubt on current consumer hardware you'll
> get normal frames per second with full audio.
> The problem is, the recordings are stored (usually) as MPEG. MPEG
> encodes like this to save space:
> Full (compressed) image of frame x.
> Differences (only) between frames x and x+1.
> Differences between frames x+1 and x+2.
> Differences between frames x+2 and x+2.
> [you get the idea]
> Full (compressed) image of frame y.
> Differences between frames y and y+1.
> So, in real time, Myth would need to:
> - Read, decompress and display frame y (the easy part)
> - Before time for the next frame (let's presume 1/30th second) and
> decompress frame x, then apply all the differences for x+1, x+2, x+3,
> x+4 ... x+29 to get to the image for x+29 which is also y-1 and
> display the frame. (The likely currently undoable on consumer
> equipment of today part).
> - Before time for the next frame, reverse apply the differences
> between frames x+29 and x+28 and display (the possibly tricky but
> probably doable part).
> That's the technical problem. I'm sure someone will correct me if
> it's doable and just no one's done it yet....
You've missed out the B-frames in your MPEG-2 description - these are
differences from both the next and previous I/P frames (I-frames are the
full image, P-frames are differences only from the previous P/I frame).
Anyway, I'd think it's relatively trivial to implement reverse playback
(whether this fits into Myth's functional layout is another matter) -
you'd just need a large buffer. Simply read in back to the previous
I-frame, calculate all intermediate frames, then start playback (a bit
of a delay on start but I doubt that'd be an issue). You then have X
frames to playback (without any reading/calculating needed), so can read
in and calculate the next chunk while doing this. The computations
should be no different than for the forward playback case, it's just the
amount buffered that differs.
Can't say I can see a lot of use for this though :/
( ' } | Robin Hill <myth at robinhill.me.uk> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20070412/65b55f02/attachment.pgp
More information about the mythtv-users