[Ffmpeg-devel] [PATCH] ODML AVI Duration

Brian Brice bbrice
Tue Aug 22 22:21:23 CEST 2006

If I encoded an AVI that was over 2 GB (or 4m:43s DV), then video
players would read the wrong duration, thus not being able to show the
entire clip.  For example, encoding a DV clip that is about 5 minutes
in duration:

ffmpeg -i INPUT.mpg -f avi -vcodec dvvideo -acodec pcm_s16le -s ntsc
-r ntsc -ar 48000 -pix_fmt yuv411p -t 00:05:00 OUTPUT.avi

Windows Media Player and even ffmpeg would report the duration as 4:43.
This patch is to write the proper lengths in the AVI and stream headers.
If the file contains only 1 RIFF, then all will be the same.  If there
is more than 1 RIFF, then in the write_trailer, it updates the odml's
length along with the headers.

Brian Brice
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avienc.c.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060822/bbca79f7/attachment.txt>

More information about the ffmpeg-devel mailing list