[FFmpeg-user] Mathematically lossless MotionJPEG2000 encoding possible?

Dave Rice dave at dericed.com
Tue Oct 28 15:18:23 CET 2014


On Oct 28, 2014, at 6:56 AM, Christoph Gerstbauer <christophgerstbauer at gmail.com> wrote:
>> On Tue, Oct 28, 2014 at 11:12:33 +0100, Carl Eugen Hoyos wrote:
>>>> Additionally, I spoek last week with a very professional video guy, and
>>>                                               ^^^^^^^^^^^^^^^^^^^^^^
>>>> jpeg2000 -> and checks this just VISUALLY. (o.O)
>>>                                    ^^^^^^^^
>>> There is some contradiction in your writing...
>> I believe "professional(ly)" originally means that he is doing it as a
>> profession, i.e. to earn his livelihood. It doesn't have to mean he
>> does it well. ;-)
>> 
>> As in "amateur sports" vs. "professional sports".
> 
> Thats why I made this smilie:
> 
> (o.O)
> 
> I meaned that in the international video world, this "professional" video guy is a very important person (eminently respectable in some video issues).
> I was wondering myself how he could get this status, when he is just checking visually his content.

Using a human eye and a computer screen to verify losslessness at this scale doesn’t make sense for a number of reasons. Both the original video and the lossless version would have been converted to RGB and 8 bit to show on a computer screen so any details in higher bit depth content or lost in the colorspace conversion would not be noticeable. If you presume that the video is one hours of NTSC SD video that 720x486 times 29.97 frames/second times 3600 seconds per hour or 37,753,568,640 pixels that represent values from multiple planes. Despite how 'professional' someone may be I don’t think it is feasible or sane for a human to visualize determine what sample value is represented per pixel in a computer screen representation of a video and if it exactly correlates to a related pixel in another video. Even if they use intensive sampling to accomplish this it’s likely a visual check would miss single frame discrepancies like this one: https://twitter.com/dericed/status/482195897456275457.

> I can never trust my eyes, but I can always trust a framemd5 (numbers dont lie).
> He didnt know that the possibility to check via framemd5s even exists…

Not too hard to conceive of changing DECODER->ENCODER or DECODER->DISPLAY to DECODER->CHECKSUM.

> Anyhow, how can a set the LOSSY encoding in libopenjpeg? via "-b:v" or "-q”?

IIRC the libopenjpeg encoder/decoder in ffmpeg only supports lossless encoding.

> I want to know all encoding/decoding paramaters of the libopenjpeg codec or also j2k (if this is still implemented codec, even if it is experimentally)


ffmpeg -h encoder=libopenjpeg
ffmpeg -h decoder=libopenjpeg
ffmpeg -h encoder=jpeg2000
ffmpeg -h decoder=jpeg2000

Dave Rice


More information about the ffmpeg-user mailing list