Inhalt nur in Englisch verf├╝gbar

mencoder: useful options

Keywords: mencoder, video
Versions: mencoder 1.0pre7

  • Resolutions should always be dividable by 16
  • borders should be cut off

When ripping a dvd:

#!/bin/bash
for pass in 1 2
do
        mencoder -dvd 1 \ 
                -oac mp3lame \ 
                -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=$pass:aspect=1.78/1
done

When reencoding only the video portion of an existing file:

#!/bin/bash
for pass in 1 2
do
        mencoder \ 
                raw.avi \ 
                -oac copy \ 
                -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=$pass
done

When ripping a dvd stored in a filesystem using constant quant., as well as scropping and scaling to make a perfect fit and adjusting volume:

mencoder dvd://14 \ 
         -dvd-device . \ 
         -mc 0 \ 
         -af volume=10 \ 
         -vf crop=714:427:3:75,scale=704:416 \ 
         -force-avi-aspect 21:9 \ 
         -oac lavc \ 
         -ovc lavc \ 
         -lavcopts acodec=ac3:abitrate=160:vcodec=mpeg4:vqscale=3.25:vhq:v4mv \ 
         -o movie.avi

When recording live tv or vhs:

#!/bin/bash
mencoder \ 
        -tv on:driver=v4l:device=/dev/video1:input=1:width=384:height=288:amode=1:forcechan=2:alsa:audioid=0 \ 
        -oac mp3lame \ 
        -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000

When creating a dvd from file:

mencoder \
        -vf scale=720:576,harddup \
        -srate 48000 -af lavcresample=48000 \
        -oac lavc \
        -ovc lavc \
        -lavcopts acodec=ac3:abitrate=192:vcodec=mpeg2video:keyint=12:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=4000:aspect=16/9 \
        -ofps 25 \
        -of mpeg -mpegopts format=dvd
        -o movie.mpg movie.avi

http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html

Related notes for 'mencoder':
mplayer: compile in SuSE Linux 9.x

Related notes for 'video':
mplayer: work around poor quality mp2 audio playback

Kommentare