Mercurial > mplayer.hg
annotate DOCS/xml/en/cd-dvd.xml @ 11483:462b97f8746f
move section out of <link> tags
author | wight |
---|---|
date | Sun, 16 Nov 2003 19:55:53 +0000 |
parents | 2a6d6381f335 |
children | d480f7e36b74 |
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 | |
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: | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
9776
diff
changeset
|
81 <screen>mplayer dvd://1 -dvd-device /dev/hdc</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> | |
96 subdirectory of the MPlayer source tree, you do not have to install them separately. | |
97 We opted for this solution because we had to fix a <systemitem>libdvdread</systemitem> | |
98 bug and apply a patch which adds | |
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>Old-style DVD support - OPTIONAL</title> | |
119 <para> | |
120 Useful if you want to play encoded VOBs from <emphasis role="bold">hard disk</emphasis>. | |
121 Compile and install <emphasis role="bold">libcss</emphasis> 0.0.1 (not newer) for this | |
122 (If MPlayer fails to detect it, use the <option>-csslib /path/to/libcss.so</option> | |
123 option). To use it, you need to be root, use a suid root MPlayer binary or let | |
124 MPlayer call the suid-root fibmap_mplayer wrapper program. | |
125 </para> | |
126 </formalpara> | |
127 | |
128 <formalpara> | |
129 <title>DVD structure</title> | |
130 <para> | |
131 DVD disks have 2048 bytes per sector with ECC/CRC. They usually have an UDF | |
132 filesystem on a single track, containing various files (small .IFO and .BUK | |
133 files and big (1GB) .VOB files). They are real files and can be copied/played | |
134 from the mounted filesystem of an unencrypted DVD. | |
135 </para> | |
136 </formalpara> | |
137 | |
138 <para> | |
139 The .IFO files contain the movie navigation information (chapter/title/angle | |
140 map, language table, etc) and are needed to read and interpret the .VOB content | |
141 (movie). The .BUK files are backups of them. They use | |
142 <emphasis role="bold">sectors</emphasis> everywhere, so you need to use raw | |
143 addressing of sectors of the disc to implement DVD navigation or decrypt the | |
144 content. | |
145 </para> | |
146 | |
147 <para> | |
148 The whole old-style DVD support with <systemitem>libcss</systemitem> therefore | |
149 needs a mounted DVD filesystem and raw sector-based access to the device. | |
150 Unfortunately you must (under Linux) be root to get the sector address of a | |
151 file. You have the following choices: | |
152 | |
153 <itemizedlist> | |
154 <listitem><para> | |
155 Be root or use a suid-root <application>MPlayer</application> binary. | |
156 </para></listitem> | |
157 | |
158 <listitem><para> | |
159 Let <application>MPlayer</application> call the suid-root fibmap_mplayer | |
160 wrapper program to access the DVD (used in the old-style DVD playback over | |
161 <systemitem>libcss</systemitem>). | |
162 </para></listitem> | |
163 | |
164 <listitem><para> | |
165 Don't use the kernel's filesystem driver at all and reimplement it in | |
166 userspace. <systemitem>libdvdread</systemitem> 0.9.x and <systemitem>libmpdvdkit</systemitem> | |
167 do this (new-style DVD support). The kernel UDF filesystem driver is not | |
168 needed as they already have their own builtin UDF filesystem driver. | |
169 Also the DVD does not have to be mounted as only the raw sector-based | |
170 access is used. | |
171 </para></listitem> | |
172 </itemizedlist> | |
173 </para> | |
174 | |
175 <para> | |
176 Sometimes <filename>/dev/dvd</filename> cannot be read by users, so the | |
177 <systemitem>libdvdread</systemitem> authors implemented an emulation layer | |
178 which transfers sector addresses to filenames+offsets, to emulate raw | |
179 access on top of a mounted filesystem or even on a hard disk. | |
180 </para> | |
181 | |
182 <para> | |
183 <systemitem>libdvdread</systemitem> even accepts the mountpoint instead of | |
184 the device name for raw access and checks <filename>/proc/mounts</filename> | |
185 to get the device name. It was developed for Solaris, where device names | |
186 are dynamically allocated. | |
187 </para> | |
188 | |
189 <para> | |
190 The default DVD device is <filename>/dev/dvd</filename>. If your setup differs, | |
191 make a symlink, or specify the correct device on the command line with the | |
192 <option>-dvd-device</option> option. | |
193 </para> | |
194 | |
195 <formalpara> | |
196 <title>DVD authentication</title> | |
197 <para> | |
198 The authentication and decryption method of the new-style DVD support is done | |
199 using a patched <systemitem>libdvdcss</systemitem> (see above). The method can | |
200 be specified through the environment variable <envar>DVDCSS_METHOD</envar>, | |
201 which can be set to key, disk or title. | |
202 </para> | |
203 </formalpara> | |
204 | |
205 <para> | |
206 If nothing is specified it tries the following methods (default: key, | |
207 title request): | |
208 </para> | |
209 | |
210 <orderedlist> | |
211 <listitem><para> | |
212 <emphasis role="bold">bus key</emphasis>: This key is negotiated during | |
213 authentication (a long mix of ioctls and various key exchanges, crypto | |
214 stuff) and is used to encrypt the title and disk keys before sending them | |
215 over the unprotected bus (to prevent eavesdropping). The bus key is needed | |
216 to get and predecrypt the crypted disk key. | |
217 </para></listitem> | |
218 | |
219 <listitem><para> | |
220 <emphasis role="bold">cached key</emphasis>: <application>MPlayer</application> | |
221 looks for already cracked title keys which are stored in the | |
222 <filename class="directory">~/.mplayer/DVDKeys</filename> directory (fast ;). | |
223 </para></listitem> | |
224 | |
225 <listitem><para> | |
226 <emphasis role="bold">key</emphasis>: If no cached key is available, | |
227 <application>MPlayer</application> tries to decrypt the disk key with a set | |
228 of included player keys. | |
229 </para></listitem> | |
230 | |
231 <listitem><para> | |
232 <emphasis role="bold">disk</emphasis>: If the key method fails | |
233 (e.g. no included player keys), <application>MPlayer</application> | |
234 will crack the disk key using a brute force algorithm. This process | |
235 is CPU intensive and requires 64 MB of memory (16M 32Bit entries hash | |
236 table) to store temporary data. This method should always work (slow). | |
237 </para></listitem> | |
238 | |
239 <listitem><para> | |
240 <emphasis role="bold">title request</emphasis>: With the disk key | |
241 <application>MPlayer</application> requests the crypted title keys, | |
242 which are inside <emphasis>hidden sectors</emphasis> using <systemitem>ioctl()</systemitem>. | |
243 The region protection of RPC-2 drives is performed in this step and may fail on such drives. | |
244 If it succeeds, the title keys will be decrypted with the bus and disk key. | |
245 </para></listitem> | |
246 | |
247 <listitem><para> | |
248 <emphasis role="bold">title</emphasis>: This method is used if the title | |
249 request failed and does not rely on any key exchange with the DVD drive. | |
250 It uses a crypto attack to guess the title key directly (by finding a | |
251 repeating pattern in the decrypted VOB content and guessing that the | |
252 plain text corresponding to the first encrypted bytes is a continuation | |
253 of that pattern). The method is also known as "known plaintext attack" | |
254 or "DeCSSPlus". In rare cases this may fail because there is not | |
255 enough encrypted data on the disk to perform a statistical attack or because | |
256 the key changes in the middle of a title. This method is the only way to | |
257 decrypt a DVD stored on a hard disk or a DVD with the wrong region on an | |
258 RPC2 drive (slow). | |
259 </para></listitem> | |
260 </orderedlist> | |
261 | |
262 <para> | |
263 RPC-1 DVD drives only protect region settings through software. RPC-2 drives | |
264 have a hardware protection that allows 5 changes only. It might be | |
265 needed/recommended to upgrade the firmware to RPC-1 if you have a RPC-2 DVD | |
266 drive. Firmware upgrades can be found on this | |
267 <ulink url="http://www.firmware-flash.com">firmware page</ulink>. If there is | |
268 no firmware upgrade available for your device, use the | |
269 <ulink url="http://www.linuxtv.org/download/dvd/dvd_disc_20000215.tar.gz">regionset tool</ulink> | |
270 to set the region code of your DVD drive (under Linux). | |
271 <emphasis role="bold">Warning</emphasis>: You can only set the region 5 times. | |
272 </para> | |
273 </sect1> | |
274 | |
275 <sect1 id="vcd"> | |
276 <title>VCD playback</title> | |
277 <para> | |
278 For the complete list of available options, please read the man page. The Syntax for a | |
279 standard Video CD (VCD) is as follows: | |
10203 | 280 <screen>mplayer vcd://<replaceable><track></replaceable> [-cdrom-device <replaceable><device></replaceable>]</screen> |
9675 | 281 Example: |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
9776
diff
changeset
|
282 <screen>mplayer vcd://2 -cdrom-device /dev/hdc</screen> |
9675 | 283 The default VCD device is <filename>/dev/cdrom</filename>. If your setup |
284 differs, make a symlink or specify the correct device on the command line | |
285 with the <option>-cdrom-device</option> option. | |
286 </para> | |
287 | |
288 <note><para> | |
289 At least Plextor and some Toshiba SCSI CD-ROM drives have horrible performance | |
290 reading VCDs. This is because the the CDROMREADRAW <systemitem>ioctl</systemitem> | |
291 is not fully implemented for these drives. If you have some knowledge of SCSI | |
292 programming, please <ulink url="../../tech/patches.txt">help us</ulink> | |
293 implement generic SCSI support for VCDs. | |
294 </para></note> | |
295 | |
296 <para> | |
297 In the meantime you can extract data from VCDs with | |
298 <ulink url="http://140.132.1.204/OS/Linux/packages/X/viewers/readvcd/">readvcd</ulink> | |
299 and play the resulting file with <application>MPlayer</application>. | |
300 </para> | |
301 | |
302 <formalpara> | |
303 <title>VCD structure</title> | |
304 <para>VCD disks consist of one or more tracks:</para> | |
305 </formalpara> | |
306 | |
307 <itemizedlist> | |
308 <listitem><para> | |
309 The first track is a small 2048 bytes/sector data track with an iso9660 | |
310 filesystem, usually containing Windows VCD player programs and maybe other | |
311 information (images, text, etc). | |
312 </para></listitem> | |
313 | |
314 <listitem><para> | |
315 The second and other tracks are raw 2324 bytes/sector MPEG (movie) | |
316 tracks, containing one MPEG PS data packet per sector instead of a | |
317 filesystem. Similar to audio CD tracks, these tracks <emphasis role="bold">cannot | |
318 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
|
319 As most movies are inside this track, you should try <option>vcd://2</option> first. |
9675 | 320 </para></listitem> |
321 | |
322 <listitem><para> | |
323 There exist VCD disks without the first track (single track and no filesystem | |
324 at all). They are still playable, but cannot be mounted. | |
325 </para></listitem> | |
326 </itemizedlist> | |
327 | |
328 <formalpara> | |
329 <title>About .DAT files</title> | |
330 <para> | |
331 The ~600 MB file visible on the first track of the mounted VCD is not a real | |
332 file! It is a so called ISO gateway, created to allow Windows to handle such | |
333 tracks (Windows does not allow raw device access to applications at all). | |
334 Under Linux you cannot copy or play such files (they contain garbage). Under | |
335 Windows it is possible as its iso9660 driver emulates the raw reading of | |
336 tracks in this file. To play a .DAT file you need the kernel driver which can | |
337 be found in the Linux version of PowerDVD. It has a modified iso9660 filesystem | |
338 (<filename>vcdfs/isofs-2.4.X.o</filename>) driver, which is able to emulate the | |
339 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
|
340 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
|
341 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
|
342 <option>vcd://</option> instead. Alternatives for VCD copying are the |
9675 | 343 new <ulink url="http://www.elis.rug.ac.be/~ronsse/cdfs/">cdfs</ulink> kernel |
344 driver (not part of the official kernel) that shows CD sessions as image files and | |
345 <ulink url="http://cdrdao.sourceforge.net/">cdrdao</ulink>, a bit-by-bit | |
346 CD grabbing/copying application. | |
347 </para> | |
348 </formalpara> | |
349 </sect1> | |
350 </chapter> |