[MEncoder-users] Mencoder quality settings ...

Phil Ehrens phil at slug.org
Fri Jan 4 01:01:32 CET 2008


Leopold Palomo Avellaneda wrote:
> A Divendres 04 Gener 2008, Moritz Barsnick va escriure:
> > Hi,
> >
> > On Thu, Jan 03, 2008 at 20:58:24 +0100, Leopold Palomo Avellaneda wrote:
> > > I would like to convert it to using another codec (for example xvid or
> > > x264) preserving the _same_ quality (in terms of taking one frame from
> > > both and not finding any difference). It's something like I have a bunch
> > > of files and I compress it using bz2 or zip. I know that I always will
> > > have the original. Some kind of lossless compression.
> >
> > Let me take a mathematical and logical approach here:
> > > I think that it's impossible because when I decode a frame and I
> > > recode it it cannot be equal to the original.
> >
> > It can, if the codec used when recoding is lossless. Not many such
> > codecs come to mind, I think snow and hufyuv are candidates. As
> > mentioned in the other answers, there _are_ settings for other more
> > common codecs making them "nearly" lossless, even possiby at a bitrate
> > possibly lower than your original.
> 
> OK.
> 
> > > But for example, if I have a photo, for example in tiff and I save it
> > > to jpeg, I can choose the % of quality, understanding that a 100%
> > > quality jpeg is equal to the original tiff using less space.
> >
> > This is wrong since JPEG has _no_ lossless option available whatsoever.
> > JPEG2000 e.g. on the other hand does. I understand what you're trying
> > to say though, but the example is wrong. ;-)
> >
> ummmmmm ok you are right. The correct example should be jpeg2000 :-)
> 
> > > In my case I don't care about the disk space totally but yes to have a
> > > conversion to another more efficient codec.
> >
> > Your problem is you want both lossless and more efficient than MPEG2.
> > At the same time your "original" is already MPEG2 and thereby lossy. If
> > you had captured from that "home video device" to something less lossy
> > or non lossless, your next (lossy) recoding step would have the chance
> > of being closer to this "absolute" original.
> >
> > > So, if I don't want to look in to the bitrates, etc, there's some way to
> > > convert one stream in one format to another preserving the _same_ image
> > > quality but less space?
> >
> > Again, in the chain:
> > real original -> MPEG2 -> next format
> > the next format will statistically always be worse (further from the
> > real original) unless it uses a lossless codec.
> > If you replace that chain (which you might not be able to) with
> > real original -> new format
> > you have the chance of using less space and even of higher quality.
> 
> NO, my real original is mpeg2. A DVB-T signal is codec with mpeg2. My video 
> device is a simple device that that the video stream and saves is to a hd. I 
> came from that.
> 
> >
> > Now, apart from that:
> > I totally get your point. I sometimes also think something along this
> > line:
> >
> > "Okay, I have this video here which is already half-bad, and I must
> > recode it to a different format. With what settings can I get a
> > satisfactory low bitrate result, considering that my original format
> > was already quite bad."
> >
> > Not quite the same as your issue, but along the same lines IMO.
> 
> yes .....

The problem is that you unwittingly stepped into a nest of
snakes by referring to "loss" as opposed to acceptable
degradation. There are plenty of "lossy" formats that can
be used to reencode to smaller size with acceptable
degradation. As a matter of fact, a little tweaking will
often result in a "lossy" encode that *looks* better than the
original.

What you need to decide is how compatible with existing players
you want to be. If you want to reencode to a format that you
can pop into a divx capable commercial dvd player, you will want
to use lavc mpeg4 with the "-ffourcc DX50" option. If you are
willing to be constrained to view your vids via computer,
then you will probably want to check out that h264enc script,
which looks very interesting.



More information about the MEncoder-users mailing list