[FFmpeg-devel] [PATCH] Incorrect ASF duration
Henrik Gulbrandsen
henrik
Fri Apr 18 01:05:52 CEST 2008
This is similar to the Ogg problem. The stream duration is not identical
to the PTS of the last packet if the packet duration is non-negligible.
The attached examples show the result of
ffmpeg -i video.mp4 -vcodec wmv2 -f asf video.wmv
ffplay -stats video.wmv > report.txt 2>&1
before and after the patch. As before, video.mp4 is exactly 24 seconds
long, at 10 fps. Notice the "Duration: 00:00:23.90" for stats given with
the current code base!
/Henrik
P.S. I removed the "use duration from AVPacket" comment, since the patch
is in fact using that duration. It looks like this comment has been with
us for a while, and I don't really know what the original intention was.
-------------- next part --------------
FFplay version SVN-r12887, Copyright (c) 2003-2008 Fabrice Bellard, et al.
configuration: --enable-libtheora --enable-libvorbis --disable-encoder=vorbis
libavutil version: 49.6.0
libavcodec version: 51.55.0
libavformat version: 52.13.0
libavdevice version: 52.0.0
built on Apr 18 2008 00:35:53, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Input #0, asf, from 'video.wmv':
Duration: 00:00:23.90, start: 3.100000, bitrate: 69 kb/s
Stream #0.0: Video: wmv2, yuv420p, 320x240, 10.00 tb(r)
-------------- next part --------------
FFplay version SVN-r12887, Copyright (c) 2003-2008 Fabrice Bellard, et al.
configuration: --enable-libtheora --enable-libvorbis --disable-encoder=vorbis
libavutil version: 49.6.0
libavcodec version: 51.55.0
libavformat version: 52.13.0
libavdevice version: 52.0.0
built on Apr 18 2008 00:35:53, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Input #0, asf, from 'video.wmv':
Duration: 00:00:24.00, start: 3.100000, bitrate: 69 kb/s
Stream #0.0: Video: wmv2, yuv420p, 320x240, 10.00 tb(r)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asf_duration.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080418/5d3cf4db/attachment.bin>
More information about the ffmpeg-devel
mailing list