I have written a shell script called dvdmovie to play the main movie from a video DVD using MPlayer. The script looks for the longest title on the DVD using MPlayer's -identify option. The longest title is then played. Additional MPlayer options can be specified on the command line.
dvdmovie [MPLAYER_OPTIONS]
dvdmovie looks for a configuration file called .dvdmovierc in the user's home directory. If it is found, DVD specific settings are read from it.
Alternatively, configuration can be stored in
$XDG_CONFIG_HOME/dvdmovierc
(if the environment variable
XDG_CACHE_DIR
is unset or empty,
$HOME/.config
is used instead). This file is only used
when $HOME/.dvdmovierc
is not readable.
NOTE: The .dvdmovierc format changed on 2012-09-07 from using : (colon) as field separator to using ; (semicolon) to support MPlayer suboptions. You can convert your .dvdmovierc with GNU sed:
sed -i 'y/:/;/' $HOME/.dvdmovierc
dvdmovie dvdmovie -dvd-device DVD.img dvdmovie -alang fr -slang de
$ dvdmovie Looking for movie title on DVD, this can take some time...done. Longest title on DVD A19692A78DD467BBE9E923963E561558 is no. 3 (75 min.). Adding options -alang es -sid 1 from /home/auerswald/.dvdmovierc. Playing DVD title 3 with options -really-quiet -alang es -sid 1.
$ dvdmovie -ao alsa:device=hw=1 Looking for movie title on DVD, this can take some time...done. Longest title on DVD A75C41BB787AD7E3579077E5C5FD6799 is no. 1 (118 min.). Using title 2 from /home/auerswald/.dvdmovierc instead. Adding options -ao alsa:device=hw=1 from command line. Playing DVD title 2 with options -really-quiet -ao alsa:device=hw=1.
$ dvdmovie Looking for movie title on DVD, this can take some time...done. Longest title on DVD A19692A78DD467BBE9E923963E561558 (REC) is no. 3 (75 min.). Found /home/auerswald/.dvdmovierc entry '[•REC]'. Adding options -alang es -sid 1 from /home/auerswald/.dvdmovierc. Playing DVD title 3 with options -really-quiet -alang es -sid 1 [-really-quiet -alang es -sid 1 dvd://3].
$ dvdmovie Looking for movie title on DVD, this can take some time...done. Longest title on DVD A75C41BB787AD7E3579077E5C5FD6799 (HarryBrown_AK_V) is no. 1 (118 min.). Found /home/auerswald/.dvdmovierc entry 'Harry Brown'. Using title 2 from /home/auerswald/.dvdmovierc instead of longest. Playing DVD title 2 with options -really-quiet [-really-quiet dvd://2].
$ dvdmovie Looking for movie title on DVD, this can take some time...done. Longest title on DVD CFA382B9BA94DD9A4954B90F6CAECC33 (<Die Horde>) is no. 30 (111 min.). Found /home/auerswald/.dvdmovierc entry 'La Horde'. Using title 8 from /home/auerswald/.dvdmovierc instead of longest. Adding options -alang fr -slang de from /home/auerswald/.dvdmovierc. Playing DVD title 8 with options -really-quiet -alang fr -slang de [-really-quiet -alang fr -slang de dvd://8].
$ dvdmovie Looking for movie title on DVD, this can take some time...done. Longest title on DVD 0D74B08BDBD35645A5C508AC8C5EAC50 (REC_GENESIS) is no. 18 (77 min.). Found /home/auerswald/.dvdmovierc entry '[•REC]³ Génesis'. Adding options -alang es -slang de from /home/auerswald/.dvdmovierc. Playing DVD title 18 with options -really-quiet -alang es -slang de [-really-quiet -alang es -slang de dvd://18].
MPlayer does not support a list of DVD titles to play, but one can use a simple hack with dvdmovie:
$ dvdmovie Looking for movie title on DVD, this can take some time...done. Longest title on DVD 29C6E9DCBC3465E5C5EC99854FB2B262 (DVDVOLUME) is no. 5 (55 min.). Found /home/auerswald/.dvdmovierc entry 'Narcos S1 D1'. Using title 3 from /home/auerswald/.dvdmovierc instead of longest. Adding options -fixed-vo -sid 2 dvd://5 dvd://2 from /home/auerswald/.dvdmovierc. Playing DVD title 3 with options -really-quiet -fixed-vo -sid 2 dvd://5 dvd://2 [-really-quiet -fixed-vo -sid 2 dvd://5 dvd://2 dvd://3].
mplayer dvd://TITLE
, e.g.
mplayer dvd://3
for title number 3.
The dvdmovie script above does this automatically.
mplayer -v -nofs dvdnav:// 2>&1 | fgrep -i 'new title'
mplayer -nocache -mouse-movements dvdnav://
sudo swapoff -a
).
I have written some patches for MPlayer to improve DVD playback.
back to my homepage.