[MPlayer-dev-eng] dwStart (stream delay in AVI files)

Corey Hickey bugfood-ml at fatooh.org
Tue Jan 31 22:58:35 CET 2006


Here's a draft of some changes I made to support dwStart properly.

-----
Features:

* 'mencoder -audio-delay' can be negative, and, if so, applies dwStart
to the video stream.

* MEncoder will recognize dwStart in the input file and copy it to the
output file instead of skipping/duplicating frames to get in sync.

* MEncoder will compensate audio/video dwStarts in the input file with
-audio-delay and apply only what remains to the output file. This allows
lossless remuxing of files that had originally been encoded with an
incorrect dwStart.

* MPlayer recognizes audio and video dwStarts. If the video has a
dwStart, MPlayer will start the audio first and play smoothly.

* When seeking, MPlayer will adjust for dwStart instantly (unless you
seek to a time position less than dwStart, which is only at the very
beginning).

-----
Deficiencies:

* If the audio has a dwStart, MPlayer will start playing both streams
simultaneously and play the video more quickly until the difference
equals dwStart. This is unnoticeable with reasonable (< 2 seconds)
dwStart values, but looks bad with larger values and can lead to
spurious "your system is too slow" messages.

* The non-avi muxers don't have any code to alter PTS according to
dwStart. I can probably add it, but I wanted to send this patch in for
review in case I'm way off-base.

-Corey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dwStart-fixes1.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060131/01135ab9/attachment.asc>


More information about the MPlayer-dev-eng mailing list