2006-10-31 12:23:38 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2003-09-21 13:05:42 +00:00
|
|
|
<!-- $Revision$ -->
|
2003-03-23 23:35:12 +00:00
|
|
|
<chapter id="cd-dvd">
|
|
|
|
<title>CD/DVD usage</title>
|
|
|
|
|
|
|
|
<sect1 id="drives">
|
|
|
|
<title>CD/DVD drives</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
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:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>
|
2006-12-08 11:38:06 +00:00
|
|
|
There have been reports of read errors at high speeds, especially
|
|
|
|
with badly pressed CD-ROMs. Reducing the speed can prevent data loss under
|
|
|
|
these circumstances.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para></listitem>
|
|
|
|
|
|
|
|
<listitem><para>
|
2006-12-08 11:38:06 +00:00
|
|
|
Many CD-ROM drives are annoyingly loud, a lower speed may reduce the noise.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2006-12-08 11:38:06 +00:00
|
|
|
<!-- ********** -->
|
|
|
|
|
2005-07-01 09:33:27 +00:00
|
|
|
<sect2 id="drives_linux">
|
|
|
|
<title>Linux</title>
|
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<para>
|
2005-07-01 09:33:27 +00:00
|
|
|
You can reduce the speed of IDE CD-ROM drives with <command>hdparm</command>,
|
|
|
|
<command>setcd</command> or <command>cdctl</command>. It works like this:
|
2003-03-31 22:31:35 +00:00
|
|
|
<screen>hdparm -E <replaceable>[speed]</replaceable> <replaceable>[cdrom device]</replaceable></screen>
|
|
|
|
<screen>setcd -x <replaceable>[speed]</replaceable> <replaceable>[cdrom device]</replaceable></screen>
|
2005-07-01 09:33:27 +00:00
|
|
|
<screen>cdctl -bS <replaceable>[speed]</replaceable></screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If you are using SCSI emulation, you might have to apply the settings to the
|
|
|
|
real IDE device, not the emulated SCSI device.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2003-09-21 12:59:13 +00:00
|
|
|
If you have root privileges the following command may also help:
|
2003-03-31 22:31:35 +00:00
|
|
|
<screen>echo file_readahead:2000000 > /proc/ide/<replaceable>[cdrom device]</replaceable>/settings</screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This sets prefetched file reading to 2MB, which helps with scratched CD-ROMs.
|
|
|
|
If you set it to too high, the drive will continuously spin up and down, and
|
|
|
|
will dramatically decrease the performance.
|
2006-12-08 11:38:06 +00:00
|
|
|
It is recommended that you also tune your CD-ROM drive
|
|
|
|
with <command>hdparm</command>:
|
2005-07-01 09:33:27 +00:00
|
|
|
<screen>hdparm -d1 -a8 -u1 <replaceable>[cdrom device]</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2006-12-08 11:38:06 +00:00
|
|
|
This enables DMA access, read-ahead, and IRQ unmasking (read the
|
|
|
|
<command>hdparm</command> man page for a detailed explanation).
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2006-12-08 11:38:06 +00:00
|
|
|
Please refer to
|
2006-12-14 13:49:57 +00:00
|
|
|
"<filename>/proc/ide/<replaceable>[cdrom device]</replaceable>/settings</filename>"
|
2003-03-23 23:35:12 +00:00
|
|
|
for fine-tuning your CD-ROM.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2006-12-08 11:38:06 +00:00
|
|
|
SCSI drives do not have a uniform way of setting these parameters (Do you know
|
|
|
|
one? Tell us!) There is a tool that works for
|
2003-03-23 23:35:12 +00:00
|
|
|
<ulink url="http://das.ist.org/~georg/">Plextor SCSI drives</ulink>.
|
|
|
|
</para>
|
2005-07-01 09:33:27 +00:00
|
|
|
</sect2>
|
|
|
|
|
2006-12-08 11:38:06 +00:00
|
|
|
<!-- ********** -->
|
2005-07-01 09:33:27 +00:00
|
|
|
|
|
|
|
<sect2 id="drives_freebsd">
|
|
|
|
<title>FreeBSD</title>
|
|
|
|
|
|
|
|
<para>speed:
|
|
|
|
<screen>
|
|
|
|
cdcontrol [-f <replaceable>device</replaceable>] speed <replaceable>[speed]</replaceable>
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>DMA:
|
|
|
|
<screen>
|
|
|
|
sysctl hw.ata.atapi_dma=1
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
</sect1>
|
|
|
|
|
2005-07-01 09:33:27 +00:00
|
|
|
|
2006-12-08 11:38:06 +00:00
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
|
2005-07-01 09:33:27 +00:00
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<sect1 id="dvd">
|
|
|
|
<title>DVD playback</title>
|
2006-12-08 11:38:06 +00:00
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<para>
|
|
|
|
For the complete list of available options, please read the man page.
|
2006-10-22 20:25:35 +00:00
|
|
|
The syntax to play a standard DVD is as follows:
|
2006-12-08 11:38:06 +00:00
|
|
|
<screen>
|
|
|
|
mplayer dvd://<replaceable><track></replaceable> [-dvd-device <replaceable><device></replaceable>]
|
|
|
|
</screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2006-10-22 20:25:35 +00:00
|
|
|
<screen>mplayer dvd://1 -dvd-device /dev/hdc</screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
|
2006-09-08 09:05:03 +00:00
|
|
|
<para>
|
|
|
|
If you have compiled <application>MPlayer</application> with dvdnav support, the
|
|
|
|
syntax is the same, except that you need to use dvdnav:// instead of dvd://.
|
|
|
|
</para>
|
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<para>
|
|
|
|
The default DVD device is <filename>/dev/dvd</filename>. If your setup
|
|
|
|
differs, make a symlink or specify the correct device on the command
|
|
|
|
line with the <option>-dvd-device</option> option.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<application>MPlayer</application> uses <systemitem>libdvdread</systemitem> and
|
2006-10-22 20:25:35 +00:00
|
|
|
<systemitem>libdvdcss</systemitem> for DVD playback and decryption. These two
|
2006-11-03 14:02:08 +00:00
|
|
|
libraries are contained in the
|
|
|
|
<application>MPlayer</application> source tree, you do not have
|
2006-10-12 13:41:57 +00:00
|
|
|
to install them separately. You can also use system-wide versions of the two
|
|
|
|
libraries, but this solution is not recommended, as it can result in bugs,
|
2003-03-23 23:35:12 +00:00
|
|
|
library incompatibilities and slower speed.
|
|
|
|
</para>
|
|
|
|
|
2003-10-03 07:51:29 +00:00
|
|
|
<note><para>
|
|
|
|
In case of DVD decoding problems, try disabling supermount, or any other such
|
2006-01-18 21:50:03 +00:00
|
|
|
facilities. Some RPC-2 drives may also require setting the region code.
|
2003-10-03 07:51:29 +00:00
|
|
|
</para></note>
|
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<formalpara>
|
2006-10-22 20:25:35 +00:00
|
|
|
<title>DVD decryption</title>
|
2003-03-23 23:35:12 +00:00
|
|
|
<para>
|
2006-10-22 20:25:35 +00:00
|
|
|
DVD decryption is done by <systemitem>libdvdcss</systemitem>. The method
|
|
|
|
can be specified through the <envar>DVDCSS_METHOD</envar> environment
|
2006-10-25 12:08:28 +00:00
|
|
|
variable, see the manual page for details.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
|
|
|
</formalpara>
|
|
|
|
|
2007-09-05 20:50:35 +00:00
|
|
|
<sect2 id="region_code">
|
|
|
|
<title>region code</title>
|
2003-03-23 23:35:12 +00:00
|
|
|
<para>
|
2007-09-05 20:50:35 +00:00
|
|
|
DVD drives nowadays come with a nonsensical restriction labeled
|
|
|
|
<ulink url="http://en.wikipedia.org/wiki/DVD_region_code">region code</ulink>.
|
|
|
|
This is a scheme to force DVD drives to only accept DVDs produced for one of
|
|
|
|
the six different regions into which the world was partitioned. How a group
|
|
|
|
of people can sit around a table, come up with such an idea and expect the
|
|
|
|
world of the 21st century to bow to their will is beyond anyone's guess.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
2007-09-05 20:50:35 +00:00
|
|
|
|
|
|
|
<para>
|
|
|
|
Drives that enforce region settings through software only are also known as
|
|
|
|
RPC-1 drives, those that do it in hardware as RPC-2. RPC-2 drives allow
|
|
|
|
changing the region code five times before it remains fixed.
|
|
|
|
Under Linux you can use the
|
|
|
|
<ulink url="http://linvdr.org/projects/regionset/">regionset</ulink> tool
|
|
|
|
to set the region code of your DVD drive.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Thankfully, it is possible to convert RPC-2 drives into RPC-1 drives through
|
|
|
|
a firmware upgrade. Feed the model number of your DVD drive into your favorite
|
|
|
|
search engine or have a look at the forum and download sections of
|
|
|
|
<ulink url="http://www.rpc1.org/">"The firmware page"</ulink>.
|
|
|
|
While the usual caveats for firmware upgrades apply, experience with
|
|
|
|
getting rid of region code enforcement is generally positive.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
</sect1>
|
|
|
|
|
2005-07-01 09:33:27 +00:00
|
|
|
|
2006-12-08 11:38:06 +00:00
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
|
2005-07-01 09:33:27 +00:00
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<sect1 id="vcd">
|
|
|
|
<title>VCD playback</title>
|
2006-12-08 11:38:06 +00:00
|
|
|
|
2003-03-23 23:35:12 +00:00
|
|
|
<para>
|
2006-12-08 11:38:06 +00:00
|
|
|
For the complete list of available options, please read the man page. The
|
|
|
|
Syntax for a standard Video CD (VCD) is as follows:
|
2003-05-29 13:19:37 +00:00
|
|
|
<screen>mplayer vcd://<replaceable><track></replaceable> [-cdrom-device <replaceable><device></replaceable>]</screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
Example:
|
2006-10-23 07:03:38 +00:00
|
|
|
<screen>mplayer vcd://2 -cdrom-device /dev/hdc</screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
The default VCD device is <filename>/dev/cdrom</filename>. If your setup
|
|
|
|
differs, make a symlink or specify the correct device on the command line
|
|
|
|
with the <option>-cdrom-device</option> option.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<note><para>
|
|
|
|
At least Plextor and some Toshiba SCSI CD-ROM drives have horrible performance
|
2004-11-19 11:15:58 +00:00
|
|
|
reading VCDs. This is because the CDROMREADRAW <systemitem>ioctl</systemitem>
|
2003-03-23 23:35:12 +00:00
|
|
|
is not fully implemented for these drives. If you have some knowledge of SCSI
|
|
|
|
programming, please <ulink url="../../tech/patches.txt">help us</ulink>
|
|
|
|
implement generic SCSI support for VCDs.
|
|
|
|
</para></note>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
In the meantime you can extract data from VCDs with
|
2006-09-07 23:46:38 +00:00
|
|
|
<ulink url="http://ftp.ntut.edu.tw/ftp/OS/Linux/packages/X/viewers/readvcd/">readvcd</ulink>
|
2003-03-23 23:35:12 +00:00
|
|
|
and play the resulting file with <application>MPlayer</application>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<formalpara>
|
|
|
|
<title>VCD structure</title>
|
2004-12-14 11:32:35 +00:00
|
|
|
<para>
|
|
|
|
A Video CD (VCD) is made up of CD-ROM XA sectors, i.e. CD-ROM mode 2
|
2006-12-08 11:38:06 +00:00
|
|
|
form 1 and 2 tracks:
|
2003-03-23 23:35:12 +00:00
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>
|
2006-12-08 11:38:06 +00:00
|
|
|
The first track is in mode 2 form 2 format which means it uses L2
|
|
|
|
error correction. The track contains an ISO-9660 filesystem with 2048
|
|
|
|
bytes/sector. This filesystem contains VCD metadata information, as
|
|
|
|
well as still frames often used in menus. MPEG segments for menus can
|
|
|
|
also be stored in this first track, but the MPEGs have to be broken up
|
|
|
|
into a series of 150-sector chunks. The ISO-9660 filesystem may
|
|
|
|
contain other files or programs that are not essential for VCD
|
|
|
|
operation.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para></listitem>
|
|
|
|
|
|
|
|
<listitem><para>
|
2006-12-08 11:38:06 +00:00
|
|
|
The second and remaining tracks are generally raw 2324 bytes/sector
|
|
|
|
MPEG (movie) tracks, containing one MPEG PS data packet per
|
|
|
|
sector. These are in mode 2 form 1 format, so they store more data per
|
|
|
|
sector at the loss of some error correction. It is also legal to have
|
|
|
|
CD-DA tracks in a VCD after the first track as well.
|
|
|
|
On some operating systems there is some trickery that goes on to make
|
|
|
|
these non-ISO-9660 tracks appear in a filesystem. On other operating
|
|
|
|
systems like GNU/Linux this is not the case (yet). Here the MPEG data
|
|
|
|
<emphasis role="bold">cannot be mounted</emphasis>. As most movies are
|
|
|
|
inside this kind of track, you should try <option>vcd://2</option>
|
|
|
|
first.
|
|
|
|
</para></listitem>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
|
|
|
<listitem><para>
|
2006-12-08 11:38:06 +00:00
|
|
|
There exist VCD disks without the first track (single track and no filesystem
|
|
|
|
at all). They are still playable, but cannot be mounted.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para></listitem>
|
2004-12-14 11:32:35 +00:00
|
|
|
|
2006-12-08 11:38:06 +00:00
|
|
|
<listitem><para>
|
|
|
|
The definition of the Video CD standard is called the
|
|
|
|
Philips "White Book" and it is not generally available online as it
|
|
|
|
must be purchased from Philips. More detailed information about Video
|
|
|
|
CDs can be found in the
|
|
|
|
<ulink url="http://www.vcdimager.org/pub/vcdimager/manuals/0.7/vcdimager.html#SEC4">vcdimager documentation</ulink>.
|
2004-12-14 11:32:35 +00:00
|
|
|
</para></listitem>
|
2003-03-23 23:35:12 +00:00
|
|
|
</itemizedlist>
|
2006-12-08 11:38:06 +00:00
|
|
|
</para>
|
|
|
|
</formalpara>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
|
|
|
<formalpara>
|
|
|
|
<title>About .DAT files</title>
|
|
|
|
<para>
|
|
|
|
The ~600 MB file visible on the first track of the mounted VCD is not a real
|
|
|
|
file! It is a so called ISO gateway, created to allow Windows to handle such
|
|
|
|
tracks (Windows does not allow raw device access to applications at all).
|
|
|
|
Under Linux you cannot copy or play such files (they contain garbage). Under
|
|
|
|
Windows it is possible as its iso9660 driver emulates the raw reading of
|
|
|
|
tracks in this file. To play a .DAT file you need the kernel driver which can
|
|
|
|
be found in the Linux version of PowerDVD. It has a modified iso9660 filesystem
|
|
|
|
(<filename>vcdfs/isofs-2.4.X.o</filename>) driver, which is able to emulate the
|
|
|
|
raw tracks through this shadow .DAT file. If you mount the disc using their
|
2006-12-08 11:38:06 +00:00
|
|
|
driver, you can copy and even play .DAT files with
|
|
|
|
<application>MPlayer</application>. But it will not
|
2003-05-25 19:15:01 +00:00
|
|
|
work with the standard iso9660 driver of the Linux kernel! Use
|
|
|
|
<option>vcd://</option> instead. Alternatives for VCD copying are the
|
2003-03-23 23:35:12 +00:00
|
|
|
new <ulink url="http://www.elis.rug.ac.be/~ronsse/cdfs/">cdfs</ulink> kernel
|
2006-12-08 11:38:06 +00:00
|
|
|
driver (not part of the official kernel) that shows CD sessions as image files
|
|
|
|
and <ulink url="http://cdrdao.sf.net/">cdrdao</ulink>, a bit-by-bit
|
2003-03-23 23:35:12 +00:00
|
|
|
CD grabbing/copying application.
|
|
|
|
</para>
|
|
|
|
</formalpara>
|
|
|
|
</sect1>
|
|
|
|
</chapter>
|