mpv/DOCS/cd-dvd.html

164 lines
6.9 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<LINK REL="stylesheet" TYPE="text/css" HREF="default.css">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<P><B><A NAME=4.1>4.1. CD-ROM drives</A></B></P>
<P>Playing standard Video CDs:</P>
<P>
mplayer -vcd <I>trackno</I> [-cdrom-device device]<BR><BR>
Examples:<BR>
mplayer -vcd 1<BR>
mplayer -fs -vcd 2 -cdrom-device /dev/hdc<BR>
</P>
<P>
Notes:<BR>
- 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!<BR>
- 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!<BR>
- the default VCD device is /dev/cdrom. if your device differs, then you have
to make a symlink, or specify it in command line!
</P>
<P>From Linux documentation:</P>
<P>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.</P>
<P>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 :</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>setcd -x [speed] [cdrom device]</CODE></P>
<P>Also you can try:</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>echo current_speed:4 >/proc/ide/[cdrom device]/settings</CODE></P>
<P>but you'll need root privileges. I use following command too:</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>echo file_readahead:2000000 >/proc/ide/[cdrom device]/settings</CODE></P>
<P>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:</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>hdparm -d1 -a8 -u1 (cdrom device)</CODE></P>
<P>to enable using DMA access, readahead, and IRQ unmasking.
(if you don't understand these, *read the hdparm man page*)</P>
<P>Please refer to "<CODE>/proc/ide/[cdrom device]/settings</CODE>" for fine-tuning your
CDROM.</P>
<P><B><A NAME=4.2>4.2. DVD playback</A></B></P>
<P><B>MPlayer</B> uses <CODE>libdvdread</CODE> and <CODE>libdvdcss</CODE> for
DVD decryption and playing. These two libraries are contained in the
<CODE>libmpdvdkit/</CODE> subdirectory in the <B>MPlayer</B> tree, you
don't have to install them separately. We opt for this solution because
we had to fix a libdvdread bug, and apply a patch which adds
<B>cracked CSS keys caching support</B> for libdvdcss (results in large
speed increase before playing). These cracked keys are stored in
<CODE>$HOME/.mplayer/DVDKeys</CODE> directory.</P>
<P>Support for <CODE>dvdnav</CODE> is being added (not usable now).</P>
<P><B>Old-style DVD support - <I>OPTIONAL</I></B></P>
<P>Useful if you want to play encoded VOB's from hard disk. Compile and
install <B>libcss</B> 0.0.1 (not newer) (if <B>MPlayer</B> can't detect
it, use the <CODE>-csslib /path/to/libcss.so</CODE> option).</P>
<P><B>Compile MPlayer.</B></P>
<P>Run <CODE>./configure</CODE>. If you didn't delete
<CODE>libmpdvdkit</CODE> subdirectory from MPlayer tree, ./configure should
say the following:</P>
<P><CODE>Checking for DVD support (libmpdvdkit) ... yes</CODE></P>
<P>(of course you can put your favourite configure options into the command
line when you run ./configure)</P>
<P><B>MPlayer</B> can use <CODE>libdvdread</CODE> and <CODE>libdvdcss</CODE>
libraries installed system-wide, but this solution is NOT RECOMMENDED, as
can result in bugs, library incompatibilities, and slower speed.</P>
<P>Either way, say: <CODE>make</CODE>, then <CODE>make install</CODE>.</P>
<P><B>Using MPlayer to play DVDs:</B></P>
<TABLE BORDER=0 WIDTH="100%"><TR>
<TD VALIGN=top>-dvd &lt;title_id&gt;&nbsp;</TD>
<TD>Enables DVD support and selects title.</TD><TR>
<TD VALIGN=top>-chapter &lt;chapter_id&gt;&nbsp;</TD>
<TD>Selects DVD chapter(s) to play (default: play from chapter 1).
Example : <CODE>-chapter 5-10</CODE> or <CODE>-chapter -9</CODE></TD><TR>
<TD VALIGN=top>-dvdangle &lt;angle_id&gt;&nbsp;</TD>
<TD>Selects camera angle (default: 1)</TD><TR>
<TD VALIGN=top>-alang &lt;country code&gt;&nbsp;</TD>
<TD> The <CODE>country code</CODE> tells <B>MPlayer</B> which audio language(s) to prefer.
For the list of available languages, add <CODE>-v</CODE> option after
your DVD options, and browse the output.<BR>
For example :<BR>
&nbsp;&nbsp;<CODE>-alang hu,en</CODE> - first tries to find hungarian
audio, and if not found, decode english audio.</TD><TR>
<TD VALIGN=top>-slang &lt;country code&gt;&nbsp;</TD>
<TD> Turns on DVD subtitles. The <CODE>country code</CODE> tells <B>MPlayer</B>
which language(s) to prefer.
For the list of available languages, add <CODE>-v</CODE> option after
your DVD options, and browse the output.<BR>
For example :<BR>
&nbsp;&nbsp;<CODE>-slang hu,en</CODE> - first tries to display hungarian
subtitles, and if not found, display english subtitles.</TD><TR>
<TD VALIGN=top>-sid &lt;subtitle_id&gt;&nbsp;</TD>
<TD> Displays a subtitle channel with the given <CODE>id</CODE> (values can be
0-31). Useful for example with badly mastered DVDs where country code
selects the wrong channel.</TD><TR>
<TD VALIGN=top>-csslib &lt;path/filename&gt;</TD>
<TD> (old-style DVD option) This option is used to override the default location
of <CODE>libcss.so</CODE>
</TD><TR>
<TD VALIGN=top>-dvdauth &lt;DVD device&gt;&nbsp;</TD>
<TD> (old-style DVD option) Turns on DVD authentication using the given device.
</TD><TR>
<TD VALIGN=top>-dvdkey &lt;CSS key&gt;</TD>
<TD> (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).
</TD>
</TABLE>
<P>Default device is <CODE>/dev/dvd</CODE>, you can change it in config.h
(compile time option), or you can specify it using the -dvd-device option :
</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>mplayer -dvd 1 -dvd-device /dev/dvd</CODE></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>mplayer -dvd 1 -slang en -dvd-device /dev/dvd</CODE></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>mplayer -dvd 1 -slang en -dvd-device /dev/dvd -chapter 20-25</CODE></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>mplayer -dvd 2 -alang sp -chapter 5 -dvdangle 2</CODE></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>mplayer -dvdauth /dev/dvd /mnt/cd/video_ts/vts_03_1.vob</CODE></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>mplayer -dvdkey C005D4A16D vts_03_1.vob</CODE></P>
</BODY>
</HTML>