4.1. CD-ROM drives

Playing standard Video CDs:

mplayer -vcd trackno [-cdrom-device device]

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

Notes:
- Do NOT mount VCD disks and play DAT files directly! It may work under windows but won't work under linux. You have to play them directly, with the -vcd option!
- VCD disks usually have 2 tracks: a data track (containing autostart windows playback program, karaoke data etc) and a mode-2 track (the movie), so try -vcd 2 first!
- the default VCD device is /dev/cdrom. if your device differs, then you have to make a symlink, or specify it in command line!

From Linux documentation:

Some CDROM drives are capable of changing their head-speed. There are several reasons for changing the speed of a CDROM drive. Badly pressed CDROMs may benefit from less-than-maximum head rate. Modern CDROM drives can obtain very high head rates (up to 24-times is common). It has been reported that these drives can make reading errors at these high speeds, reducing the speed can prevent data loss in these circumstances. Finally, some of these drives can make an annoyingly loud noise, which a lower speed may reduce.

The recommended way to do it is with a program called 'setcd' . It's kinda old, but won't be too hard to find on the Net. (UPDATE : new hdparm has an option for this !) Use it with :

    setcd -x [speed] [cdrom device]

Also you can try:

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

but you'll need root privileges. I use following command too:

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

for 2MB prefetched reading from the file (it's useful for scratched CDROMs). It's recommended that you tuneup your CDROM drive also with hdparm:

    hdparm -d1 -a8 -u1 (cdrom device)

to enable using DMA access, readahead, and IRQ unmasking. (if you don't understand these, *read the hdparm manpage*)

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

4.2. DVD playback

Yes, the real DVD support has been arrived. You don't need to play VOB files manually from disk thinking of the purpose of a file in the video_ts directory, you don't need worry it it's an encrypted disk or not (in old MPlayer you had to put '-dvdauth /dev/dvd' into the command line in case of encrypted discs), and you don't need even mount your disk to be able to play (but mounting it makes Linux cache the cracked CSS keys, so the playing will initialize much faster second time).

IMPORTANT NOTE: please _DO_NOT_ require further features for DVD playback. This is the first version of some real DVD support inside MPlayer and we're busy with hunting bugs and implementing basic DVD player features.

MPlayer uses libdvdread which has got built in support for IFO parsing, reading navi blocks and doing authentication/descrambling. libdvdread uses libdvdcss to the latter tasks. So you will need libdvdcss and libdvdread downloaded, compiled and installed BEFORE you run ./configure script of MPlayer which will autodetect libdvdread for you in this way.

Of course after installing libdvdcss and libdvdread you don't need recompile them at each time when you want to recompile MPlayer (from a new CVS version for example) since the needed packages have already been installed on your machine.

Using MPlayer to play DVDs:

-dvd <title_id>  Enables DVD support and selects title.
-chapter <chapter_id>  Selects DVD chapter(s) to play (default: play from chapter 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 the list of available languages, add -v option after your DVD options, and browse the output.
For example :
  -alang hu,en - first tries to find hungarian audio, and if not found, decode 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 -v option after your DVD options, and browse the output.
For example :
  -slang hu,en - first tries to display hungarian subtitles, and if not found, display english subtitles.
-sid <subtitle_id>  Displays a subtitle channel with the given id (values can be 0-31). Useful for example with badly mastered DVDs where 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 from non-DVD, this option gives the CSS key needed to crack the DVD (the key is printed when authenticating with DVD).

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. DVD playback FAQ

Q: Playing a DVD, I encountered this error :
mplayer: ifo_read.c:1143: ifoRead_C_ADT_internal: Assertion nfo_length / sizeof(cell_adr_t) >= c_adt->nr_of_vobs' failed.
A: This is a known libdvdread 0.9.1 bug, it should be already fixed in 0.9.2.
 
Q: Can I compile libdvdread and libdvdcss for example on my sweet Sparc/Solaris?
A: Who knows ... Please test it and send feedback. But it's said that it should work. Please refer documentation of libdvdread and its homepage as well. We're not authors of libdvdread.
 
Q: What about subtitles? Can MPlayer display them?
A: Yes! See above in the DVD chapter.
 
Q: How can I set the region code of my DVD-Drive ? I don't have windows!
A: Use the 'regionset' tool: http://www.linuxtv.org/download/dvd/dvd_disc_20000215.tar.gz
 
Q: So MPlayer can play DVDs? Then it must use DeCSS! You are under arrest under the XYZ#$ paragraph of the--
A: Get back asshole, there is no DeCSS code in MPlayer. MPlayer uses libdvdread by linking against it, and libdvdread uses libdvdcss by dynamic loading it.
 
Q: Do I need to be (setuid) root/setuid fibmap_mplayer to be able to play DVD?
A: No, you don't. Only for old-style DVD support. However of course you must have the proper rights to the DVD device driver entry (in /dev).
 
Q: How can I ... (insert some expectable DVD player feature here)?
A: The current implementation is the first implementation of some real DVD player functionality. First, we would like to target existing bugs and basic features before implementing new features.
 
Q: Where can I get libdvdread and libdvdcss packages from?
A: From the site of Ogle: http://www.dtek.chalmers.se/groups/dvd.
 
Q: Is it possible to play/encode only selected chapters ?
A: Yes, see the -chapter option.