[FFmpeg-trac] #1993(avformat:new): Badly interleaved partial AVI file causes audio/video desync

FFmpeg trac at avcodec.org
Thu Dec 6 08:19:04 CET 2012


#1993: Badly interleaved partial AVI file causes audio/video desync
------------------------------------+------------------------------------
             Reporter:  gjdfgh      |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  avi         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by gjdfgh):

 On a file cut to the length of 65932192 bytes:
 {{{
 ffplay ../yet-another\ broken-interleaved-avi.avi -loglevel debug
 ffplay version N-47450-g217b10d Copyright (c) 2003-2012 the FFmpeg
 developers
   built on Dec  5 2012 11:03:58 with gcc 4.7 (Debian 4.7.2-4)
   configuration: --prefix=/tmp/ffmpeg_temp
   libavutil      52. 11.101 / 52. 11.101
   libavcodec     54. 79.100 / 54. 79.100
   libavformat    54. 44.100 / 54. 44.100
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 24.100 /  3. 24.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
 [avi @ 0x90344a0] Format avi probed with size=2048 and score=100
 [avi @ 0x9003100] use odml:1
 st:0 removing common factor 10 from timebase
 st:1 removing common factor 384 from timebase
 [avi @ 0x90344a0] File position before avformat_find_stream_info() is
 10252
 [avi @ 0x90344a0] All info found
 rfps: 29.666667 0.013650
     Last message repeated 1 times
 rfps: 29.750000 0.007180
     Last message repeated 1 times
 rfps: 29.833333 0.002771
     Last message repeated 1 times
 rfps: 29.916667 0.000422
     Last message repeated 1 times
 rfps: 30.000000 0.000134
     Last message repeated 1 times
 rfps: 30.083333 0.001906
     Last message repeated 1 times
 rfps: 30.166667 0.005738
     Last message repeated 1 times
 rfps: 30.250000 0.011631
     Last message repeated 1 times
 rfps: 30.333333 0.019584
     Last message repeated 1 times
 rfps: 59.583333 0.018872
     Last message repeated 1 times
 rfps: 59.666667 0.011084
     Last message repeated 1 times
 rfps: 59.750000 0.005356
     Last message repeated 1 times
 rfps: 59.833333 0.001688
     Last message repeated 1 times
 rfps: 59.916667 0.000081
     Last message repeated 1 times
 rfps: 60.000000 0.000534
     Last message repeated 1 times
 rfps: 29.970030 0.000000
     Last message repeated 1 times
 rfps: 59.940060 0.000000
     Last message repeated 1 times
 [avi @ 0x90344a0] File position after avformat_find_stream_info() is
 303757
 Input #0, avi, from '../yet-another broken-interleaved-avi.avi':
   Duration: 00:23:29.35, start: 0.000000, bitrate: 374 kb/s
     Stream #0:0, 41, 100/2997: Video: mpeg4 (DIVX / 0x58564944), yuv420p,
 640x480, 1/30000, 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc
     Stream #0:1, 40, 3/125: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz,
 stereo, s16p, 128 kb/s
 [mpeg4 @ 0x903c920] detected 2 logical cores
 [mpeg4 @ 0x904c140] looks like this file was encoded with
 (divx4/(old)xvid/opendivx) -> forcing low_delay flag
 Frame changed from size:0x0 to size:640x480  14KB sq=    0B f=0/0
 [buffer @ 0x903c8a0] Setting entry with key 'video_size' to value
 '640x480'
 [buffer @ 0x903c8a0] Setting entry with key 'pix_fmt' to value '0'
 [buffer @ 0x903c8a0] Setting entry with key 'time_base' to value
 '100/2997'
 [buffer @ 0x903c8a0] Setting entry with key 'pixel_aspect' to value '0/1'
 [ffplay_buffer @ 0x9078de0] w:640 h:480 pixfmt:yuv420p tb:100/2997 fr:0/1
 sar:0/1 sws_param:
 [ffplay_crop @ 0x903da40] w:640 h:480 sar:0/1 -> w:640 h:480 sar:0/1
 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred  0B f=0/0
 }}}
 You experience A/V desync and eventually audio underruns after about 50
 seconds. mplayer -demuxer avi has no such problems.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1993#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list