Put in remaining pages and wiki contents.
[ikiwiki.git] / docs / handbook / handbook-creating-dvds.mdwn
1 \r
2 \r
3 ## 12.6 Creating and Using Optical Media (DVDs) \r
4 \r
5 ***Contributed by Marc Fonvieille. ******With inputs from Andy Polyakov. ***\r
6 \r
7 ### 12.6.1 Introduction \r
8 \r
9 Compared to the CD, the DVD is the next generation of optical media storage technology. The DVD can hold more data than any CD and is nowadays the standard for video publishing.\r
10 \r
11 Five physical recordable formats can be defined for what we will call a recordable DVD:\r
12 \r
13
14 * DVD-R: This was the first DVD recordable format available. The DVD-R standard is defined by the [DVD Forum](http://www.dvdforum.com/forum.shtml). This format is write once.\r
15
16 * DVD-RW: This is the rewriteable version of the DVD-R standard. A DVD-RW can be rewritten about 1000 times.\r
17
18 * DVD-RAM: This is also a rewriteable format supported by the DVD Forum. A DVD-RAM can be seen as a removable hard drive. However, this media is not compatible with most DVD-ROM drives and DVD-Video players; only a few DVD writers support the DVD-RAM format.\r
19
20 * DVD+RW: This is a rewriteable format defined by the [DVD+RW Alliance](http://www.dvdrw.com/). A DVD+RW can be rewritten about 1000 times.\r
21
22 * DVD+R: This format is the write once variation of the DVD+RW format.\r
23 \r
24 A single layer recordable DVD can hold up to 4,700,000,000 bytes which is actually 4.38 GB or 4485 MB (1 kilobyte is 1024 bytes).\r
25 \r
26  **Note:** A distinction must be made between the physical media and the application. For example, a DVD-Video is a specific file layout that can be written on any recordable DVD physical media: DVD-R, DVD+R, DVD-RW etc. Before choosing the type of media, you must be sure that both the burner and the DVD-Video player (a standalone player or a DVD-ROM drive on a computer) are compatible with the media under consideration.\r
27 \r
28 ### 12.6.2 Configuration \r
29 \r
30 The program [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#growisofs&section1&manpath=FreeBSD+Ports) will be used to perform DVD recording. This command is part of the  **dvd+rw-tools**  utilities ([`sysutils/dvd+rw-tools`](http://pkgsrc.se/sysutils/dvd+rw-tools)). The  **dvd+rw-tools**  support all DVD media types.\r
31 \r
32 These tools use the SCSI subsystem to access to the devices, therefore the [creating-cds.html#ATAPICAM ATAPI/CAM support] must be added to your kernel.\r
33 \r
34 You also have to enable DMA access for ATAPI devices, this can be done in adding the following line to the `/boot/loader.conf` file:\r
35 \r
36     \r
37     hw.ata.atapi_dma="1"\r
38 \r
39 \r
40 Before attempting to use the  **dvd+rw-tools**  you should consult the [dvd+rw-tools' hardware compatibility notes](http://fy.chalmers.se/~appro/linux/DVD+RW/hcn.html) for any information related to your DVD burner.\r
41 \r
42 ### 12.6.3 Burning Data DVDs \r
43 \r
44 The [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#growisofs&section1&manpath=FreeBSD+Ports) command is a frontend to [creating-cds.html#MKISOFS mkisofs], it will invoke [mkisofs(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mkisofs&section=8&manpath=FreeBSD+Ports) to create the file system layout and will perform the write on the DVD. This means you do not need to create an image of the data before the burning process.\r
45 \r
46 To burn onto a DVD+R or a DVD-R the data from the `/path/to/data` directory, use the following command:\r
47 \r
48     \r
49     # growisofs -dvd-compat -Z `***/dev/cd0***` -J -R `***/path/to/data***`\r
50 \r
51 \r
52 The options `-J -R` are passed to [mkisofs(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#mkisofs&section8&manpath=FreeBSD+Ports) for the file system creation (in this case: an ISO 9660 file system with Joliet and Rock Ridge extensions), consult the [mkisofs(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mkisofs&section=8&manpath=FreeBSD+Ports) manual page for more details.\r
53 \r
54 The option `-Z` is used for the initial session recording in any case: multiple sessions or not. The DVD device, `***/dev/cd0***`, must be changed according to your configuration. The `-dvd-compat` parameter will close the disk, the recording will be unappendable. In return this should provide better media compatibility with DVD-ROM drives.\r
55 \r
56 It is also possible to burn a pre-mastered image, for example to burn the image `***imagefile.iso***`, we will run:\r
57 \r
58     \r
59     # growisofs -dvd-compat -Z `***/dev/cd0***`=`***imagefile.iso***`\r
60 \r
61 \r
62 The write speed should be detected and automatically set according to the media and the drive being used. If you want to force the write speed, use the `-speed#` parameter. For more information, read the [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?commandgrowisofs&section=1&manpath=FreeBSD+Ports) manual page.\r
63 \r
64 ### 12.6.4 Burning a DVD-Video \r
65 \r
66 A DVD-Video is a specific file layout based on ISO 9660 and the micro-UDF (M-UDF) specifications. The DVD-Video also presents a specific data structure hierarchy, it is the reason why you need a particular program such as [`multimedia/dvdauthor`](http://pkgsrc.se/multimedia/dvdauthor) to author the DVD.\r
67 \r
68 If you already have an image of the DVD-Video file system, just burn it in the same way as for any image, see the previous section for an example. If you have made the DVD authoring and the result is in, for example, the directory `/path/to/video`, the following command should be used to burn the DVD-Video:\r
69 \r
70     \r
71     # growisofs -Z `***/dev/cd0***` -dvd-video `***/path/to/video***`\r
72 \r
73 \r
74 The `-dvd-video` option will be passed down to [mkisofs(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#mkisofs&section8&manpath=FreeBSD+Ports) and will instruct it to create a DVD-Video file system layout. Beside this, the `-dvd-video` option implies `-dvd-compat` [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=growisofs&section=1&manpath=FreeBSD+Ports) option.\r
75 \r
76 ### 12.6.5 Using a DVD+RW \r
77 \r
78 Unlike CD-RW, a virgin DVD+RW needs to be formatted before first use. The [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#growisofs&section1&manpath=FreeBSD+Ports) program will take care of it automatically whenever appropriate, which is the ***recommended*** way. However you can use the `dvd+rw-format` command to format the DVD+RW:\r
79 \r
80     \r
81     # dvd+rw-format `***/dev/cd0***`\r
82 \r
83 \r
84 You need to perform this operation just once, keep in mind that only virgin DVD+RW medias need to be formatted. Then you can burn the DVD+RW in the way seen in previous sections.\r
85 \r
86 If you want to burn new data (burn a totally new file system not append some data) onto a DVD+RW, you do not need to blank it, you just have to write over the previous recording (in performing a new initial session), like this:\r
87 \r
88     \r
89     # growisofs -Z `***/dev/cd0***` -J -R `***/path/to/newdata***`\r
90 \r
91 \r
92 DVD+RW format offers the possibility to easily append data to a previous recording. The operation consists in merging a new session to the existing one, it is not multisession writing, [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#growisofs&section1&manpath=FreeBSD+Ports) will ***grow*** the ISO 9660 file system present on the media.\r
93 \r
94 For example, if we want to append data to our previous DVD+RW, we have to use the following:\r
95 \r
96     \r
97     # growisofs -M `***/dev/cd0***` -J -R `***/path/to/nextdata***`\r
98 \r
99 \r
100 The same [mkisofs(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#mkisofs&section8&manpath=FreeBSD+Ports) options we used to burn the initial session should be used during next writes.\r
101 \r
102  **Note:** You may want to use the `-dvd-compat` option if you want better media compatibility with DVD-ROM drives. In the DVD+RW case, this will not prevent you from adding data.\r
103 \r
104 If for any reason you really want to blank the media, do the following:\r
105 \r
106     \r
107     # growisofs -Z `***/dev/cd0***`=`***/dev/zero***`\r
108 \r
109 \r
110 ### 12.6.6 Using a DVD-RW \r
111 \r
112 A DVD-RW accepts two disc formats: the incremental sequential one and the restricted overwrite. By default DVD-RW discs are in sequential format.\r
113 \r
114 A virgin DVD-RW can be directly written without the need of a formatting operation, however a non-virgin DVD-RW in sequential format needs to be blanked before to be able to write a new initial session.\r
115 \r
116 To blank a DVD-RW in sequential mode, run:\r
117 \r
118     \r
119     # dvd+rw-format -blank=full `***/dev/cd0***`\r
120 \r
121 \r
122  **Note:** A full blanking (`-blank=full`) will take about one hour on a 1x media. A fast blanking can be performed using the `-blank` option if the DVD-RW will be recorded in Disk-At-Once (DAO) mode. To burn the DVD-RW in DAO mode, use the command:\r
123 \r
124     \r
125     # growisofs -use-the-force-luke#dao -Z `***/dev/cd0***``***imagefile.iso***`\r
126 \r
127 \r
128 The `-use-the-force-luke#dao` option should not be required since [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?commandgrowisofs&section=1&manpath=FreeBSD+Ports) attempts to detect minimally (fast blanked) media and engage DAO write.\r
129 \r
130 In fact one should use restricted overwrite mode with any DVD-RW, this format is more flexible than the default incremental sequential one.\r
131 \r
132 To write data on a sequential DVD-RW, use the same instructions as for the other DVD formats:\r
133 \r
134     \r
135     # growisofs -Z `***/dev/cd0***` -J -R `***/path/to/data***`\r
136 \r
137 \r
138 If you want to append some data to your previous recording, you will have to use the [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#growisofs&section1&manpath=FreeBSD+Ports) `-M` option. However, if you perform data addition on a DVD-RW in incremental sequential mode, a new session will be created on the disc and the result will be a multi-session disc.\r
139 \r
140 A DVD-RW in restricted overwrite format does not need to be blanked before a new initial session, you just have to overwrite the disc with the `-Z` option, this is similar to the DVD+RW case. It is also possible to grow an existing ISO 9660 file system written on the disc in a same way as for a DVD+RW with the `-M` option. The result will be a one-session DVD.\r
141 \r
142 To put a DVD-RW in the restricted overwrite format, the following command must be used:\r
143 \r
144     \r
145     # dvd+rw-format `***/dev/cd0***`\r
146 \r
147 \r
148 To change back to the sequential format use:\r
149 \r
150     \r
151     # dvd+rw-format -blank=full `***/dev/cd0***`\r
152 \r
153 \r
154 ### 12.6.7 Multisession \r
155 \r
156 Very few DVD-ROM and DVD-Video players support multisession DVDs, they will most of time, hopefully, only read the first session. DVD+R, DVD-R and DVD-RW in sequential format can accept multiple sessions, the notion of multiple sessions does not exist for the DVD+RW and the DVD-RW restricted overwrite formats.\r
157 \r
158 Using the following command after an initial (non-closed) session on a DVD+R, DVD-R, or DVD-RW in sequential format, will add a new session to the disc:\r
159 \r
160     \r
161     # growisofs -M `***/dev/cd0***` -J -R `***/path/to/nextdata***`\r
162 \r
163 \r
164 Using this command line with a DVD+RW or a DVD-RW in restricted overwrite mode, will append data in merging the new session to the existing one. The result will be a single-session disc. This is the way used to add data after an initial write on these medias.\r
165 \r
166  **Note:** Some space on the media is used between each session for end and start of sessions. Therefore, one should add sessions with large amount of data to optimize media space. The number of sessions is limited to 154 for a DVD+R and about 2000 for a DVD-R.\r
167 \r
168 ### 12.6.8 For More Information \r
169 \r
170 To obtain more information about a DVD, the `dvd+rw-mediainfo `***/dev/cd0****** command can be ran with the disc in the drive.\r
171 \r
172 More information about the  **dvd+rw-tools**  can be found in the [growisofs(1)](http://leaf.dragonflybsd.org/cgi/web-man?command#growisofs&section1&manpath=FreeBSD+Ports) manual page, on the [dvd+rw-tools web site](http://fy.chalmers.se/~appro/linux/DVD+RW/) and in the [cdwrite mailing list](http://lists.debian.org/cdwrite/) archives.\r
173 \r
174  **Note:** The `dvd+rw-mediainfo` output of the resulting recording or the media with issues is mandatory for any problem report. Without this output, it will be quite impossible to help you.\r
175 \r
176 \r
177 \r
178 CategoryHandbook\r
179 CategoryHandbook-storage\r