[MPlayer-dev-eng] [PATCH] bframes, dwStart: individual patches

Corey Hickey bugfood-ml at fatooh.org
Fri Feb 17 21:18:52 CET 2006


Guillaume POIRIER wrote:
> Hi,
> 
> On 2/17/06, Corey Hickey <bugfood-ml at fatooh.org> wrote:
> 
> [..]
> 
> 
>>01-mplayer-dwStart.diff
>>* demux_avi sets stream_delay according to dwStart
>>* mplayer adjusts audio_delay according to stream_delay
>>
>>02-mencoder-dwStart.diff
>>* -audio-delay option allows a negative argument (video delay)
>>* updated -audio-delay description in man page
>>* changed "AUDIO DELAY" in message to "audio delay"
>>* added "video delay" message
>>* muxer_avi applies stream delay to individual streams as dwStart
>>
>>03-ignore-start.diff
>>* new option -ignore-start
>>* documented -ignore-start in man page
>>* mencoder and mplayer respect ignore_start
>>
>>04-bframes-delay.diff
>>* lavc, xvid, xvid4, and x264 increment encoder_delay on empty frames
>>* mencoder adjusts AV_delay according to all encoder_delays
>>* lavc, xvid, xvid4, and x264 set decoder_delay appropriately
>>* muxer_avi adjusts dwStart according to the decoder_delays
>>
>>
>>These patches have been sitting around in combined form for a while,
>>minus a couple bugfixes, and the only comments are good (thanks to
>>Guillaume for testing). The changes are diverse, though, so I'm not
>>going to apply them all at once; instead, I will commit each patch, in
>>order, no less than 24 hours after the previous one... starting no less
>>than 24 hours from now.
> 
> 
> If you want, I can test the combined form (since it contains some bug
> fixes, it may be interesting to test again), as what really interests
> me is the effect of patch 4.
>
> As far as patches 01-03 are concerned, I don't quite know what to look
> for, and/or I think that my regular use of MPlayer/MEncoder do not
> make me run code paths that your other patches touch.

Here is a set of several tests, if you feel like doing them.



$ mencoder orig.avi -ovc copy -oac copy -o test.avi
$ mplayer test.avi

There should be no change in A-V sync.

$ mencoder orig.avi -ovc copy -oac copy -o test.avi -audio-delay -10
$ mplayer test.avi

The video should be delayed 10 seconds.

$ mplayer test.avi -delay -10

The delays should cancel, making the streams in sync again.

$ mencoder orig.avi -ovc copy -oac copy -o test.avi -audio-delay 10
$ mplayer test.avi

Audio should be delayed 10 seconds. You'll notice mplayer plays the
video quickly at first, to compensate. That's just how mplayer deals
with starting both streams at the same time, and isn't a problem that
comes from my patches. Unless the dwStart is large (like how we're
testing), it isn't a problem at all.

$ mplayer test.avi -delay 10

The delays should cancel, making the streams in sync again.

$ mplayer test.avi -ignore-start

The dwStart should be ignored, leaving the streams in sync.

$ mv test.avi delay10.avi
$ mencoder delay10.avi -ovc copy -oac copy -o test.avi
$ mplayer test.avi

The dwStart should be copied to the new file; audio should still be
delayed 10 seconds.

$ mencoder delay10.avi -ovc copy -oac copy -o test.avi -audio-delay -10
$ mplayer test.avi

The dwStart in delay10.avi should cancel out the requested audio-delay,
leaving the streams in sync.

$ mencoder delay10.avi -ovc copy -oac copy -o test.avi -ignore-start
$ mplayer test.avi

With -ignore-start, the dwStart in delay10.avi should not be copied to
the new file, leaving the streams back in sync.


Thanks,
Corey




More information about the MPlayer-dev-eng mailing list