Opened 11 years ago

Closed 11 years ago

#2033 closed defect (needs_more_info)

Regression creating images in ffmpeg 1.0

Reported by: doublemax Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: h264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

  • Summary of the bug:

Creating static images from a video works on Centos6-32bit, but not on Centos6-64bit. This issue does not exist in libav-9pre.
The created jpegs look completly destroyed.

  • How to reproduce:
$ wget http://doppelbauer.name/regression.flv
$ ffmpeg -i regression.flv -f image2 -r 1 -vcodec mjpeg -vframes 1000 -qscale 1 %d.jpg

ffmpeg version 1.0.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 12 2012 10:11:05 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
  configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --enable-bzlib --enable-zlib --enable-libx264 --enable-libfaac --enable-libvo-aacenc --enable-libaacplus --enable-libmp3lame --enable-libcelt --enable-libspeex
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, flv, from 'regression.flv':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            : 
    pmsg            : 
  Duration: 00:08:51.63, start: 0.000000, bitrate: 944 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 826 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, s16, 131 kb/s
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, image2, to '%d.jpg':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            : 
    pmsg            : 
    encoder         : Lavf54.29.104
    Stream #0:0: Video: mjpeg, yuvj420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 1 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Operation not permitted
    Last message repeated 324 times
Error while decoding stream #0:0: Operation not permitted0 bitrate=   0.0kbits/s dup=0 drop=146    
    Last message repeated 339 times
Error while decoding stream #0:0: Operation not permitted0 bitrate=   0.0kbits/s dup=0 drop=298    
    Last message repeated 364 times
Error while decoding stream #0:0: Operation not permitted0 bitrate=   0.0kbits/s dup=0 drop=455    
    Last message repeated 9 times

Change History (13)

comment:1 by Carl Eugen Hoyos, 11 years ago

Is this problem also reproducible with current git head?

comment:2 by doublemax, 11 years ago

Yes, tested with CentOS6 64bit, ffmpeg-N47885.
Not all images are corrupted, only many.

comment:3 by Carl Eugen Hoyos, 11 years ago

Please provide the input sample and please provide command line and complete, uncut console output for current git head.

comment:4 by doublemax, 11 years ago

Input sample, command line and console output are in the initial bug report.
Here once more:

wget http://doppelbauer.name/regression.flv
ffmpeg -i regression.flv -f image2 -r 1 -vcodec mjpeg -vframes 1000 -qscale 1 %d.jpg

comment:5 by Carl Eugen Hoyos, 11 years ago

I cannot reproduce the problem but I did not check all 1000 frames;-(

Please provide a failing command line with "-vframes 1" or at least significantly less than 1000, and please provide the console output: It will probably not help, but since I cannot reproduce the problem, it could be useful.

comment:6 by doublemax, 11 years ago

Sorry. The first five images are fine, the last 15 images are damaged. This happens only on Centos6 64bit (Centos6 32bit is fine):

wget http://doppelbauer.name/regression.flv
ffmpeg -i regression.flv -f image2 -r 1 -vcodec mjpeg -vframes 20 -qscale 1 %d.jpg

ffmpeg version N-47885-g718eab5 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 16 2012 10:26:35 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
  configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --enable-bzlib --enable-zlib --enable-libx264 --enable-libfaac --enable-libvo-aacenc --enable-libaacplus --enable-libmp3lame --enable-libcelt --enable-libspeex
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 80.100 / 54. 80.100
  libavformat    54. 49.102 / 54. 49.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 27.102 /  3. 27.102
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, flv, from 'regression.flv':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            : 
    pmsg            : 
  Duration: 00:08:51.63, start: 0.000000, bitrate: 944 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 826 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, image2, to '%d.jpg':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            : 
    pmsg            : 
    encoder         : Lavf54.49.102
    Stream #0:0: Video: mjpeg, yuvj420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 1 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Operation not permitted
    Last message repeated 274 times
frame=   20 fps=0.0 q=0.0 Lsize=       0kB time=00:00:20.00 bitrate=   0.0kbits/s dup=0 drop=118    
video:1086kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000000%
Last edited 11 years ago by doublemax (previous) (diff)

comment:7 by Carl Eugen Hoyos, 11 years ago

Does it work with an output codec different from jpg? (png)
Or even better, could you confirm that the following looks different for you for frames 5 - 19?
Do you still see the "Operation not permitted" error?

$ ffmpeg -i regression.flv -vframes 20 -f framecrc -an -
ffmpeg version N-47885-g718eab5 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 17 2012 11:10:35 with gcc 4.7 (SUSE Linux)
  configuration:
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 80.100 / 54. 80.100
  libavformat    54. 49.102 / 54. 49.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 27.102 /  3. 27.102
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
Input #0, flv, from 'regression.flv':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            :
    pmsg            :
  Duration: 00:08:51.63, start: 0.000000, bitrate: 944 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 826 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s
#tb 0: 1001/30000
Output #0, framecrc, to 'pipe:':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            :
    pmsg            :
    encoder         : Lavf54.49.102
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> rawvideo)
Press [q] to stop, [?] for help
0,          0,          0,        1,   460800, 0xe0dfe574
0,          1,          1,        1,   460800, 0x98c2e5b9
0,          2,          2,        1,   460800, 0x809ecc4c
0,          3,          3,        1,   460800, 0x1b76597d
0,          4,          4,        1,   460800, 0xc399d81f
0,          5,          5,        1,   460800, 0x53e31a66
0,          6,          6,        1,   460800, 0x8bb83b7d
0,          7,          7,        1,   460800, 0xb0b4e300
0,          8,          8,        1,   460800, 0xeaa7f61b
0,          9,          9,        1,   460800, 0x8102c27c
0,         10,         10,        1,   460800, 0x2d1bb952
0,         11,         11,        1,   460800, 0xe48ef614
0,         12,         12,        1,   460800, 0x099458be
0,         13,         13,        1,   460800, 0xdf650aec
0,         14,         14,        1,   460800, 0xad449ba9
0,         15,         15,        1,   460800, 0xad166d82
0,         16,         16,        1,   460800, 0x8a0c7910
0,         17,         17,        1,   460800, 0x14a48d50
0,         18,         18,        1,   460800, 0x05b966fd
0,         19,         19,        1,   460800, 0x2a5753a3
frame=   20 fps=0.0 q=0.0 Lsize=       1kB time=00:00:00.66 bitrate=  14.1kbits/s
video:9000kB audio:0kB subtitle:0 global headers:0kB muxing overhead -99.987218%

To narrow down the reason for the problem, you could either test "./configure && make", "./configure --disable-yasm && make", "./configure --disable-asm && make" and "./configure --disable-optimizations && make" or try with an older version of ffmpeg (assuming there is one that works) and use git bisect to find the change introducing the problem.

comment:8 by Carl Eugen Hoyos, 11 years ago

I tested with gcc-4.4.6 (vanilla) on x86_64, decoding works fine, jpgs also look fine. Please also post the output of the following command to clarify if this is a decoding (or a jpeg-encoding) issue.

$ ffmpeg -i regression.flv -vframes 20 -f framecrc -an -
ffmpeg version N-48272-g2a9443a Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 29 2012 18:15:32 with gcc 4.4.6 (GCC)
  configuration: --cc=/usr/local/gcc-4.4.6/bin/gcc
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 50.104 / 54. 50.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 30.101 /  3. 30.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
Input #0, flv, from 'regression.flv':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            :
    pmsg            :
  Duration: 00:08:51.63, start: 0.000000, bitrate: 944 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 826 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s
#tb 0: 1001/30000
Output #0, framecrc, to 'pipe:':
  Metadata:
    starttime       : 0
    totalduration   : 532
    totaldatarate   : 944
    bytelength      : 62755813
    canseekontime   : true
    sourcedata      : B4A7DDA27MH1353476116770896
    purl            :
    pmsg            :
    encoder         : Lavf54.50.104
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> rawvideo)
Press [q] to stop, [?] for help
0,          0,          0,        1,   460800, 0xe0dfe574
0,          1,          1,        1,   460800, 0x98c2e5b9
0,          2,          2,        1,   460800, 0x809ecc4c
0,          3,          3,        1,   460800, 0x1b76597d
0,          4,          4,        1,   460800, 0xc399d81f
0,          5,          5,        1,   460800, 0x53e31a66
0,          6,          6,        1,   460800, 0x8bb83b7d
0,          7,          7,        1,   460800, 0xb0b4e300
0,          8,          8,        1,   460800, 0xeaa7f61b
0,          9,          9,        1,   460800, 0x8102c27c
0,         10,         10,        1,   460800, 0x2d1bb952
0,         11,         11,        1,   460800, 0xe48ef614
0,         12,         12,        1,   460800, 0x099458be
0,         13,         13,        1,   460800, 0xdf650aec
0,         14,         14,        1,   460800, 0xad449ba9
0,         15,         15,        1,   460800, 0xad166d82
0,         16,         16,        1,   460800, 0x8a0c7910
0,         17,         17,        1,   460800, 0x14a48d50
0,         18,         18,        1,   460800, 0x05b966fd
0,         19,         19,        1,   460800, 0x2a5753a3
frame=   20 fps=0.0 q=0.0 Lsize=       1kB time=00:00:00.66 bitrate=  14.1kbits/s
video:9000kB audio:0kB subtitle:0 global headers:0kB muxing overhead -99.987218%

comment:9 by doublemax, 11 years ago

Sorry - I have installed CentOS6 32bit - I can't provide you any tests.
Maybe you want to close this ticket.
Thanks a lot

in reply to:  9 comment:10 by Carl Eugen Hoyos, 11 years ago

Replying to doublemax:

Sorry - I have installed CentOS6 32bit - I can't provide you any tests.

I am not sure I understand: You cannot run the command line I used and post the output here so we know if this is a decoding or an encoding problem?

in reply to:  9 comment:11 by Carl Eugen Hoyos, 11 years ago

Replying to doublemax:

Sorry - I have installed CentOS6 32bit - I can't provide you any tests.

Sorry, I misread your post - how do you know it fails on CentOS6 64bit if you only have a 32bit installation?

comment:12 by doublemax, 11 years ago

I had both - 32bit and 64bit.
Because of this bug I removed the CentOS 64bit machines.

comment:13 by Carl Eugen Hoyos, 11 years ago

Keywords: h264 added
Resolution: needs_more_info
Status: newclosed

Thank you for clarifying.

Note: See TracTickets for help on using tickets.