Mercurial > mplayer.hg
annotate DOCS/cd-dvd.html @ 8310:171c99ff2649
.depend should be ignored.
author | diego |
---|---|
date | Thu, 28 Nov 2002 23:14:48 +0000 |
parents | 39d486e8836d |
children | 2222dd8d8b18 |
rev | line source |
---|---|
6405
d0f408a8b150
Background color now set by CSS, added doctype and charset, misc HTML fixes
diego
parents:
6393
diff
changeset
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
1612 | 2 <HTML> |
4982
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4908
diff
changeset
|
3 |
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4908
diff
changeset
|
4 <HEAD> |
6882
f3f87f6bf5cf
Added a uniform title: something - MPlayer - The Movie Player for Linux.
diego
parents:
6879
diff
changeset
|
5 <TITLE>CD, DVD, VCD - MPlayer - The Movie Player for Linux</TITLE> |
6391 | 6 <LINK REL="stylesheet" TYPE="text/css" HREF="default.css"> |
6405
d0f408a8b150
Background color now set by CSS, added doctype and charset, misc HTML fixes
diego
parents:
6393
diff
changeset
|
7 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
4982
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4908
diff
changeset
|
8 </HEAD> |
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4908
diff
changeset
|
9 |
6405
d0f408a8b150
Background color now set by CSS, added doctype and charset, misc HTML fixes
diego
parents:
6393
diff
changeset
|
10 <BODY> |
1704 | 11 |
1612 | 12 |
7047 | 13 <H2><A NAME="drives">4.1 CD/DVD drives</A></H2> |
1682 | 14 |
6877 | 15 <P>Linux documentation excerpt:</P> |
1612 | 16 |
6878 | 17 <P>Modern CD-ROM drives can attain very high head speeds, yet some CD-ROM drives |
18 are capable of running at reduced speeds. There are several reasons that might | |
19 make you consider changing the speed of a CD-ROM drive:</P> | |
20 | |
21 <UL> | |
6960 | 22 <LI>There have been reports of read errors at these high speeds, especially |
6878 | 23 with badly pressed CD-ROMs. Reducing the speed can prevent data loss under |
24 these circumstances.</LI> | |
25 <LI>Many CD-ROM drives are annoyingly loud, a lower speed may reduce the | |
26 noise.</LI> | |
27 </UL> | |
1612 | 28 |
6877 | 29 <P>You can reduce the drive speed with hdparm or a program called setcd. |
30 It works like this:</P> | |
31 | |
32 <P> <CODE>hdparm -E [speed] [cdrom device]</CODE></P> | |
1682 | 33 |
34 <P> <CODE>setcd -x [speed] [cdrom device]</CODE></P> | |
1612 | 35 |
6877 | 36 <P>You can also try</P> |
1682 | 37 |
7076
3275af5787e0
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, slightly
diego
parents:
7048
diff
changeset
|
38 <P> <CODE>echo current_speed:4 > /proc/ide/[cdrom device]/settings</CODE></P> |
1682 | 39 |
6877 | 40 <P>but you will need root privileges. The following command may also help:</P> |
1682 | 41 |
7076
3275af5787e0
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, slightly
diego
parents:
7048
diff
changeset
|
42 <P> <CODE>echo file_readahead:2000000 > /proc/ide/[cdrom device]/settings</CODE></P> |
1612 | 43 |
6877 | 44 <P>This sets prefetched file reading to 2MB, which helps with scratched CD-ROMs. |
45 It is recommended that you also tune your CD-ROM drive with hdparm:</P> | |
1682 | 46 |
47 <P> <CODE>hdparm -d1 -a8 -u1 (cdrom device)</CODE></P> | |
1612 | 48 |
6877 | 49 <P>This enables DMA access, read-ahead, and IRQ unmasking (read the hdparm man |
50 page for a detailed explanation).</P> | |
1612 | 51 |
6877 | 52 <P>Please refer to "<CODE>/proc/ide/[cdrom device]/settings</CODE>" for |
53 fine-tuning your CD-ROM.</P> | |
1612 | 54 |
7795 | 55 <P>FreeBSD:</P> |
56 | |
57 <P> Speed: <CODE>cdcontrol [-f device] speed [speed]</CODE></P> | |
58 <P> DMA: <CODE>sysctl hw.ata.atapi_dma=1</CODE></P> | |
59 | |
6878 | 60 |
7047 | 61 <H2><A NAME="dvd">4.2 DVD playback</A></H2> |
1682 | 62 |
7934 | 63 <P>For the complete list of available options, please read the man page.</P> |
64 | |
65 <H4>New-style DVD support (mpdvdkit2)</H4> | |
66 | |
7814 | 67 <P>MPlayer uses <CODE>libdvdread</CODE> and <CODE>libdvdcss</CODE> for |
6877 | 68 DVD decryption and playback. These two libraries are contained in the |
7814 | 69 <CODE>libmpdvdkit2/</CODE> subdirectory of the MPlayer source tree, you |
6877 | 70 do not have to install them separately. We opted for this solution because |
7934 | 71 we had to fix a libdvdread bug, and apply a patch which adds <B>cracked CSS |
72 keys caching support</B> to libdvdcss. This results in a large speed increase | |
73 because the keys do not have to be cracked every time before playing.</P> | |
1612 | 74 |
7814 | 75 <P>MPlayer can also use system-wide <CODE>libdvdread</CODE> and |
6877 | 76 <CODE>libdvdcss</CODE> libraries, but this solution is <B>not</B> recommended, |
77 as it can result in bugs, library incompatibilities, and slower speed.</P> | |
78 | |
7934 | 79 <H4>DVD Navigation support (dvdnav)</H4> |
80 | |
81 <P>Support for DVD navigation via <CODE>dvdnav</CODE> was being worked on, but | |
7935 | 82 it was never finished properly and is therefore <B>not recommended</B>!</P> |
4057 | 83 |
7047 | 84 <H4>Old-style DVD support - OPTIONAL</H4> |
4057 | 85 |
7934 | 86 <P>Useful if you want to play encoded VOBs from <B>hard disk</B>. Compile and |
7814 | 87 install <B>libcss</B> 0.0.1 (not newer) for this (If MPlayer fails to |
7935 | 88 detect it, use the <CODE>-csslib /path/to/libcss.so</CODE> option). To use it, |
89 you need to be root, use a suid root MPlayer binary or let MPlayer call the | |
7943 | 90 suid-root fibmap_mplayer wrapper program.</P> |
7934 | 91 |
92 <H4>DVD structure</H4> | |
93 | |
94 <P>DVD disks use all 2048 b/s sectors with ecc/crc. They usually have an UDF | |
7992 | 95 filesystem on a single track, containing various files (small .IFO and .BUK |
96 files and big (1GB) .VOB files). They are real files and can be copied/played | |
97 from a mounted file system of an unencrypted DVD.</P> | |
7934 | 98 |
99 <P>The .IFO files contain the movie navigation informations (chapter/title/angle | |
7992 | 100 map, language table, etc) and is needed to read and interpret the .VOB content |
101 (movie). The .BUK files are backups of them. They use <B>sectors</B> everywhere, | |
102 so you need to use raw addressing of sectors of the disc to implement DVD | |
103 navigation. It's also needed to decrypt the content.</P> | |
7934 | 104 |
105 <P>The whole old-style DVD support with libcss needs therefore a mounted DVD | |
7992 | 106 filesystem and a raw sector-based access to the device. Unfortunately you must |
107 be root (under Linux) to get the sector address of a file. You got the | |
108 following choices:</P> | |
7934 | 109 |
110 <UL> | |
7943 | 111 <LI>Force the user to be root or use a suid-root mplayer binary.</LI> |
112 <LI>Let MPlayer call the suid-root fibmap_mplayer wrapper program to access | |
7935 | 113 the DVD (used in the old-style DVD playback over libcss).</LI> |
7934 | 114 <LI>Don't use the kernel's filesystem driver at all and re-implement it in |
115 userspace. libdvdread 0.9.x and libmpdvdkit does this (New-style DVD | |
116 support). The kernel udf filesystem drivers isn't needed as they already | |
117 have their own, built-in udf fs driver. Also the dvd, doesn't needs to be | |
118 mounted as only the raw sector-based access is used.</LI> | |
119 </UL> | |
120 | |
121 <P>Sometimes /dev/dvd can't be read by users, so the libdvdread authors | |
7992 | 122 implemented an emulation layer which transfers sector addresses to |
123 filenames+offsets, to emulate raw access on the top of a mounted filesystem | |
124 or even on a hard disk.</P> | |
7934 | 125 |
126 <P>libdvdread even accepts the mountpoint instead of the device name for raw | |
7992 | 127 access and checks in <CODE>/proc/mounts</CODE> to get the device name. It was |
128 developed for Solaris, where device names are dynamically allocated.</P> | |
7934 | 129 |
130 <P>The default DVD device is <CODE>/dev/dvd</CODE>. If your setup differs, | |
7992 | 131 make a symlink, or specify the correct device on the command line with the |
132 <CODE>-dvd-device</CODE> option.</P> | |
7934 | 133 |
134 <H4>DVD authentication</H4> | |
1612 | 135 |
7934 | 136 <P>The authentication and decryption method of the new-style DVD support is done |
137 using a patched libdvdcss (see above). The method can be specified over the | |
138 environment variable <CODE>DVDCSS_METHOD</CODE> which can be set to | |
139 <CODE>key</CODE>, <CODE>disk</CODE> or <CODE>title</CODE>.</P> | |
140 | |
141 <P>If nothing is specified it tries the following methods | |
142 (default: key, title request):</P> | |
143 | |
144 <OL> | |
145 <LI><B>bus key:</B> This key is negotiated during authentication (a long mix | |
146 of ioctls and various key exchanges, crypto stuff) and is used to encrypt | |
147 the title and disk keys before sending them over the unprotected bus | |
148 (to prevent eavesdropping). The bus key is needed to get and predecrypt the | |
7992 | 149 crypted disk key.</LI> |
7934 | 150 <LI><B>cached key:</B> MPlayer looks for eventually already cracked |
151 title keys which are stored in the <CODE>~/.mplayer/DVDKeys</CODE> directory | |
152 (fast ;).</LI> | |
153 <LI><B>key:</B> If no cached key is available, MPlayer tries to | |
7992 | 154 decrypt the disk key with a set of included player keys.</LI> |
7934 | 155 <LI><B>disk:</B> If the key method fails (e.g. no included player keys), |
156 MPlayer will crack the disk key using a brute force algorithm. | |
157 This process is CPU intensive and requires 64 MB of memory (16M 32bit | |
158 entries hash table) to store temporary data. This method should always | |
159 work (slow).</LI> | |
7992 | 160 <LI><B>title request:</B> With the disk key MPlayer requests the crypted title |
7934 | 161 keys, which are inside <I>hidden sectors</I> using <CODE>ioctl()</CODE>. |
162 The region protection of RPC-2 drives is performed in this step and may | |
163 fail on such drives. If it succeeds, the title keys will be decrypted with | |
7992 | 164 the bus and disk key.</LI> |
7934 | 165 <LI><B>title:</B> This method is used if the title request failed and does |
166 not rely on any key exchange with the DVD drive. It uses a crypto attack to | |
167 guess the title key directly (by finding a repeating pattern in the | |
168 decrypted VOB content and guessing that that the plain text for first | |
169 encrypted bytes are a continuation of that pattern). | |
170 The method is also known as "known plaintext attack" or "DeCSSPlus". | |
171 In rare cases this may fail because there is not enough encrypted data on | |
172 the disk to perform a statistical attack or because the key changes in the | |
173 middle of a title. On the other hand it is the only way to decrypt a DVD | |
174 stored on a hard disk or a DVD with the wrong region on an RPC2 drive | |
175 (slow).</LI> | |
176 </OL> | |
177 | |
178 <P>RPC-1 DVD drives only protect region settings over software DVD players. | |
179 RPC-2 drives have a hardware protection that allows 5 changes only. It might | |
180 be needed/recommended to upgrade the firmware to RPC-1 if you have a RPC-2 DVD | |
181 drive. Firmware upgrades can be found | |
182 <A HREF="http://perso.club-internet.fr/farzeno/firmware/">here</A>. If there is | |
183 no firmware upgrade available for your device, use the | |
184 <A HREF="http://www.linuxtv.org/download/dvd/dvd_disc_20000215.tar.gz">regionset | |
185 tool</A> to set the region code of your DVD-drive (under Linux). | |
186 <B>Warning:</B> You can only set the region 5 times.</P> | |
1612 | 187 |
6878 | 188 |
7047 | 189 <H2><A NAME="vcd">4.3 VCD playback</A></H2> |
6878 | 190 |
7934 | 191 <P>For the complete list of available options, please read the man page. |
7992 | 192 The Syntax for a standard Video CD (VCD) is as followed: |
193 <CODE>mplayer -vcd <track> [-cdrom-device <device>]</CODE>.<BR> | |
194 Example: <CODE>mplayer -vcd 2 -cdrom-device /dev/hdc</CODE></P> | |
6878 | 195 |
7934 | 196 <H4>VCD structure</H4> |
6878 | 197 |
7934 | 198 <P>VCD disks consists of 2 or more track:</P> |
199 | |
6878 | 200 <UL> |
7934 | 201 <LI>The first track is a few MB 2048 bytes/sector data track, with an iso9660 |
202 filesystem, usualy containing win32 VCD player programs and maybe other infos | |
203 (jpegs, text, etc).</LI> | |
204 <LI>The second and other tracks are raw 2324 bytes/sector mpeg tracks, without | |
205 any filesystem but raw mpeg ps data, one packet per sector. they contain the | |
206 movie(s)... The tracks <B>can't be mounted</B>! It is similar to audio | |
207 tracks (e.g. You never mounted an audio cd to play it, or did you? No). | |
208 As most movies are inside track too, you should try <CODE>-vcd 2</CODE> | |
209 first.</LI> | |
210 <LI>There exist VCD disks without the first track too (single track and no | |
211 filesystems at all). They are still playable, but can't be mounted.</LI> | |
6878 | 212 </UL> |
213 | |
7934 | 214 <P>About .DAT files:</P> |
215 | |
216 <P>The ~600 MB file visible on the first track of the mounted vcd isn't a real | |
7992 | 217 file! It's a so called iso gateway, created to allow Windows to handle such |
218 tracks (Windows doesn't allow raw device access to applications at all). | |
219 Under linux, you cannot copy or play such files (they contain garbage). | |
220 Under Windows it is possible as its iso9660 driver emulates the raw reading of | |
221 tracks in this file. To play a .DAT file you need a kernel driver which can be | |
222 found in the Linux version of PowerDVD. It has a modified iso9660 filesystem | |
223 (vcdfs/isofs-2.4.X.o) driver, which is able to emulate the | |
224 raw tracks through this shadow .DAT file. If you mount the disc using their | |
225 driver, you can copy and even play .DAT files with mplayer. But it <B>won't | |
226 work</B> with the standard iso9660 driver of the kernel! It is recommended to | |
227 use the <CODE>-vcd</CODE> option instead. Alternate options for VCD copy are | |
228 the new cdfs kernel driver (shows CD <I>sessions</I> as image files) and | |
229 cdrdao (a bit-to-bit cd grabber/copier application).</P> | |
7934 | 230 |
231 <P>The default VCD device is <CODE>/dev/cdrom</CODE>. If your setup differs, | |
7992 | 232 make a symlink, or specify the correct device on the command line with the |
233 <CODE>-cdrom-device</CODE> option.</P> | |
7934 | 234 |
1612 | 235 </BODY> |
236 </HTML> |