PDA

View Full Version : mencoder x264 aac insane presets


StamoS
27th February 2007, 19:55
I start using this command

mencoder TOY.ts -mc 0 -of rawvideo -ovc x264 -oac pcm -o video.264 -x264encopts deblock=-2,-1:bframes=3:frameref=4:threads=auto:b_pyramid:nofast_pskip:nopsnr:bitrate=762:pass=1:turbo=2 -vf scale=720:406,harddup

I want to create an avi (mp4 mkv are also ok):
video
avc x264
720 x 406 (resize)
deinterlaced (interlaced source)
762 kbps
audio
aac
stereo
128 kbps

I am trying to modify the command so that I get the BEST quality without taking into account the enc/dec speed. I am looking for the INSANE quality presets (best resize, deinterlace, 3passes, blah blah..).

The goal is to create a bash script to batch encode stuff. When it is done I ll post it
Could anyone help me fill the gaps?

giandrea
28th February 2007, 02:30
I start using this command

mencoder TOY.ts -mc 0 -of rawvideo -ovc x264 -oac pcm -o video.264 -x264encopts deblock=-2,-1:bframes=3:frameref=4:threads=auto:b_pyramid:nofast_pskip:nopsnr:bitrate=762:pass=1:turbo=2 -vf scale=720:406,harddup

I want to create an avi (mp4 mkv are also ok):
video
avc x264
720 x 406 (resize)
deinterlaced (interlaced source)
762 kbps
audio
aac
stereo
128 kbps

I am trying to modify the command so that I get the BEST quality without taking into account the enc/dec speed. I am looking for the INSANE quality presets (best resize, deinterlace, 3passes, blah blah..).

The goal is to create a bash script to batch encode stuff. When it is done I ll post it
Could anyone help me fill the gaps?

For the best software scaler algorithm, use lanczos, so "-sws 9".
For the best deinterlacer use -vf yadif=0:0 or yadif=0:1, depending on the field dominance of your interlaced material.
If you want to go even further (and much much slower), you could try yadif + mcdeint, just make sure that mcdeint takes one frame for each field; so you will have to use yadif= 1 or 3. See the MPlayer man pages for more details.
About 3 passes, I think they are only needed if you want to reach very closely a target bitrate.