- Determine what is the longest title in the dvd. Usualy it’s the longest:
lsdvd -d /dev/dvd | grep Longest
- Determine the croping to be applied to avoid encoding black bars:
mplayer dvd://[longest_title] -chapter 3 -vf cropdetect
- Based on the correct aspect ratio, decide what will be the desired final resolution. Here are some examples:
480:368 gives AR=1.30:1
656:368 gives AR=1.78:1
720:304 gives AR=2.37:1
704:304 gives AR=2.32:1
- I’m using 2-pass encoding and converting the sound to mp3. Here are the mencoder commands:
mencoder \ dvd://[title_to_encode] \ -vf crop=[cropping],scale=[final_resolution] \ -ovc xvid -xvidencopts chroma_opt:quant_type=mpeg:bitrate=[video_bitrate|-desired_size_in_kB]:pass=1 \ -oac copy \ -o /dev/null mencoder \ dvd://[title_to_encode] \ -vf crop=[cropping],scale=[final_resolution] \ -ovc xvid -xvidencopts chroma_opt:quant_type=mpeg:bitrate=[video_bitrate|-desired_size_in_kB]:pass=2 \ -oacĀ mp3lame -lameopts preset=[audio_bitrate] \ -o [filename].avi