[MEncoder-users] Backup policies
infernix
infernix at infernix.net
Fri Nov 16 15:49:50 CET 2007
Ross Clement wrote:
> I'm sure I'll be able to steal many of your option settings and reuse
> them. Particularly if I install or have x264.
Here's a commandline that will give you near-lossless x264 encodes with
mencoder. Depending on your usage you might want to turn off bframes
completely, but if you convert to a different format anyway before you
edit, leave as is.
CRF determines the quality here. I'd say 15 is as lossless as you can
get, but I use 18 on nearly everything, sometimes even 19. Experiment
with 10 and 18 and see if you can tell the difference. Generally, <15 is
considered a waste of bits, but YMMV depending on the source.
m4g_hrm_v2.cfg is a custom matrix, find it on forum.doom9.org. for very
grainy material, you should search for prestige_cqm.cfg as it is
superior for grain preservation.
CRF=18
THREADS=$number_of_cores+1 or auto
DEBLOCK=-3,-3
OUTFILE=destination.264
INFILE=source.avi
mencoder -vf scale -oac pcm -nosound -lavdopts threads=2 -x264encopts
crf=$CRF:threads=$THREADS:cqm=m4g_hrm_v2.cfg:deblock=$DEBLOCK:bframes=3:b_pyramid:bime:weight_b:brdo:me=umh:frameref=5:mixed_refs:subq=7:trellis=1:8x8dct:nofast_pskip:nopsnr:nossim:direct_pred=auto
-ovc x264 -of rawvideo -o $OUTFILE $INFILE
Furthermore, if you have a lot of dark video material, you'll want to
have a look at the x264 AQ patch.
Note that this is a one-pass; you don't need a two pass unless you need
a specific target bitrate. For archiving you shouldn't restrict yourself
to a bitrate floor due to wasted space, nor ceiling due to quality loss.
Hence a one-pass CRF. More technical info is on forums.doom9.org.
Good luck!
More information about the MEncoder-users
mailing list