[FFmpeg-trac] #3745(avcodec:new): error with libopenjpeg encoding

FFmpeg trac at avcodec.org
Thu Jun 26 20:39:15 CEST 2014


#3745: error with libopenjpeg encoding
-------------------------------------+-----------------------------------
             Reporter:  dericed      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  libopenjpeg  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by cehoyos):

 If I understand correctly, you see two different (and indpendent) issues:
 One is that the FFmpeg mov muxer only outputs constant frame rate, so if
 FFmpeg interprets your input file as variable frame rate, it will insert
 frames to achieve constant frame rate. This is reported in several
 tickets.
 {{{-vsync 0}}} avoids frame duplications, it may brake A/V sync but to
 test the bitexactness of your encodings, it is useful.

 I am unable to reproduce a difference between the original frames and the
 frames encoded with openjpeg-1.5.0-2.7.1.x86_64:
 {{{
 $ ffmpeg -vsync 0 -i v210_cant_be_jpeg2000d.mov -an -f crc -
 ffmpeg version N-64232-g932be89 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun 26 2014 20:31:10 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libopenjpeg --disable-decoder=jpeg2000
   libavutil      52. 90.101 / 52. 90.101
   libavcodec     55. 68.100 / 55. 68.100
   libavformat    55. 44.100 / 55. 44.100
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  9.100 /  4.  9.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'v210_cant_be_jpeg2000d.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf55.44.100
   Duration: 00:00:01.02, start: 0.021333, bitrate: 219267 kb/s
     Stream #0:0(eng): Video: v210 (v210 / 0x30313276), yuv422p10le,
 720x486, 223725 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc55.68.100 v210
     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 123 kb/s (default)
     Metadata:
       handler_name    : DataHandler
 [crc @ 0x37f0a00] Using AVStream.codec.time_base as a timebase hint to the
 muxer is deprecated. Set AVStream.time_base instead.
 Output #0, crc, to 'pipe:':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf55.44.100
     Stream #0:0(eng): Video: rawvideo (Y3[10][10] / 0xA0A3359),
 yuv422p10le, 720x486, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
 (default)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc55.68.100 rawvideo
 Stream mapping:
   Stream #0:0 -> #0:0 (v210 (native) -> rawvideo (native))
 Press [q] to stop, [?] for help
 CRC=0x69c0112a
 frame=   30 fps=0.0 q=0.0 Lsize=       0kB time=00:00:01.03 bitrate=
 0.1kbits/s
 video:41006kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}
 {{{
 $ ffmpeg -vsync 0 -i v210_cant_be_jpeg2000d.mov -an -vcodec libopenjpeg
 out.mov
 }}}
 {{{
 $ ffmpeg -vsync 0 -i out.mov -f crc -
 ffmpeg version N-64232-g932be89 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun 26 2014 20:31:10 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libopenjpeg --disable-decoder=jpeg2000
   libavutil      52. 90.101 / 52. 90.101
   libavcodec     55. 68.100 / 55. 68.100
   libavformat    55. 44.100 / 55. 44.100
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  9.100 /  4.  9.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf55.44.100
   Duration: 00:00:01.00, start: 0.033000, bitrate: 107620 kb/s
     Stream #0:0(eng): Video: jpeg2000 (mjp2 / 0x32706A6D), yuv422p10le,
 720x486, 107612 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc55.68.100 libopenjpeg
 [crc @ 0x2ba1500] Using AVStream.codec.time_base as a timebase hint to the
 muxer is deprecated. Set AVStream.time_base instead.
 Output #0, crc, to 'pipe:':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf55.44.100
     Stream #0:0(eng): Video: rawvideo (Y3[10][10] / 0xA0A3359),
 yuv422p10le, 720x486, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
 (default)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc55.68.100 rawvideo
 Stream mapping:
   Stream #0:0 -> #0:0 (jpeg2000 (libopenjpeg) -> rawvideo (native))
 Press [q] to stop, [?] for help
 CRC=0x69c0112a
 frame=   30 fps=0.0 q=0.0 Lsize=       0kB time=00:00:01.00 bitrate=
 0.1kbits/s
 video:41006kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}
 {{{-f framecrc}}} is also identical for both files here (apart from the
 timestamp issue).

 Could this be an issue with your openjpeg version (or compilation)?

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


More information about the FFmpeg-trac mailing list