Mercurial > mplayer.hg
annotate DOCS/xml/en/cd-dvd.xml @ 13977:7895a1b73828
URL updates
author | diego |
---|---|
date | Fri, 19 Nov 2004 12:03:41 +0000 |
parents | 86a47a27562f |
children | 7c96fa55ac93 |
rev | line source |
---|---|
9675 | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
10913
49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
lumag
parents:
10910
diff
changeset
|
2 <!-- $Revision$ --> |
9675 | 3 <chapter id="cd-dvd"> |
4 <title>CD/DVD usage</title> | |
5 | |
6 <sect1 id="drives"> | |
7 <title>CD/DVD drives</title> | |
8 <para> | |
9 Linux documentation excerpt: | |
10 </para> | |
11 | |
12 <para> | |
13 Modern CD-ROM drives can attain very high head speeds, yet some CD-ROM drives | |
14 are capable of running at reduced speeds. There are several reasons that might | |
15 make you consider changing the speed of a CD-ROM drive: | |
16 </para> | |
17 | |
18 <itemizedlist> | |
19 <listitem><para> | |
20 There have been reports of read errors at high speeds, especially | |
21 with badly pressed CD-ROMs. Reducing the speed can prevent data loss under | |
22 these circumstances. | |
23 </para></listitem> | |
24 | |
25 <listitem><para> | |
26 Many CD-ROM drives are annoyingly loud, a lower speed may reduce the noise. | |
27 </para></listitem> | |
28 </itemizedlist> | |
29 | |
30 <para> | |
31 You can reduce the speed of IDE CD-ROM drives with <command>hdparm</command> or a | |
13973 | 32 program called <command>setcd</command>. It works like this: |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9675
diff
changeset
|
33 <screen>hdparm -E <replaceable>[speed]</replaceable> <replaceable>[cdrom device]</replaceable></screen> |
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9675
diff
changeset
|
34 <screen>setcd -x <replaceable>[speed]</replaceable> <replaceable>[cdrom device]</replaceable></screen> |
9675 | 35 </para> |
36 | |
37 <para> | |
10910
eb339c10228e
Lol! This command will try to change xfer_mode, and not a cdrom spin speed. Removed.
lumag
parents:
10656
diff
changeset
|
38 If you have root privileges the following command may also help: |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9675
diff
changeset
|
39 <screen>echo file_readahead:2000000 > /proc/ide/<replaceable>[cdrom device]</replaceable>/settings</screen> |
9675 | 40 </para> |
41 | |
42 <para> | |
43 This sets prefetched file reading to 2MB, which helps with scratched CD-ROMs. | |
44 If you set it to too high, the drive will continuously spin up and down, and | |
45 will dramatically decrease the performance. | |
46 It is recommended that you also tune your CD-ROM drive with <command>hdparm</command>: | |
47 <screen>hdparm -d1 -a8 -u1 <replaceable>cdrom device</replaceable></screen> | |
48 </para> | |
49 | |
50 <para> | |
51 This enables DMA access, read-ahead, and IRQ unmasking (read the <command>hdparm</command> | |
52 man page for a detailed explanation). | |
53 </para> | |
54 | |
55 <para> | |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9675
diff
changeset
|
56 Please refer to "<filename>/proc/ide/<replaceable>cdrom device</replaceable>/settings"</filename> |
9675 | 57 for fine-tuning your CD-ROM. |
58 </para> | |
59 | |
60 <para> | |
61 SCSI drives do not have a uniform way of setting these parameters (Do you know one? | |
62 Tell us!) There is a tool that works for | |
63 <ulink url="http://das.ist.org/~georg/">Plextor SCSI drives</ulink>. | |
64 </para> | |
65 | |
66 <para>FreeBSD:</para> | |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9675
diff
changeset
|
67 <para>Speed: <command>cdcontrol [-f <replaceable>device</replaceable>] speed <replaceable>speed</replaceable></command></para> |
9675 | 68 <para>DMA: <command>sysctl hw.ata.atapi_dma=1</command></para> |
69 </sect1> | |
70 | |
71 <sect1 id="dvd"> | |
72 <title>DVD playback</title> | |
73 <para> | |
74 For the complete list of available options, please read the man page. | |
75 The Syntax for a standard Digital Versatile Disc (DVD) is as follows: | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
9776
diff
changeset
|
76 <screen>mplayer dvd://<replaceable><track></replaceable> [-dvd-device <replaceable><device></replaceable>]</screen> |
9675 | 77 </para> |
78 | |
79 <para> | |
80 Example: | |
11713 | 81 <screen>mplayer dvd://<replaceable>1</replaceable> -dvd-device <replaceable>/dev/hdc</replaceable></screen> |
9675 | 82 </para> |
83 | |
84 <para> | |
85 The default DVD device is <filename>/dev/dvd</filename>. If your setup | |
86 differs, make a symlink or specify the correct device on the command | |
87 line with the <option>-dvd-device</option> option. | |
88 </para> | |
89 | |
90 <formalpara> | |
91 <title>New-style DVD support (mpdvdkit2)</title> | |
92 <para> | |
93 <application>MPlayer</application> uses <systemitem>libdvdread</systemitem> and | |
94 <systemitem>libdvdcss</systemitem> for DVD decryption and playback. These two | |
95 libraries are contained in the <filename class="directory">libmpdvdkit2/</filename> | |
11540 | 96 subdirectory of the <application>MPlayer</application> source tree, you do not have |
97 to install them separately. We opted for this solution because we had to fix a | |
98 <systemitem>libdvdread</systemitem> bug and apply a patch which adds | |
9675 | 99 <emphasis role="bold">cracked CSS keys caching support</emphasis> to |
100 <systemitem>libdvdcss</systemitem> This results in a large speed increase because the | |
101 keys do not have to be cracked every time before playing. | |
102 </para> | |
103 </formalpara> | |
104 | |
105 <para> | |
106 <application>MPlayer</application> can also use system-wide <systemitem>libdvdread</systemitem> | |
107 and <systemitem>libdvdcss</systemitem> libraries, but this solution is | |
108 <emphasis role="bold">not</emphasis> recommended, as it can result in bugs, | |
109 library incompatibilities and slower speed. | |
110 </para> | |
111 | |
10986 | 112 <note><para> |
113 In case of DVD decoding problems, try disabling supermount, or any other such | |
114 facilities. | |
115 </para></note> | |
116 | |
9675 | 117 <formalpara> |
118 <title>DVD structure</title> | |
119 <para> | |
120 DVD disks have 2048 bytes per sector with ECC/CRC. They usually have an UDF | |
121 filesystem on a single track, containing various files (small .IFO and .BUK | |
122 files and big (1GB) .VOB files). They are real files and can be copied/played | |
123 from the mounted filesystem of an unencrypted DVD. | |
124 </para> | |
125 </formalpara> | |
126 | |
127 <para> | |
128 The .IFO files contain the movie navigation information (chapter/title/angle | |
129 map, language table, etc) and are needed to read and interpret the .VOB content | |
130 (movie). The .BUK files are backups of them. They use | |
131 <emphasis role="bold">sectors</emphasis> everywhere, so you need to use raw | |
132 addressing of sectors of the disc to implement DVD navigation or decrypt the | |
133 content. | |
134 </para> | |
135 | |
136 <para> | |
11598
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
137 DVD support needs raw sector-based access to the device. Unfortunately you must |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
138 (under Linux) be root to get the sector address of a file. That's why we don't |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
139 use the kernel's filesystem driver at all, instead we reimplement it in |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
140 userspace. <systemitem>libdvdread</systemitem> 0.9.x and |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
141 <systemitem>libmpdvdkit</systemitem> do this. The kernel UDF filesystem driver |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
142 is not needed as they already have their own builtin UDF filesystem driver. |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
143 Also the DVD does not have to be mounted as only the raw sector-based access is |
d18111ea13d0
removing last pitiful traces of old-style DVD support, with no remorse, but
gabucino
parents:
11540
diff
changeset
|
144 used. |
9675 | 145 </para> |
146 | |
147 <para> | |
148 Sometimes <filename>/dev/dvd</filename> cannot be read by users, so the | |
149 <systemitem>libdvdread</systemitem> authors implemented an emulation layer | |
150 which transfers sector addresses to filenames+offsets, to emulate raw | |
151 access on top of a mounted filesystem or even on a hard disk. | |
152 </para> | |
153 | |
154 <para> | |
155 <systemitem>libdvdread</systemitem> even accepts the mountpoint instead of | |
156 the device name for raw access and checks <filename>/proc/mounts</filename> | |
157 to get the device name. It was developed for Solaris, where device names | |
158 are dynamically allocated. | |
159 </para> | |
160 | |
161 <para> | |
162 The default DVD device is <filename>/dev/dvd</filename>. If your setup differs, | |
163 make a symlink, or specify the correct device on the command line with the | |
164 <option>-dvd-device</option> option. | |
165 </para> | |
166 | |
167 <formalpara> | |
168 <title>DVD authentication</title> | |
169 <para> | |
170 The authentication and decryption method of the new-style DVD support is done | |
171 using a patched <systemitem>libdvdcss</systemitem> (see above). The method can | |
172 be specified through the environment variable <envar>DVDCSS_METHOD</envar>, | |
173 which can be set to key, disk or title. | |
174 </para> | |
175 </formalpara> | |
176 | |
177 <para> | |
178 If nothing is specified it tries the following methods (default: key, | |
179 title request): | |
180 </para> | |
181 | |
182 <orderedlist> | |
183 <listitem><para> | |
184 <emphasis role="bold">bus key</emphasis>: This key is negotiated during | |
185 authentication (a long mix of ioctls and various key exchanges, crypto | |
186 stuff) and is used to encrypt the title and disk keys before sending them | |
187 over the unprotected bus (to prevent eavesdropping). The bus key is needed | |
188 to get and predecrypt the crypted disk key. | |
189 </para></listitem> | |
190 | |
191 <listitem><para> | |
192 <emphasis role="bold">cached key</emphasis>: <application>MPlayer</application> | |
193 looks for already cracked title keys which are stored in the | |
194 <filename class="directory">~/.mplayer/DVDKeys</filename> directory (fast ;). | |
195 </para></listitem> | |
196 | |
197 <listitem><para> | |
198 <emphasis role="bold">key</emphasis>: If no cached key is available, | |
199 <application>MPlayer</application> tries to decrypt the disk key with a set | |
200 of included player keys. | |
201 </para></listitem> | |
202 | |
203 <listitem><para> | |
204 <emphasis role="bold">disk</emphasis>: If the key method fails | |
205 (e.g. no included player keys), <application>MPlayer</application> | |
206 will crack the disk key using a brute force algorithm. This process | |
207 is CPU intensive and requires 64 MB of memory (16M 32Bit entries hash | |
208 table) to store temporary data. This method should always work (slow). | |
209 </para></listitem> | |
210 | |
211 <listitem><para> | |
212 <emphasis role="bold">title request</emphasis>: With the disk key | |
213 <application>MPlayer</application> requests the crypted title keys, | |
214 which are inside <emphasis>hidden sectors</emphasis> using <systemitem>ioctl()</systemitem>. | |
215 The region protection of RPC-2 drives is performed in this step and may fail on such drives. | |
216 If it succeeds, the title keys will be decrypted with the bus and disk key. | |
217 </para></listitem> | |
218 | |
219 <listitem><para> | |
220 <emphasis role="bold">title</emphasis>: This method is used if the title | |
221 request failed and does not rely on any key exchange with the DVD drive. | |
222 It uses a crypto attack to guess the title key directly (by finding a | |
223 repeating pattern in the decrypted VOB content and guessing that the | |
224 plain text corresponding to the first encrypted bytes is a continuation | |
225 of that pattern). The method is also known as "known plaintext attack" | |
226 or "DeCSSPlus". In rare cases this may fail because there is not | |
227 enough encrypted data on the disk to perform a statistical attack or because | |
228 the key changes in the middle of a title. This method is the only way to | |
229 decrypt a DVD stored on a hard disk or a DVD with the wrong region on an | |
230 RPC2 drive (slow). | |
231 </para></listitem> | |
232 </orderedlist> | |
233 | |
234 <para> | |
235 RPC-1 DVD drives only protect region settings through software. RPC-2 drives | |
236 have a hardware protection that allows 5 changes only. It might be | |
237 needed/recommended to upgrade the firmware to RPC-1 if you have a RPC-2 DVD | |
13976 | 238 drive. You can try finding firmware upgrades for your drive on the internet, |
239 <ulink url="http://forum.rpc-1.com/dl_all.php">this firmware forum</ulink> | |
240 may be a good starting point for your search. | |
241 If there is no firmware upgrade available for your device, use the | |
242 <ulink url="http://linvdr.org/projects/regionset/">regionset tool</ulink> | |
9675 | 243 to set the region code of your DVD drive (under Linux). |
244 <emphasis role="bold">Warning</emphasis>: You can only set the region 5 times. | |
245 </para> | |
246 </sect1> | |
247 | |
248 <sect1 id="vcd"> | |
249 <title>VCD playback</title> | |
250 <para> | |
251 For the complete list of available options, please read the man page. The Syntax for a | |
252 standard Video CD (VCD) is as follows: | |
10203 | 253 <screen>mplayer vcd://<replaceable><track></replaceable> [-cdrom-device <replaceable><device></replaceable>]</screen> |
9675 | 254 Example: |
11713 | 255 <screen>mplayer vcd://<replaceable>2</replaceable> -cdrom-device <replaceable>/dev/hdc</replaceable></screen> |
9675 | 256 The default VCD device is <filename>/dev/cdrom</filename>. If your setup |
257 differs, make a symlink or specify the correct device on the command line | |
258 with the <option>-cdrom-device</option> option. | |
259 </para> | |
260 | |
261 <note><para> | |
262 At least Plextor and some Toshiba SCSI CD-ROM drives have horrible performance | |
13973 | 263 reading VCDs. This is because the CDROMREADRAW <systemitem>ioctl</systemitem> |
9675 | 264 is not fully implemented for these drives. If you have some knowledge of SCSI |
265 programming, please <ulink url="../../tech/patches.txt">help us</ulink> | |
266 implement generic SCSI support for VCDs. | |
267 </para></note> | |
268 | |
269 <para> | |
270 In the meantime you can extract data from VCDs with | |
13976 | 271 <ulink url="http://miketeo.net/links/readvcd-0.3.tgz">readvcd</ulink> |
9675 | 272 and play the resulting file with <application>MPlayer</application>. |
273 </para> | |
274 | |
275 <formalpara> | |
276 <title>VCD structure</title> | |
277 <para>VCD disks consist of one or more tracks:</para> | |
278 </formalpara> | |
279 | |
280 <itemizedlist> | |
281 <listitem><para> | |
282 The first track is a small 2048 bytes/sector data track with an iso9660 | |
283 filesystem, usually containing Windows VCD player programs and maybe other | |
284 information (images, text, etc). | |
285 </para></listitem> | |
286 | |
287 <listitem><para> | |
288 The second and other tracks are raw 2324 bytes/sector MPEG (movie) | |
289 tracks, containing one MPEG PS data packet per sector instead of a | |
290 filesystem. Similar to audio CD tracks, these tracks <emphasis role="bold">cannot | |
291 be mounted</emphasis> (Did you ever mount an audio CD to play it?). | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
9776
diff
changeset
|
292 As most movies are inside this track, you should try <option>vcd://2</option> first. |
9675 | 293 </para></listitem> |
294 | |
295 <listitem><para> | |
296 There exist VCD disks without the first track (single track and no filesystem | |
297 at all). They are still playable, but cannot be mounted. | |
298 </para></listitem> | |
299 </itemizedlist> | |
300 | |
301 <formalpara> | |
302 <title>About .DAT files</title> | |
303 <para> | |
304 The ~600 MB file visible on the first track of the mounted VCD is not a real | |
305 file! It is a so called ISO gateway, created to allow Windows to handle such | |
306 tracks (Windows does not allow raw device access to applications at all). | |
307 Under Linux you cannot copy or play such files (they contain garbage). Under | |
308 Windows it is possible as its iso9660 driver emulates the raw reading of | |
309 tracks in this file. To play a .DAT file you need the kernel driver which can | |
310 be found in the Linux version of PowerDVD. It has a modified iso9660 filesystem | |
311 (<filename>vcdfs/isofs-2.4.X.o</filename>) driver, which is able to emulate the | |
312 raw tracks through this shadow .DAT file. If you mount the disc using their | |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9675
diff
changeset
|
313 driver, you can copy and even play .DAT files with <application>MPlayer</application>. But it will not |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
9776
diff
changeset
|
314 work with the standard iso9660 driver of the Linux kernel! Use |
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
9776
diff
changeset
|
315 <option>vcd://</option> instead. Alternatives for VCD copying are the |
9675 | 316 new <ulink url="http://www.elis.rug.ac.be/~ronsse/cdfs/">cdfs</ulink> kernel |
317 driver (not part of the official kernel) that shows CD sessions as image files and | |
13976 | 318 <ulink url="http://cdrdao.sf.net/">cdrdao</ulink>, a bit-by-bit |
9675 | 319 CD grabbing/copying application. |
320 </para> | |
321 </formalpara> | |
322 </sect1> | |
323 </chapter> |