Opened 13 years ago
Closed 12 years ago
#333 closed defect (fixed)
Badly interleaved AVI file not handled
Reported by: | Clément Bœsch | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | avi, interleaved |
Cc: | nfxjfg@googlemail.com | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
The broken file is available at streams.videolan.org/issues/ffmpeg/yet-another-broken-interleaved-avi.avi.
The file seems correctly interleaved, but around 01:08, only video packets seems to be decoded. While MPlayer AVI demuxer is able to handle it ("Badly interleaved AVI file detected - switching to -ni mode..."), FFmpeg AVI demuxer doesn't.
Change History (11)
comment:1 by , 13 years ago
Component: | avformat → undetermined |
---|---|
Reproduced by developer: | set |
Status: | new → open |
Version: | unspecified → git-master |
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
comment:4 by , 12 years ago
Cc: | added |
---|---|
Component: | undetermined → avformat |
Resolution: | fixed |
Status: | closed → reopened |
comment:5 by , 12 years ago
Since it works fine here, could one of you add a command line that allows to reproduce the problem together with complete, uncut console output?
comment:6 by , 12 years ago
ffplay yet-another\ broken-interleaved-avi.avi ffplay version N-47444-gb5ffbcd Copyright (c) 2003-2012 the FFmpeg developers built on Dec 5 2012 09:40:30 with gcc 4.7 (Debian 4.7.2-4) configuration: --prefix=/mnt/meh/chaos/source/normal/mpv/build_libs --enable-static --disable-shared --enable-avresample --enable-openssl --enable-gpl --enable-nonfree --disable-debug --enable-libx264 --enable-vaapi 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 libpostproc 52. 2.100 / 52. 2.100 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: Video: mpeg4 (DIVX / 0x58564944), yuv420p, 640x480, 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s [mpeg4 @ 0x90f0c80] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag Frame changed from size:0x0 to size:640x480 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred 0B f=0/0 52.52 A-V: -4.707 fd= 0 aq= 0KB vq=15364KB sq= 0B f=0/0
That's about 50 seconds in. A-V difference keeps getting worse from this point. The ALSA warnings are merely because ffplay doesn't feed it enough audio, and not a problem with my audio setup. File is linked in the top post.
comment:7 by , 12 years ago
Note the "non-interleaved AVI" line
$ ffplay yet-another-broken-interleaved-avi.avi ffplay version N-47444-gb5ffbcd Copyright (c) 2003-2012 the FFmpeg developers built on Dec 5 2012 10:36:55 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack 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 libpostproc 52. 2.100 / 52. 2.100 [avi @ 0x7f94980008c0] non-interleaved AVI Input #0, avi, from 'yet-another-broken-interleaved-avi.avi': Duration: 00:23:29.35, start: 0.000000, bitrate: 1247 kb/s Stream #0:0: Video: mpeg4 (DIVX / 0x58564944), yuv420p, 640x480, 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s [mpeg4 @ 0x7f949802b500] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag Frame changed from size:0x0 to size:640x480 4KB sq= 0B f=0/0 52.56 A-V: 0.010 fd= 0 aq= 10KB vq= 26KB sq= 0B f=0/0
comment:8 by , 12 years ago
So what's the difference? How to proceed? Just to be sure, I made a clean build of ffmpeg with no additional config option. Output with -loglevel debug:
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
comment:10 by , 12 years ago
My test file was cut short (I probably wanted to save some space...). You can create a test file with:
dd if=yet-another-broken-interleaved-avi.avi of=test.avi bs=1048576 count=200
Note that this is almost the full file. md5sum: 96accaf5878be60f076a50038f85339c
mplayer -demux avi handles this fine (even without -idx, although it requires -idx for seeking), ffplay doesn't.
Shall I create a new ticket for this problem, or can I leave this ticket open?
comment:11 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Please open a new ticket.
Works fine with ffmpeg and mplayer -demuxer avi, fails with ffplay and mplayer -demuxer lavf.