[FFmpeg-trac] #3199(undetermined:new): duration incorrect for mpeg file
FFmpeg
trac at avcodec.org
Thu Dec 5 22:16:55 CET 2013
#3199: duration incorrect for mpeg file
-------------------------------------+-------------------------------------
Reporter: DonMoir | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
The file dolbycity.vob has an audio, video, and data stream. The audio and
video streams have different durations.
The duration computed in ../libavformat/utils.c in
estimate_timings_from_pts seems to take first stream it finds and computes
that stream duration and this is then propagated to the other streams. The
real audio stream duration is 31808 ms. The video stream duration is 32000
ms. Seems estimate_timings_from_pts computes the audio stream duration at
31776 since it lacks the duration of the last packet in it's calculation.
31776 + 32 = 31808. 32 is the duration of the last audio packet in ms.
So estimate_timings_from_pts seems to be overkill and not enough ( at same
time :) to get accurate results.
I think mediainfo is the only program I have that reports the audio
duration at 31808 and video duration at 32000 and overall duration at
32000. But I verified those numbers by walking the packet list. It's
important I get these durations as exact as possible and for this
particular case it is possible but not happening.
http://sms.pangolin.com/temp/dolbycity.vob
ffmpeg -i dolbycity.vob
ffmpeg version N-58733-gf65afef Copyright (c) 2000-2013 the FFmpeg
developers
built on Dec 3 2013 22:04:42 with gcc 4.8.2 (GCC)
configuration: --disable-static --enable-shared
--enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig
--enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetype --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
--enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-
libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-
libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis
--enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs
--enable-
libxvid --enable-zlib
libavutil 52. 56.100 / 52. 56.100
libavcodec 55. 45.100 / 55. 45.100
libavformat 55. 22.100 / 55. 22.100
libavdevice 55. 5.102 / 55. 5.102
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpeg, from 'dolbycity.vob':
Duration: 00:00:31.78, start: 0.049756, bitrate: 5291 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576
[SAR 16:1
5 DAR 4:3], max. 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3199>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list