Included the link to brazilian portuguese of this page
|Deletions are marked like this.||Additions are marked like this.|
|Line 2:||Line 2:|
|~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/CDDVD|Français]] - [[it/CDDVD|Italiano]]-~||~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/CDDVD|Français]] - [[it/CDDVD|Italiano]] - [[pt_BR/CDs e DVDs|Brazilian Portuguese]] -~|
CDs, DVDs, and BDs are common types of removable media. Unlike other types of removable media (such as flash drives or external hard drives), they are normally used read-only and many of them require special burn programs. I.e. they are not mounted for writing like "normal" filesystems. CD, DVD, and BD are optical discs, so we can use that term to refer to them collectively.
Your PC will offer device files to access your optical disc(s). Such devices are typically called drives, players, or readers, and are generally detected as /dev/sr*, where * is a number starting at 0. (Thus your first drive will be /dev/sr0, second /dev/sr1, etc.) Symlinks such as /dev/cdrom, /dev/cdrw, /dev/dvd, or /dev/dvdrw (pointing to /dev/sr0) may also be created depending on your OS version and the detected capabilities of your device.
The sequence of device file numbers may change with each reboot. The directory /dev/disk/by-id contains symbolic links with names which show persistent name parts. Like:
The name parts "HL-DT-ST_DVDRAM_GH24NSC0_K8AF33A3528" and "Optiarc_BD_RW_BD-5300S_306663601043" are supposed to persist even if you change the way the drives are attached to your computer.
Optical Media Formats
You will normally encounter two types of readable optical media and one type that is writable:
CD-DA contains audio tracks in a low level format that can only be read by music CD players or by specialized software like icedax or readom from wodim. Writing is done by burn programs in audio mode.
CD-ROM contains data which are readble by normal means as from normal data files or block devices. This format is only one of several CD sector formats. DVD and BD media always appear as CD-ROM. Their video or audio content is wrapped in read-only filesystems. Writing is done by burn programs in data mode.
DVD+RW, DVD-RAM, and BD-RE media may also be written as normal block devices. Formatted CD-RW and formatted DVD-RW may be used that way by help of device files /dev/pktcdvd* and program pktsetup out of udftools. Their performance with random access writing is quite poor, though. For larger amounts of data, you are better off with burn programs, which are needed for CD-R, DVD-R, DVD+R, and BD-R, anyway.
Read-write media may be used like CD-ROM media as long as only reading is desired.
Detecting and Mounting
To detect the device files of your CD/DVD/BD drives, use one of these commands
cdrskin --devices xorriso -devices
from the Debian packages with the same names.
To check which special file /dev/cdrom is a symlink to (i.e. /dev/sr0, /dev/hdc or /dev/scd0), type:
ls -al /dev/cdrom*
Mounting is often done automatically to a directory underneath /media/ when a readable medium gets inserted into a drive. You should wait with accessing it, until the drive LED stops blinking.
If no automounting is enabled, then you may mount a data CD, DVD, or BD by
sudo mount /dev/sr0 /mnt/iso
Possibly you have to create directories /mnt and/or /mnt/iso before you see success with this command.
You can use many video players on Debian to read video DVDs, including VLC, Xine (or players with a Xine backend, such as totem-xine) or MPlayer. Since most DVDs are protected by CSS (Content Scramble System) you will require the installation of libdvdread4:
# apt-get install libdvdread4
libdvdcss is required for the decryption of CSS protected-DVDs. This cannot be obtained from the Debian repositories due to licence restrictions in various countries. Please also read the /usr/share/doc/libdvdread4/README.css file.
There are various sources for libdvdcss2:
from the libdvd-pkg package (available in contrib starting from stretch and jessie-backports): this is an helper package that downloads, checks and compiles the sources from upstream and creates a .deb package.
as deb directly from the project's homepage videolan: see http://download.videolan.org/debian/
compiled from source from videolan http://download.videolan.org/pub/libdvdcss/
- Read the file INSTALL and follow the instructions, e.g.
./configure --prefix=/usr make sudo make install
- Read the file INSTALL and follow the instructions, e.g.
from the unofficial repository deb-multimedia.org
setting the region
Some DVD players require the region to be set before they are able to play encrypted DVDs. This has to be done manually with regionset. The man-pages provide help in choosing the proper country-code.
To almost quote Wikipedia, ripping is the process of copying input audio or video content (typically from an optical disc) and outputting to a "normal" storage filesystems. Ripping is typically more difficult than simple file copying (as when copying files from a flash drive or external hard drive) in that
the source content (i.e., the audio or video (or both) on the optical disc) typically is not formatted like data in a "normal" filesystem.
the source content is often encrypted (e.g., with CSS)
the user may want to include metadata (aka tags, e.g., artist name, work title, release date) in the output. This metadata will typically require some format, e.g., ID3.
This involves at least 3 separate problems (discussed in more detail here):
- reading the optical disc (which this page is largely about)
- writing to the desired output format
- gathering or authoring metadata
4GB per File limitation in ISO 9660
Optical media are often filled with an ISO 9660 aka ECMA-119 filesystem. Data files of size 4 GiB or larger are allowed by the specification of ECMA-119 Level of Interchange 3 (mkisofs option -iso-level 3).
Nevertheless, Solaris and the BSDs are unable to properly represent such files when the filesystem is mounted. On such systems one may extract large files from ISO 9660 filesystems by help of program osirrox out of the source tarball of GNU xorriso.
http://lucasmanual.com/mywiki/DVD9toDVD5 Dual layer (9G) Video DVD into single layer DVD (4.7G)
http://lucasmanual.com/mywiki/DVD9toAVI Convert DVD Video into AVI file.
http://www.tldp.org/HOWTO/CDROM-HOWTO/ The Linux CD-ROM HowTo
http://www.tldp.org/HOWTO/Hardware-HOWTO/cdrom.html Compatibility HowTo
http://www.tldp.org/HOWTO/Bootdisk-HOWTO/cd-roms.html Bootable CD-ROM HowTo