[MPlayer-users] Are mencoder lossless codecs really lossless?

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jul 8 20:01:22 CEST 2013


On Mon, Jul 08, 2013 at 07:26:39PM +0200, Marco Munderloh wrote:
> On 08.07.2013 17:33, James Board wrote:
> > My input file is an uncompressed raw YUV 4.2.2 format.  I want to compress individual frames with a lossless codec.  My mencoder implementation listed three such codecs it the man page: 
> > 	* ljpeg: lossless jpeg
> > ffv1: FFmpeg's lossless video codec
> > 	* ffvhuff: nonstandard 20% smaller HuffYUV using VY12
> > I encoded my file using the following:
> >     mencoder -ovc lavc -lavcopts ljpeg -oac copy -o out.avi in.avi
> 
> You have to specify format=422P to the lavcopts to get 422 encoding, it
> would use 420 otherwise (see manpage).

There are more issues.
For example, without at least -mc 0 -noskip the synching code can
duplicate or remove frames to match the desired frame rate (which
particularly with -oac copy can go horribly wrong).
In addition mencoder sometimes "forgets" some of the last frames
(though it should be working fine in most cases nowadays).
Also, subtitles and metadata won't be preserved, so the avi file won't
match completely either way.
To compare the video content there is -vo md5sum which should be fairly
reliable and I believe it should also give the same output as ffmpeg's
framemd5 if you want to be extra paranoid and make sure that a second
implementation agrees (though admittedly with the amount of code shared
it's an exaggeration to call it a "second implementation").


More information about the MPlayer-users mailing list