Opened 10 years ago

Closed 10 years ago

#3909 closed defect (fixed)

Regression encoding libxvid to mov

Reported by: Einguste Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: mov libxvid regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:When you use the livxvid codec in MP4, illegal file ready.
How to reproduce:

% ffmpeg -i input -vcodec libxvid output.mp4
ffmpeg version N-65991-g8c63a0d
built on Aug 31 2014 01:26:47 with gcc 4.9.1 (GCC)

Change History (9)

comment:1 by Einguste, 10 years ago

This problem happens in ffmpeg-2.3.3. This problem does not happen in ffmpeg-2.2.7.

comment:2 by Carl Eugen Hoyos, 10 years ago

Keywords: mov added; MP4 removed

To make this a valid ticket, please provide the command line that allows to reproduce the issue together with the complete, uncut console output.
Does it happen with every input file?

comment:3 by Einguste, 10 years ago

Does it happen with every input file?

Yes. I am sure of multiple files this phenomenon.

command line:

ffmpeg.exe -i ../news.flv -vcodec libxvid news2.mp4
ffprobe.exe -i news2.mp4
ffprobe version N-65991-g8c63a0d Copyright (c) 2007-2014 the FFmpeg developers
  built on Aug 31 2014 01:26:47 with gcc 4.9.1 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-avisynth --enable-fontconfig --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libvidstab --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxvid --enable-libilbc --enable-libxavs --enable-opengl --enable-libwebp --enable-avresample --enable-w32threads --extra-ldflags=-static --extra-cflags='-march=i686 -mtune=generic -mfpmath=sse -msse' --optflags='-O2 -finline-functions'
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  3.100 / 56.  3.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.103 /  5.  0.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
[mpeg4 @ 023690a0] hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 023690a0] my guess is 15 bits ;)
[mpeg4 @ 023690a0] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 023690a0] [IMGUTILS @ 0270f2f4] Picture size 0x0 is invalid
[mpeg4 @ 023690a0] video_get_buffer: image parameters invalid
[mpeg4 @ 023690a0] get_buffer() failed
[mpeg4 @ 023690a0] thread_get_buffer() failed
[mpeg4 @ 023690a0] get_buffer() failed (-22 00000000)
[mpeg4 @ 023690a0] releasing zombie picture
[mpeg4 @ 023690a0] [IMGUTILS @ 0270f2f4] Picture size 0x0 is invalid
[mpeg4 @ 023690a0] video_get_buffer: image parameters invalid

...

[mpeg4 @ 023690a0] video_get_buffer: image parameters invalid
[mpeg4 @ 023690a0] get_buffer() failed
[mpeg4 @ 023690a0] thread_get_buffer() failed
[mpeg4 @ 023690a0] get_buffer() failed (-22 00000000)
[mov,mp4,m4a,3gp,3g2,mj2 @ 02357fa0] decoding for stream 0 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 02357fa0] Could not find codec parameters for stream 0 (Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 343 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'news2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf56.3.100
  Duration: 00:00:26.97, start: 0.036281, bitrate: 476 kb/s
    Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 343 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Last edited 10 years ago by Carl Eugen Hoyos (previous) (diff)

comment:4 by Einguste, 10 years ago

FFmpeg-2.2.7
ffmpeg.exe -i ../news.flv -vcodec libxvid news2.mp4

ffprobe.exe news2.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'news2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf55.33.100
  Duration: 00:00:26.97, start: 0.036281, bitrate: 476 kb/s
    Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p
, 640x360 [SAR 1:1 DAR 16:9], 343 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 29.97 tbc
 (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 12
8 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Last edited 10 years ago by Einguste (previous) (diff)

in reply to:  description comment:5 by Einguste, 10 years ago

 ./ffmpeg.exe -i ../news.flv -y -vcodec libxvid news2.mp4
ffmpeg version N-65991-g8c63a0d Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 31 2014 01:26:47 with gcc 4.9.1 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-avisynth --enable-fontc
onfig --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-l
ibbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmodpl
ug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-lib
vo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libvidstab --enable-libw
avpack --enable-libx264 --enable-libx265 --enable-libxvid --enable-libilbc --ena
ble-libxavs --enable-opengl --enable-libwebp --enable-avresample --enable-w32thr
eads --extra-ldflags=-static --extra-cflags='-march=i686 -mtune=generic -mfpmath
=sse -msse' --optflags='-O2 -finline-functions'
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  3.100 / 56.  3.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.103 /  5.  0.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
[flv @ 046a7300] Stream discovered after head already parsed
Input #0, flv, from '../news.flv':
  Metadata:
    starttime       : 0
    totalduration   : 27
    totaldatarate   : 759
    bytelength      : 2553274
    canseekontime   : true
    sourcedata      : BD28BFD44HH1362041261421740
    purl            :
    pmsg            :
  Duration: 00:00:26.76, start: 0.000000, bitrate: 763 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x360, 639 kb/s, 30.33 fps, 29.9
7 tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s
    Stream #0:2: Data: none
Output #0, mp4, to 'news2.mp4':
  Metadata:
    starttime       : 0
    totalduration   : 27
    totaldatarate   : 759
    bytelength      : 2553274
    canseekontime   : true
    sourcedata      : BD28BFD44HH1362041261421740
    purl            :
    pmsg            :
    encoder         : Lavf56.3.100
    Stream #0:0: Video: mpeg4 (libxvid) ( [0][0][0] / 0x0020), yuv420p, 640x360,
 q=2-31, 200 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.1.100 libxvid
    Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100 Hz, s
tereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc56.1.100 libvo_aacenc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (libxvid))
  Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame=   86 fps=0.0 q=23.0 size=     200kB time=00:00:02.91 bitrate= 561.9kbits/
frame=  169 fps=169 q=31.0 size=     317kB time=00:00:05.67 bitrate= 457.3kbits/
frame=  243 fps=161 q=31.0 size=     438kB time=00:00:08.13 bitrate= 440.8kbits/
frame=  318 fps=158 q=31.0 size=     560kB time=00:00:10.64 bitrate= 431.2kbits/
frame=  384 fps=153 q=31.0 size=     704kB time=00:00:12.85 bitrate= 449.0kbits/
frame=  455 fps=151 q=31.0 size=     846kB time=00:00:15.21 bitrate= 455.6kbits/
frame=  524 fps=149 q=31.0 size=     993kB time=00:00:17.51 bitrate= 464.6kbits/
frame=  590 fps=147 q=31.0 size=    1121kB time=00:00:19.72 bitrate= 465.7kbits/
frame=  661 fps=146 q=31.0 size=    1256kB time=00:00:22.09 bitrate= 465.9kbits/
frame=  730 fps=145 q=31.0 size=    1397kB time=00:00:24.39 bitrate= 469.4kbits/
frame=  799 fps=145 q=31.0 size=    1537kB time=00:00:26.68 bitrate= 471.7kbits/
frame=  803 fps=144 q=31.0 Lsize=    1570kB time=00:00:26.94 bitrate= 477.3kbits
/s
video:1125kB audio:422kB subtitle:0kB other streams:0kB global headers:0kB muxin
g overhead: 1.533783%
Last edited 10 years ago by Einguste (previous) (diff)

comment:6 by Carl Eugen Hoyos, 10 years ago

It works fine here, did you compile ffmpeg yourself?

$ ffmpeg -f lavfi -i testsrc -vcodec libxvid -t 10 out.avi
ffmpeg version N-65992-ge023720 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 31 2014 09:18:34 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-libxvid
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  3.100 / 56.  3.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.103 /  5.  0.103
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf56.3.100
    Stream #0:0: Video: mpeg4 (libxvid) (xvid / 0x64697678), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.1.100 libxvid
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (libxvid))
Press [q] to stop, [?] for help
frame=  250 fps=0.0 q=3.0 Lsize=     288kB time=00:00:10.00 bitrate= 235.7kbits/s
video:276kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.205616%

in reply to:  6 comment:7 by Carl Eugen Hoyos, 10 years ago

Replying to cehoyos:

It works fine here, did you compile ffmpeg yourself?

Please ignore, I can reproduce the issue.

comment:8 by Carl Eugen Hoyos, 10 years ago

Keywords: regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Summary: When you use the livxvid codec in MP4, illegal file ready.Regression encoding libxvid to mov

Regression since 862120f9 / 38313626
The output file is broken:

$ ffmpeg -f lavfi -i testsrc -vcodec libxvid -t 10 out.mov
ffmpeg version N-65992-ge023720 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 31 2014 09:41:13 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-libxvid
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  3.100 / 56.  3.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.103 /  5.  0.103
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Output #0, mov, to 'out.mov':
  Metadata:
    encoder         : Lavf56.3.100
    Stream #0:0: Video: mpeg4 (libxvid) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.1.100 libxvid
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (libxvid))
Press [q] to stop, [?] for help
frame=  250 fps=0.0 q=3.0 Lsize=     277kB time=00:00:10.00 bitrate= 227.0kbits/s
video:275kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.659599%

comment:9 by Michael Niedermayer, 10 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.