rendered paste bodymencoder dvd://1 -chapter 1-1 -nosound -ovc xvid -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -xvidencopts fixed_quant=2:me_quality=4:max_bframes=2:trellis:cartoon:chroma_opt:hq_ac:vhq=4:max_key_interval=240 $filename -o video.avi
mencoder dvd://1 -chapter 1-1 -nosound -ovc xvid -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -xvidencopts fixed_quant=2:me_quality=4:max_bframes=2:trellis:vhq=2:bvhq=1:chroma_opt:cartoon:chroma_opt:bitrate=1400 $filename -o video.avi
mencoder dvd://1 -chapter 1-1 -nosound -ovc xvid -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -xvidencopts fixed_quant=2:me_quality=6:vhq=2:bvhq=1:chroma_me:me_quality=6:chroma_opt:cartoon:bitrate=1600 $filename -o video.avi
mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o /dev/null
mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 -oac copy -o output.avi
mencoder dvd://1 -chapter 1-1 -nosound -ovc xvid -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -xvidencopts vhq=2:bvhq=1:chroma_me:me_quality=6:chroma_opt:cartoon:bitrate=1400 $filename -o video.avi
mencoder -nosound -ovc xvid -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -xvidencopts fixed_quant=2:me_quality=6:max_bframes=2:bquant_ratio=150:bquant_offset=75:bf_threshold=0:trellis:cartoon:chroma_opt:hq_ac:vhq=4:max_key_interval=240 $filename -o video.avi
mplayer dvd://1 -frames 0 -identify
SUBS
mencoder dvd://1 -chapter 6-10 -vobsubout subtitles -vobsuboutindex 0 -sid 0 -nosound -ovc copy -o /dev/null
two passes
mencoder $filepath -nosound -ovc lavc -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -lavcopts vcodec=mpeg4:vhq:trell:vpass=1:vbitrate=1250 -ofps 24000/1001 -o /dev/null && mencoder $filepath -nosound -ovc lavc -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -lavcopts vcodec=mpeg4:vhq:trell:vpass=2:vbitrate=1250 -ofps 24000/1001 -o video.avi
mencoder $filepath -nosound -ovc lavc -ofps 24000/1001 -sws 2 -vf pullup,softskip,harddup -lavcopts vcodec=mpeg4:vhq:trell:vpass=1:vbitrate=1132 -ofps 24000/1001 -o video.avi
AUDIO WAV
mplayer -vo null -vc dummy -ao pcm:file=output.wav input
a) Extract the audio to PCM audio:
mplayer -ao pcm -aofile audio.wav -vo null -vc dummy dvd://1
b) Normalize the sound (optional)
normalize audio.wav
c) Encode the audio to Vorbis:
oggenc -q3 -oaudio-q3.ogg audio.wav
d) Somehow calculate the bitrate for your video. Use something like...
video_size = (target_size - audio-size) / 1.005
video_bitrate = video_size / length / 1024 * 8
target_size, audio_size in bytes
length in seconds
1.005 is the overhead caused by putting the streams into an Matroska file
(about 0.5%, that's correct ;)).
video_bitrate will be in kbit/s
e) Use the two-pass encoding for the video:
mencoder -dvd 1 -oac copy -ovc lavc \
-lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vqmin=2:vpass=1 \
-vop scale=....,crop=..... \
-o /dev/null
mencoder -dvd 1 -oac copy -ovc lavc \
-lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vqmin=2:vpass=2 \
-vop scale=....,crop=..... \
-o movie.avi
f) Merge:
mkvmerge -o movie.mkv -A movie.avi audio-q3.ogg