Opened 12 years ago

Last modified 11 years ago

#2384 open defect

ffmpeg detects avi/divx with xsub as broken

Reported by: someuser Owned by:
Priority: minor Component: avformat
Version: git-master Keywords: xsub avi
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

When creating an AVI/DivX with XSub subtitles with FFmpeg the result plays fine on supported players but FFmpeg itself complains that the AVI has been generated by broken software. FFmpeg complains this also about AVIAddXSubs generated AVIs. The inputs are ok according to FFmpeg and this should be trivial to reproduce.

How to reproduce:

> ./ffmpeg -i test.avi
ffmpeg version N-51106-g17c1881 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 19 2013 13:49:37 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 19.101 / 52. 19.101
  libavcodec     55.  1.100 / 55.  1.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 47.104 /  3. 47.104
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, avi, from 'test.avi':
  Metadata:
    encoder         : Lavf54.59.106
  Duration: 00:00:10.03, start: 0.000000, bitrate: 1227 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (DIVX / 0x58564944), yuv420p, 576x324 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 23.98 tbn, 2997 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
At least one output file must be specified
> ./ffmpeg -i test.avi -i test-en.idx -c:a copy -c:v copy -c:s xsub -map 0:0 -map 0:1 -map 1:0 testxsub.avi
ffmpeg version N-51106-g17c1881 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 19 2013 13:49:37 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 19.101 / 52. 19.101
  libavcodec     55.  1.100 / 55.  1.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 47.104 /  3. 47.104
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, avi, from 'test.avi':
  Metadata:
    encoder         : Lavf54.59.106
  Duration: 00:00:10.03, start: 0.000000, bitrate: 1227 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (DIVX / 0x58564944), yuv420p, 576x324 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 23.98 tbn, 2997 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
[vobsub @ 026c9140] Estimating duration from bitrate, this may be inaccurate
Input #1, vobsub, from 'test-en.idx':
  Duration: N/A, bitrate: N/A
    Stream #1:0[0x0](en): Subtitle: dvd_subtitle (default)
Output #0, avi, to 'testxsub.avi':
  Metadata:
    ISFT            : Lavf55.0.100
    Stream #0:0: Video: mpeg4 (DIVX / 0x58564944), yuv420p, 576x324 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, 128 kb/s
    Stream #0:2(en): Subtitle: xsub (DXSB / 0x42535844) (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (dvdsub -> xsub)
Press [q] to stop, [?] for help
frame=  240 fps=0.0 q=-1.0 Lsize=    1511kB time=00:00:10.03 bitrate=1233.7kbits/s
video:1322kB audio:157kB subtitle:3 global headers:0kB muxing overhead 2.000717%
> ./ffmpeg -i testxsub.avi
ffmpeg version N-51106-g17c1881 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 19 2013 13:49:37 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 19.101 / 52. 19.101
  libavcodec     55.  1.100 / 55.  1.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 47.104 /  3. 47.104
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[avi @ 02598420] scale/rate is 0/0 which is invalid. (This file has been generated by broken software.)
[avi @ 02598420] non-interleaved AVI
Input #0, avi, from 'testxsub.avi':
  Metadata:
    encoder         : Lavf55.0.100
  Duration: 00:00:10.03, start: 0.000000, bitrate: 1233 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (DIVX / 0x58564944), yuv420p, 576x324 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 23.98 tbn, 2997 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:2: Subtitle: xsub (DXSB / 0x42535844)
At least one output file must be specified
> 

Change History (3)

comment:1 by someuser, 12 years ago

Example files which can be used to test this are attached in ticket #2385.

comment:2 by someuser, 11 years ago

Component: undeterminedavformat
Keywords: xsub avi added

comment:3 by Carl Eugen Hoyos, 11 years ago

Reproduced by developer: set
Status: newopen
$ ffmpeg -f lavfi -i testsrc=s=pal -ss 132 -i fate-suite/sub/vobsub.idx -scodec xsub -t 6 out.avi
ffmpeg version N-58873-gbc9cee9 Copyright (c) 2000-2013 the FFmpeg developers
  built on Dec  8 2013 17:58:34 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-libass
  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. 92.100 /  3. 92.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, lavfi, from 'testsrc=s=pal':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 720x576 [SAR 1:1 DAR 5:4], 25 tbr, 25 tbn, 25 tbc
fate-suite/sub/vobsub.idx: could not seek to position 132.000
Input #1, vobsub, from 'fate-suite/sub/vobsub.idx':
  Duration: N/A, bitrate: N/A
    Stream #1:0[0x0](en): Subtitle: dvd_subtitle, 720x480 (default)
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.22.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576 [SAR 1:1 DAR 5:4], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0:1(en): Subtitle: xsub (DXSB / 0x42535844), 720x480 (default)
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
  Stream #1:0 -> #0:1 (dvdsub -> xsub)
Press [q] to stop, [?] for help
[xsub @ 0x2bc9a20] Color index 0 is not transparent. Transparency will be messed up.
frame=  150 fps=0.0 q=25.9 Lsize=     459kB time=00:00:06.00 bitrate= 626.2kbits/s
video:444kB audio:0kB subtitle:1 global headers:0kB muxing overhead 3.014589%
$ ffmpeg -i out.avi
ffmpeg version N-58873-gbc9cee9 Copyright (c) 2000-2013 the FFmpeg developers
  built on Dec  8 2013 17:58:34 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-libass
  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. 92.100 /  3. 92.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[avi @ 0x323f100] scale/rate is 0/0 which is invalid. (This file has been generated by broken software.)
Input #0, avi, from 'out.avi':
  Metadata:
    encoder         : Lavf55.22.100
  Duration: 00:00:06.00, start: 0.000000, bitrate: 626 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Subtitle: xsub (DXSB / 0x42535844), 720x480
    Metadata:
      title           : Subtitle - en-xx;02
At least one output file must be specified
Note: See TracTickets for help on using tickets.