[FFmpeg-trac] #3754(avcodec:open): jpeg2000 encode produces gray garbage files, probably connected to threads and compression

FFmpeg trac at avcodec.org
Wed Jul 9 20:25:14 CEST 2014


#3754: jpeg2000 encode produces gray garbage files, probably connected to threads
and compression
-------------------------------------+-------------------------------------
             Reporter:  bud          |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  libopenjpeg  |               Blocked By:
  regression                         |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by cehoyos):

 * keywords:  libopenjpeg => libopenjpeg regression
 * priority:  normal => important


Comment:

 I tested current FFmpeg git head - e36916a - the version that introduced
 the regression - 3cfd4df - and the the version before 3cfd4df - e494f44 -
 with the following command line:
 {{{
 $ ffmpeg -f lavfi -i testsrc -threads 1 -vcodec libopenjpeg -t 3
 -compression_level 30 out.mov
 }}}
 The first and second output file look broken on playback, the oldest
 version (before the regression was introduced) produce an output file that
 plays fine. This is also reproducible with the native j2k decoder.
 {{{
 $ ffmpeg -f lavfi -i testsrc -threads 1 -vcodec libopenjpeg -t 3
 -compression_level 30 out-e36916a.mov
 ffmpeg version N-64545-ge36916a Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jul  9 2014 20:10:13 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libopenjpeg --disable-decoder=jpeg2000
   libavutil      52. 91.100 / 52. 91.100
   libavcodec     55. 68.102 / 55. 68.102
   libavformat    55. 45.100 / 55. 45.100
   libavdevice    55. 13.102 / 55. 13.102
   libavfilter     4. 10.100 /  4. 10.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.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
 [mov @ 0x2f07580] Using AVStream.codec.time_base as a timebase hint to the
 muxer is deprecated. Set AVStream.time_base instead.
 Output #0, mov, to 'out-e36916a.mov':
   Metadata:
     encoder         : Lavf55.45.100
     Stream #0:0: Video: jpeg2000 (libopenjpeg) (mjp2 / 0x32706A6D), rgb24,
 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
     Metadata:
       encoder         : Lavc55.68.102 libopenjpeg
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> jpeg2000 (libopenjpeg))
 Press [q] to stop, [?] for help
 frame=   75 fps= 41 q=0.0 Lsize=     681kB time=00:00:03.00
 bitrate=1860.7kbits/s
 video:680kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.147256%
 }}}
 {{{
 $ ffmpeg -f lavfi -i testsrc -threads 1 -vcodec libopenjpeg -t 3
 -compression_level 30 out-e36916a.mov
 bash: ./ffmpeg: No such file or directory
 cehoyos at lisbeth:~/test/cehoyos/FFmpeg> git log
 cehoyos at lisbeth:~/test/cehoyos/FFmpeg> ./ffmpeg -f lavfi -i testsrc
 -threads 1 -vcodec libopenjpeg -t 3 -compression_level 30 out-3cfd4df.mov
 ffmpeg version N-56578-g3cfd4df Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jul  9 2014 20:14:57 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libopenjpeg --disable-decoder=jpeg2000
   libavutil      52. 46.100 / 52. 46.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.102 / 55. 18.102
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 87.100 /  3. 87.100
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
 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-3cfd4df.mov':
   Metadata:
     encoder         : Lavf55.18.102
     Stream #0:0: Video: jpeg2000 (libopenjpeg) (mjp2 / 0x32706A6D), rgb24,
 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> libopenjpeg)
 Press [q] to stop, [?] for help
 frame=   75 fps= 40 q=0.0 Lsize=     681kB time=00:00:03.00
 bitrate=1860.7kbits/s
 }}}
 {{{
 $ ffmpeg -f lavfi -i testsrc -threads 1 -vcodec libopenjpeg -t 3
 -compression_level 30 out-e494f44.mov
 ffmpeg version N-56577-ge494f44 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jul  9 2014 20:15:42 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libopenjpeg --disable-decoder=jpeg2000
   libavutil      52. 46.100 / 52. 46.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.102 / 55. 18.102
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 87.100 /  3. 87.100
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
 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-e494f44.mov':
   Metadata:
     encoder         : Lavf55.18.102
     Stream #0:0: Video: jpeg2000 (libopenjpeg) (mjp2 / 0x32706A6D), rgb24,
 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> libopenjpeg)
 Press [q] to stop, [?] for help
 frame=   75 fps= 39 q=0.0 Lsize=     282kB time=00:00:03.00 bitrate=
 769.2kbits/s
 video:281kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 0.356970%
 }}}
 I tested with openjpeg-1.5.0, since 1.5.1 is known to be buggy, I suggest
 not to use it for regression tests.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3754#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list