[MEncoder-users] Quick question - advice appreciated
The Wanderer
inverseparadox at comcast.net
Wed Aug 2 11:34:47 CEST 2006
Markus wrote:
> This may be more of an mplayer issue, but mencoder could end up being
> the solution.
>
> I want to watch parts of some movies backwards, with the audio
> intact, hopefully synced, and also backwards. You know, hear the
> voice of the dark overlord, find out where ozzy hid the secret
> decoder ring, that kind of thing.
I've considered this from time to time (inspired, originally, by
remembering some unidentified Windows player being able to do it with
MOV files back in my AOL days), and based on what little I know about
the technical details, I can see only two ways for it to be even
theoretically possible with video (audio seems to require a different
approach).
One: Scan through the entire part which is to be played backwards,
building an index of all the video frames (this is CPU-intensive,
potentially memory-intensive, and would need to be repeated every time
the file was loaded afresh), and then play that index backwards.
Two: Re-mux to a container which provides not only a "location of next
frame" but a "location of previous frame" (this would require doing the
index-building part of One, above, but only as a one-time step).
Unfortunately, as far as I know no such container exists.
(Three: Re-encode the video, backwards. This may be easier to implement
than either of the above, though still not necessarily easy - but it
loses video quality and so forth, which is why I don't ordinarily count
it. It would also probably require a One-type per-frame index for every
block of non-I frames, which would be a little awkward to handle...)
Audio can, I now begin to think (having reconsidered the conclusions I'd
reached last time I thought about it), probably be handled in a similar
way - but requires an additional step: decode each audio frame into some
sufficiently analog format (WAV or similar), 'play' that analog data
backwards, and output - play or encode - the result. (Unless I'm much
more mistaken about the nature of audio frames, and even audio samples,
than I think I am.)
> Is there a way to do this in mplayer, or barring that, could I use
> some mencoder black magic to encode a backwards stream?
Unless I've missed something major over the last few years, I don't know
of any currently existing program which can actually do this. Unless
someone gets inspired by my amazingly vague description above, you're
probably out of luck.
--
The Wanderer
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
Secrecy is the beginning of tyranny.
More information about the MEncoder-users
mailing list