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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Jul 10 00:08:45 CEST 2013


On 09.07.2013, at 14:52, James Board <jpboard2 at yahoo.com> wrote:
> Okay, so then if I start with some specific color space, compress with the lossless codecs, and then transcode back to that same original colorspace (assuming everything else is the same too: resolution, frame-rate, etc), then the frames should be exactly the same as the original (except for maybe small round-off errors, or artifacts of that nature)?

No "except". Encoding to a lossless codec and decoding again results in exactly the same output.
I am only talking about the video encoder or decoder. They are less than 50% of the code involved if you use a program like mencoder and unless you are very careful that code will not be lossy.

> I know that's what the name implies, but I just wanted to make sure.  The problem I had was that I grabbed a 30 second segment from a video to experiment with.  That segment started at the 10-second mark of the original video and ended at the 40-second mark.  The purpose of that was to have a small fast piece of video merely to experiment with. But somehow it looks like mencoder put the full 42 seconds in the experimental video file, and then when I translated to lossless, and back to the original format, it became the expected 30 seconds.  So I was seeing large reductions of filesize, which made me wonder if these lossless codecs really were.

As I said before: it's not the codec. Also, encoding with a lossy codec does not by itself reduce the size after decoding again, so even if the file size had been identical that would not have meant anything.


More information about the MPlayer-users mailing list