[FFmpeg-user] Mathematically lossless MotionJPEG2000 encoding possible?

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Oct 27 20:32:52 CET 2014

Christoph Gerstbauer <christophgerstbauer <at> gmail.com> writes:

> I am testing the jpeg2000 encoder (libopenjpeg) 
> but I always get a damaged image (Colorshifting, 
> Color flickering, etc..)

This doesn't sound familiar to me, how can I 

> Generally asked: is it possible to encode to 
> Motion JPEG2000 with following pixel formats in 
> ffmpeg?
> yuv420p
> yuv411p
> yuv422p
> yuv422p10le
> yuv444p10le

Yes, they all work fine.

> If yes, how is the correct encoding syntax?
> My used syntax:
> ffmpeg -i <inputfile> -vcodec libopenjpeg 
> -pix_fmt yuv422p -an <outputfile>

Please always provide an actual command line (no 
variables) and the complete, uncut console 
output if you ask for support here.

> I am shure that this syntax is not correct

I don't think so.

> (not enough in defining the correct encoding params), 

> furthermore I made no setting for LOSSLESS 
> encoding mode.

Lossless is the default for libopenjpeg iirc.

> Therefore I just need a HOW TO for jpeg2000 
> lossless encoding.

> Addionally: which container formats are supported 
> within ffmpeg for MotionJPEG2000?

avi (including mkv), mov, mxf, nut

Finally, please note that ffv1 is faster than 
libopenjpeg, compresses better and should make 
significantly less trouble than the so-called 
"professional" solutions you are being offered. 

Carl Eugen

More information about the ffmpeg-user mailing list