[FFmpeg-user] jpeg2000/libopenjpeg lossless?

Dave Rice dave at dericed.com
Tue Dec 17 18:50:46 CET 2013


On Dec 17, 2013, at 5:39 AM, Peter B. <pb at das-werkstatt.com> wrote:

> Quoting Carl Eugen Hoyos <cehoyos at ag.or.at>:
> 
>> Peter B. <pb <at> das-werkstatt.com> writes:
>> 
>>> Does anyone know which parameters do I require to encode
>>> JPEG2000 lossless using libopenjpeg?
>> 
>> It is lossless by default.
> 
> Hm... Then there's something wrong with my build.
> 
> It also plays back faulty using ffplay: luma is correct, but the color information seems displaced and wrong.

I am having similar issues. For instance encode to yuv422p10le jpeg2000 and pipe to ffplay shows chroma problems. I'm running git-master, compiled a few minutes ago with libopenjpeg. Here's a sample command to show the issue in yuv422p10le. yuv422p and yuv420p look similarly odd.

ffmpeg -f lavfi -i testsrc -pix_fmt yuv422p10le -c:v libopenjpeg -f nut - | ffplay -

ffmpeg version 2.1.git Copyright (c) 2000-2013 the FFmpeg developers
  built on Dec 17 2013 11:48:51 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-ffplay --enable-libcaca --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      53.  0.100 / 53.  0.100
  libavcodec     55. 45.101 / 55. 45.101
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.100 /  4.  0.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.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, nut, to 'pipe:':
  Metadata:
    encoder         : Lavf55.22.100
    Stream #0:0: Video: jpeg2000 (libopenjpeg) (mjp2 / 0x32706A6D), yuv422p10le, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 51200 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libopenjpeg)
Press [q] to stop, [?] for help
ffplay version 2.1.git Copyright (c) 2003-2013 the FFmpeg developers
  built on Dec 17 2013 11:48:51 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-ffplay --enable-libcaca --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      53.  0.100 / 53.  0.100
  libavcodec     55. 45.101 / 55. 45.101
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.100 /  4.  0.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, nut, from 'pipe:':ze=     361kB time=00:00:00.84 bitrate=3522.3kbits/s    
  Metadata:
    encoder         : Lavf55.22.100
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0) (mjp2 / 0x32706A6D), yuv422p10le, 320x240, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 51200 tbn, 51200 tbc
   1.88 M-V:  0.000 fd=   0 aq=    0KB vq=  103KB sq=    0B f=0/0   488.4kbits/s 

Dave Rice


More information about the ffmpeg-user mailing list