Rip a DVD and encode as Xvid with mencoder

  • 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

How to setup NFS share from Ubuntu Linux in Xtreamer

A have an Xtreamer multimedia player.

It can access and mount NFS shares.

In my Ubuntu computer I have to edit the /etc/exports file and insert:

/[Ubuntu_folder] [xtreamer_ip](ro,async,no_subtree_check,all_squash)

The corresponding NFS configuration line in Xtreamer is:

/NFS Shortcut/[xtreamer_mountpoint] ->[ubuntu_computer_ip]:/[Ubuntu_folder] -o rsize=32768,wsize=32768,tcp

Do not forget to port forward the 2049 port (NFS) in the router.