4.1. CD-ROM drives

Linux documentation excerpt:

Modern CD-ROM drives can attain very high head speeds, yet some CD-ROM drives are capable of running at reduced speeds. There are several reasons that might make you consider changing the speed of a CD-ROM drive:

You can reduce the drive speed with hdparm or a program called setcd. It works like this:

    hdparm -E [speed] [cdrom device]

    setcd -x [speed] [cdrom device]

You can also try

    echo current_speed:4 >/proc/ide/[cdrom device]/settings

but you will need root privileges. The following command may also help:

    echo file_readahead:2000000 >/proc/ide/[cdrom device]/settings

This sets prefetched file reading to 2MB, which helps with scratched CD-ROMs. It is recommended that you also tune your CD-ROM drive with hdparm:

    hdparm -d1 -a8 -u1 (cdrom device)

This enables DMA access, read-ahead, and IRQ unmasking (read the hdparm man page for a detailed explanation).

Please refer to "/proc/ide/[cdrom device]/settings" for fine-tuning your CD-ROM.

4.2. DVD playback

MPlayer uses libdvdread and libdvdcss for DVD decryption and playback. These two libraries are contained in the libmpdvdkit/ subdirectory of the MPlayer source tree, you do not have to install them separately. We opted for this solution because we had to fix a libdvdread bug, and apply a patch which adds cracked CSS keys caching support to libdvdcss. This results in a large speed increase because the keys do not have to be cracked every time before playing. The cracked keys are stored in the ~/.mplayer/DVDKeys directory.

MPlayer can also use system-wide libdvdread and libdvdcss libraries, but this solution is not recommended, as it can result in bugs, library incompatibilities, and slower speed.

Support for DVD navigation via dvdnav is being worked on, but not finished yet.

Old-style DVD support - OPTIONAL

Useful if you want to play encoded VOBs from hard disk. Compile and install libcss 0.0.1 (not newer) for this (If MPlayer fails to detect it, use the -csslib /path/to/libcss.so option).

Using MPlayer to play DVDs:

-dvd <title_id>  Enables DVD support and selects title.
-chapter <chapter_id>  Selects DVD chapter(s) to play (default: 1). Example: -chapter 5-10 or -chapter -9
-dvdangle <angle_id>  Selects camera angle (default: 1)
-alang <country code>  The country code tells MPlayer which audio language(s) to prefer. For a list of available languages, add the -v option after your DVD options and browse the output.
For example:
  -alang hu,en - Tries to find Hungarian audio, falling back to English audio.
-slang <country code>  Turns on DVD subtitles. The country code tells MPlayer which language(s) to prefer. For the list of available languages, add the -v option after your DVD options and browse the output.
For example:
  -slang hu,en - Tries to display Hungarian subtitles, falling back to English subtitles.
-sid <subtitle_id>  Displays a subtitle channel with the given id (values can be 0-31). Useful with badly mastered DVDs where the country code selects the wrong channel.
-csslib <path/filename> (old-style DVD option) This option is used to override the default location of libcss.so.
-dvdauth <DVD device>  (old-style DVD option) Turns on DVD authentication using the given device.
-dvdkey <CSS key> (old-style DVD option) When decoding a VOB file copied undecrypted from DVD, this option gives the CSS key needed to decrypt the VOB (the key is printed when authenticating with the DVD drive using -dvdauth).

The default device is /dev/dvd, you can change it in config.h (compile time option), or you can specify it using the -dvd-device option:

    mplayer -dvd 1 -dvd-device /dev/dvd

    mplayer -dvd 1 -slang en -dvd-device /dev/dvd

    mplayer -dvd 1 -slang en -dvd-device /dev/dvd -chapter 20-25

    mplayer -dvd 2 -alang sp -chapter 5 -dvdangle 2

    mplayer -dvdauth /dev/dvd /mnt/cd/video_ts/vts_03_1.vob

    mplayer -dvdkey C005D4A16D vts_03_1.vob

4.3. VCD playback

Playing standard Video CDs:

mplayer -vcd <track> [-cdrom-device device]

Examples:
mplayer -vcd 1
mplayer -fs -vcd 2 -cdrom-device /dev/hdc

Notes: