[FFmpeg-trac] #2510(avcodec:new): Some jpeg2000 files cannot be decoded anymore by default

FFmpeg trac at avcodec.org
Mon Apr 29 12:55:46 CEST 2013


#2510: Some jpeg2000 files cannot be decoded anymore by default
-------------------------------------+-------------------------------------
             Reporter:  cehoyos      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  j2k          |               Blocked By:
  regression                         |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by cehoyos:

Old description:

> {{{$ ffmpeg -i tests/lena.pnm -vcodec libopenjpeg outlibopenjpeg.j2c}}}
> {{{$ ffmpeg -i tests/lena.pnm -vcodec j2k -strict -2 outj2k.j2c}}}
> Both files can be decoded with libopenjpeg and the "experimental" j2k
> decoder, but not with the default decoder:
> {{{
> $ ffmpeg -i outlibopenjpeg.j2c out.jpg
> ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
>   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
>   libavutil      52. 27.101 / 52. 27.101
>   libavcodec     55.  6.100 / 55.  6.100
>   libavformat    55.  3.100 / 55.  3.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 61.101 /  3. 61.101
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  3.100 / 52.  3.100
> [jpeg2000 @ 0x24a56c0] SOD marker not found
> [jpeg2000 @ 0x24a56c0] error during processing marker segment ff90
> Input #0, image2, from 'outlibopenjpeg.j2c':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
> rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> Output #0, image2, to 'out.jpg':
>   Metadata:
>     encoder         : Lavf55.3.100
>     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
> tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (jpeg2000 -> mjpeg)
> Press [q] to stop, [?] for help
> [jpeg2000 @ 0x26077e0] SOD marker not found
> [jpeg2000 @ 0x26077e0] error during processing marker segment ff90
> frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A
> video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -inf%
> Output file is empty, nothing was encoded (check -ss / -t / -frames
> parameters if used)
> }}}
> {{{
> $ ffmpeg -i outj2k.j2c out.jpg
> ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
>   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
>   libavutil      52. 27.101 / 52. 27.101
>   libavcodec     55.  6.100 / 55.  6.100
>   libavformat    55.  3.100 / 55.  3.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 61.101 /  3. 61.101
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  3.100 / 52.  3.100
> Input #0, image2, from 'outj2k.j2c':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
> rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> Output #0, image2, to 'out.jpg':
>   Metadata:
>     encoder         : Lavf55.3.100
>     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
> tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (jpeg2000 -> mjpeg)
> Press [q] to stop, [?] for help
> frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A
> video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -inf%
> Output file is empty, nothing was encoded (check -ss / -t / -frames
> parameters if used)
> }}}
> {{{
> $ ffmpeg -vcodec libopenjpeg -i outlibopenjpeg.j2c out.jpg
> ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
>   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
>   libavutil      52. 27.101 / 52. 27.101
>   libavcodec     55.  6.100 / 55.  6.100
>   libavformat    55.  3.100 / 55.  3.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 61.101 /  3. 61.101
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  3.100 / 52.  3.100
> [jpeg2000 @ 0x2c0f700] SOD marker not found
> [jpeg2000 @ 0x2c0f700] error during processing marker segment ff90
> Input #0, image2, from 'outlibopenjpeg.j2c':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
> rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> Output #0, image2, to 'out.jpg':
>   Metadata:
>     encoder         : Lavf55.3.100
>     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
> tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (libopenjpeg -> mjpeg)
> Press [q] to stop, [?] for help
> frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
> video:16kB audio:0kB subtitle:0 global headers:0kB muxing overhead
> -100.134138%
> }}}
> {{{
> $ ffmpeg -vcodec libopenjpeg -i outj2k.j2c out.jpg
> ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
>   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
>   libavutil      52. 27.101 / 52. 27.101
>   libavcodec     55.  6.100 / 55.  6.100
>   libavformat    55.  3.100 / 55.  3.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 61.101 /  3. 61.101
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  3.100 / 52.  3.100
> Input #0, image2, from 'outj2k.j2c':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
> rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> Output #0, image2, to 'out.jpg':
>   Metadata:
>     encoder         : Lavf55.3.100
>     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
> tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (libopenjpeg -> mjpeg)
> Press [q] to stop, [?] for help
> frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
> video:16kB audio:0kB subtitle:0 global headers:0kB muxing overhead
> -100.133245%
> }}}
> {{{
> $ ffmpeg -vcodec j2k -strict -2 -i outlibopenjpeg.j2c out.jpg
> ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
>   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
>   libavutil      52. 27.101 / 52. 27.101
>   libavcodec     55.  6.100 / 55.  6.100
>   libavformat    55.  3.100 / 55.  3.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 61.101 /  3. 61.101
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  3.100 / 52.  3.100
> [jpeg2000 @ 0x34be8c0] SOD marker not found
> [jpeg2000 @ 0x34be8c0] error during processing marker segment ff90
> Input #0, image2, from 'outlibopenjpeg.j2c':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
> rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> Output #0, image2, to 'out.jpg':
>   Metadata:
>     encoder         : Lavf55.3.100
>     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
> tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (j2k -> mjpeg)
> Press [q] to stop, [?] for help
> frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
> video:16kB audio:0kB subtitle:0 global headers:0kB muxing overhead
> -100.130247%
> }}}
> {{{
> $ ffmpeg -vcodec j2k -strict -2 -i outj2k.j2c out.jpg
> ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
>   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
>   libavutil      52. 27.101 / 52. 27.101
>   libavcodec     55.  6.100 / 55.  6.100
>   libavformat    55.  3.100 / 55.  3.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 61.101 /  3. 61.101
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  3.100 / 52.  3.100
> Input #0, image2, from 'outj2k.j2c':
>   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
> rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
> Output #0, image2, to 'out.jpg':
>   Metadata:
>     encoder         : Lavf55.3.100
>     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
> tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (j2k -> mjpeg)
> Press [q] to stop, [?] for help
> frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
> video:17kB audio:0kB subtitle:0 global headers:0kB muxing overhead
> -100.130062%
> }}}

New description:

 {{{$ ffmpeg -i tests/lena.pnm -vcodec libopenjpeg outlibopenjpeg.j2c}}}
 {{{$ ffmpeg -i tests/lena.pnm -vcodec j2k -strict -2 outj2k.j2c}}}
 Both files can be decoded with libopenjpeg and the "experimental" j2k
 decoder (and jasper), but not with the default decoder:
 {{{
 $ ffmpeg -i outlibopenjpeg.j2c out.jpg
 ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
   libavutil      52. 27.101 / 52. 27.101
   libavcodec     55.  6.100 / 55.  6.100
   libavformat    55.  3.100 / 55.  3.100
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 61.101 /  3. 61.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 [jpeg2000 @ 0x24a56c0] SOD marker not found
 [jpeg2000 @ 0x24a56c0] error during processing marker segment ff90
 Input #0, image2, from 'outlibopenjpeg.j2c':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
 rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.3.100
     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (jpeg2000 -> mjpeg)
 Press [q] to stop, [?] for help
 [jpeg2000 @ 0x26077e0] SOD marker not found
 [jpeg2000 @ 0x26077e0] error during processing marker segment ff90
 frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A
 video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -inf%
 Output file is empty, nothing was encoded (check -ss / -t / -frames
 parameters if used)
 }}}
 {{{
 $ ffmpeg -i outj2k.j2c out.jpg
 ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
   libavutil      52. 27.101 / 52. 27.101
   libavcodec     55.  6.100 / 55.  6.100
   libavformat    55.  3.100 / 55.  3.100
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 61.101 /  3. 61.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, image2, from 'outj2k.j2c':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
 rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.3.100
     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (jpeg2000 -> mjpeg)
 Press [q] to stop, [?] for help
 frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A
 video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -inf%
 Output file is empty, nothing was encoded (check -ss / -t / -frames
 parameters if used)
 }}}
 {{{
 $ ffmpeg -vcodec libopenjpeg -i outlibopenjpeg.j2c out.jpg
 ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
   libavutil      52. 27.101 / 52. 27.101
   libavcodec     55.  6.100 / 55.  6.100
   libavformat    55.  3.100 / 55.  3.100
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 61.101 /  3. 61.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 [jpeg2000 @ 0x2c0f700] SOD marker not found
 [jpeg2000 @ 0x2c0f700] error during processing marker segment ff90
 Input #0, image2, from 'outlibopenjpeg.j2c':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
 rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.3.100
     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (libopenjpeg -> mjpeg)
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 video:16kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -100.134138%
 }}}
 {{{
 $ ffmpeg -vcodec libopenjpeg -i outj2k.j2c out.jpg
 ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
   libavutil      52. 27.101 / 52. 27.101
   libavcodec     55.  6.100 / 55.  6.100
   libavformat    55.  3.100 / 55.  3.100
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 61.101 /  3. 61.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, image2, from 'outj2k.j2c':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
 rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.3.100
     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (libopenjpeg -> mjpeg)
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 video:16kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -100.133245%
 }}}
 {{{
 $ ffmpeg -vcodec j2k -strict -2 -i outlibopenjpeg.j2c out.jpg
 ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
   libavutil      52. 27.101 / 52. 27.101
   libavcodec     55.  6.100 / 55.  6.100
   libavformat    55.  3.100 / 55.  3.100
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 61.101 /  3. 61.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 [jpeg2000 @ 0x34be8c0] SOD marker not found
 [jpeg2000 @ 0x34be8c0] error during processing marker segment ff90
 Input #0, image2, from 'outlibopenjpeg.j2c':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
 rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.3.100
     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (j2k -> mjpeg)
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 video:16kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -100.130247%
 }}}
 {{{
 $ ffmpeg -vcodec j2k -strict -2 -i outj2k.j2c out.jpg
 ffmpeg version N-52554-gb691bc4 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Apr 29 2013 12:14:54 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
   libavutil      52. 27.101 / 52. 27.101
   libavcodec     55.  6.100 / 55.  6.100
   libavformat    55.  3.100 / 55.  3.100
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 61.101 /  3. 61.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, image2, from 'outj2k.j2c':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0),
 rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.3.100
     Stream #0:0: Video: mjpeg, yuvj444p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (j2k -> mjpeg)
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 video:17kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -100.130062%
 }}}

--

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2510#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list