Size: 5617
Comment: libdvdcss direct download
|
← Revision 65 as of 2021-08-24 17:44:40 ⇥
Size: 8139
Comment: fix pt_BR label in header
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[it/CDDVD|Italiano]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]|| | ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/CDDVD|Français]] - [[it/CDDVD|Italiano]] - [[pt_BR/CDDVD|Português (Brasil)]] -~ |
Line 4: | Line 4: |
## If your page gets really long, uncomment this Table of Contents | |
Line 9: | Line 8: |
CD/DVD units are generally detected as /dev/hd* (i.e. if you have two hard disk and a DVD unit, /dev/hdc can be the DVD). | [[WikiPedia:Compact_disc|CDs]], [[WikiPedia:DVD|DVDs]], and [[WikiPedia:Blu-ray_Disc|BDs]] are common types of [[WikiPedia:Removable_media|removable media]]. Unlike other types of removable media (such as [[WikiPedia:USB_flash_drive|flash drives]] or [[WikiPedia:Hard_disk_drive#EXTERNAL|external hard drives]]), they are normally used read-only and many of them require special [[BurnCd|burn programs]]. I.e. they are not mounted for writing like "normal" [[FileSystem|filesystems]]. CD, DVD, and BD are [[WikiPedia:Optical_disc|optical discs]], so we can use that term to refer to them collectively. |
Line 11: | Line 20: |
== DVD == You can use many video players on Debian to read video DVDs, including [[Xine]] (or players with a Xine backend, such as totem-xine) or [[MPlayer]]. Most DVDs will require the installation of libdvdread3: |
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.) [[SymLink|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. |
Line 14: | Line 28: |
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: |
|
Line 15: | Line 32: |
# apt-get install libdvdread3 | /dev/disk/by-id/ata-HL-DT-ST_DVDRAM_GH24NSC0_K8AF33A3528 /dev/disk/by-id/usb-Optiarc_BD_RW_BD-5300S_306663601043-0:0 |
Line 17: | Line 35: |
libdvdcss2 is often required for decryption of many DVDs. This cannot be obtained from the Debian repositories due to the licence restrictions in various countries. It can be downloaded from other sources, such as debian-multimedia.org. Please read this file {{{/usr/share/doc/libdvdread3/README.Debian}}} and [[#libdvdcss2]] below. == CD == === CDROM === <!> Beware! Much of this is '''old information'''. In the age of ''devfs'' and ''udev'' (or kernel version 2.6), you may not even have an (eg.) {{{/dev/hdc}}} if your drive isn't in the machine when you boot. As of Sarge, they're intended to be used as so:{{{ (1) infidel /home/keeling_ ls -al /media total 4 drwxr-xr-x 4 root root 1024 2005-11-08 15:49 . drwxr-xr-x 23 root root 1024 2005-11-03 19:24 .. lrwxrwxrwx 1 root root 6 2005-11-03 18:12 cdrom -> cdrom0 drwxr-xr-x 2 root root 1024 2005-11-03 18:12 cdrom0 lrwxrwxrwx 1 root root 6 2005-11-08 15:49 cdrom1 -> cdrom0 lrwxrwxrwx 1 root root 7 2005-11-03 18:12 floppy -> floppy0 drwxr-xr-x 2 root root 1024 2005-11-03 18:12 floppy0 }}} Furthermore, use of ''SCSI'' emulation drivers for ''ATAPI'' interfaces is ''deprecated''. Instead, you can (and should) use the correct device name directly:{{{ cdrecord speed=8 dev=/dev/hdc -eject -tao -data /scratch/iso/track_01.img }}} ---- === Naming === The IDE CD units are called /dev/scd0 (for the first unit) and /dev/scd1 (for the second) in linux |
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. |
Line 41: | Line 40: |
=== Detecting and mounting === Use to detect your CD/DVD units: |
== Optical Media Formats == You will normally encounter two types of readable optical media and one type that is writable: === CD-DA === CD-DA contains audio tracks in a low level format that can only be read by music CD players or by specialized software like [[DebianPkg:icedax]] or {{{readom}}} from [[DebianPkg:wodim]]. Writing is done by burn programs in [[BurnCd#Audio_CD|audio mode]]. === CD-ROM === 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 [[BurnCd#Burn_the_image_file_to_CD.2C_DVD.2C_or_BD|data mode]]. === Read-Write Media === 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 [[DebianPkg: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 |
Line 44: | Line 81: |
cdrecord -scanbus | cdrskin --devices xorriso -devices |
Line 46: | Line 84: |
from the Debian packages with the same names. | |
Line 47: | Line 86: |
To check which special file /dev/cdrom is a [[SymLink|symlink]] to (i.e. /dev/hdc or /dev/scd0), type: |
To check which special file /dev/cdrom is a [[SymLink|symlink]] to (i.e. /dev/sr0, /dev/hdc or /dev/scd0), type: |
Line 53: | Line 92: |
To allow some users to play music CDs on the CD-ROM drive, do: 'chgrp cdrom /dev/hdc' ( If it is hdc) or if it is something else (i.e. /dev/scd0) do the corresponding thing. Then type 'addgroup USER_ID cdrom' to allow the user to play music CDs. Changing the group of /dev/hdc (or scd0 or whatever) is necessary, because otherwise you would need to add the user to group disk, which is bad for security. | 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. |
Line 55: | Line 96: |
You can allow any user mount cdrom adding to [[fstab]]: | If no automounting is enabled, then you may mount a data CD, DVD, or BD by |
Line 57: | Line 98: |
/dev/cdrom /mnt/auto/cdrom iso9660 noauto,users,ro 0 0 | sudo mount /dev/sr0 /mnt/iso |
Line 59: | Line 100: |
Possibly you have to create directories {{{/mnt}}} and/or {{{/mnt/iso}}} before you see success with this command. |
|
Line 60: | Line 103: |
You can see if fstab points to the right device typing: {{{ dmesg | grep ATAPI }}} |
== Watching Video DVDs == For unprotected DVDs, watching them is often as simple as installing [[VLC]] which has the function built-in and depends on the necessary libraries to watch and interact with DVDs. The same goes for others such as [[MPlayer]], DebianPkg:mpv, and DebianPkg:kaffeine However, many DVDs use the CSS (Content Scrambling System) as a form of DRM to encrypt the content of Video DVDs. To play such discs, a special library is required to decode them, WikiPedia:libdvdcss. Due to the legal limbo of libdvdcss in some particular jurisdictions, some distributions including Debian do not distribute libdvdcss directly. On [[DebianStretch|Debian 9/Stretch]] and newer versions, you can install the DebianPkg:libdvd-pkg package which automates the process of downloading and setting up the necessary library. This only requires you to have the "contrib" component enabled in your [[SourcesList]] file. === 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 DebianPkg:regionset. The man-pages provide help in choosing the proper country-code. == Ripping == To almost quote [[WikiPedia:Ripping|Wikipedia]], ''ripping'' is the process of copying input audio or video content (typically from an optical disc) and outputting to a "normal" storage [[FileSystem|filesystems]]. Ripping is typically more difficult than simple file copying (as when copying files from a [[WikiPedia:USB_flash_drive|flash drive]] or [[WikiPedia:Hard_disk_drive#EXTERNAL|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|filesystem]]. * the source content is often encrypted (e.g., with [[WikiPedia:Content_Scramble_System|CSS]]) * writing output [[WikiPedia:Comparison_of_audio_coding_formats|audio]] and [[WikiPedia:Comparison_of_container_formats|video]] files may require particular [[MultimediaCodecs|codecs]]. * 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., [[WikiPedia:ID3|ID3]]. This involves at least 3 separate problems (discussed in more detail [[Ripping|here]]): 1. reading the optical disc (which this page is largely about) 1. writing to the desired output format 1. gathering or authoring metadata |
Line 66: | Line 135: |
==== 4GB per File limitation ==== Writing _file_ larger than 4GB on an iso-9660 dvd is tricky (read [[WikiPedia:ISO_9660#The_2.2F4_GiB_file_size_limit|wikipedia]]). The easiest way might be to use UDF. * Debian's mkisofs (genisoimage) might be limited to 4GB (read [[http://www.linuxquestions.org/questions/debian-26/genisoimage-cant-make-iso-with-file-4g-581814/|this]]). |
|
Line 70: | Line 136: |
==== 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 [[https://www.gnu.org/software/xorriso/#download|GNU xorriso]]. <<Anchor(ConvertingDVD)>> |
|
Line 74: | Line 152: |
<<Anchor(libdvdcss2)>> ==== Reading encrypted DVDs ==== Some Video DVD are scrambled, and you need a library (libdvdcss2) to read them: |
|
Line 78: | Line 153: |
* Add the repository from http://www.debian-multimedia.org/debian-m.php to your: {{{ /etc/apt/source.list }}} * Add mirror like deb http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia {stable,etch,testing,lenny,unstable,sid} main (for my version it would be: {{{ deb http://enternix.physik.uni-kiel.de/debian-multimedia/ stable main }}} |
== See also == * [[BurnCd]] - working with CD/DVD/BD burners * [[CDDVDTools|CD/DVD Tools]] * [[ManipulatingISOs]] |
Line 87: | Line 158: |
Optionally add the [[http://www.debian-multimedia.org/faq.php#q1|GPG key]]. ##{{{ ##wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2007.02.14_all.deb ##dpkg -i debian-multimedia-keyring_2007.02.14_all.deb ##}}} Note that with adding this repository, you will see further different versions (e.g. Audacity) from this site. Alternatively, you can download the file ''libdvdcss'' directly from http://download.videolan.org/pub/libdvdcss/ . * Now install a dvd player called xine: {{{ aptitude update aptitude install xine-ui }}} * Install library that helps programs read DVDs: {{{ aptitude search libdvdcss2 }}} * Now install windows file format support: {{{ aptitude install w32codecs }}} * On amd64 (64 bit) architecture install: {{{ aptitude install w64codecs }}} == See also: == * [[Burner|CD/DVD Burner]] * [[CDDVDTools|CD/DVD Tools]] ---- |
== External links == * https://wiki.archlinux.org/index.php/Optical_disc_drive - Optical Disc Drive on Arch Linux wiki |
Line 124: | Line 166: |
* http://wiki.debian.org/DebianInstaller/SataAtapiHowto | --------- CategoryHardware CategorySound CategoryVideo ---------- ToDo: refactor, merge other CD/DVD related pagesq |
Translation(s): English - Français - Italiano - Português (Brasil)
Contents
Devices
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:
/dev/disk/by-id/ata-HL-DT-ST_DVDRAM_GH24NSC0_K8AF33A3528 /dev/disk/by-id/usb-Optiarc_BD_RW_BD-5300S_306663601043-0:0
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
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
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.
Read-Write Media
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.
Watching Video DVDs
For unprotected DVDs, watching them is often as simple as installing VLC which has the function built-in and depends on the necessary libraries to watch and interact with DVDs. The same goes for others such as MPlayer, mpv, and kaffeine
However, many DVDs use the CSS (Content Scrambling System) as a form of DRM to encrypt the content of Video DVDs. To play such discs, a special library is required to decode them, libdvdcss.
Due to the legal limbo of libdvdcss in some particular jurisdictions, some distributions including Debian do not distribute libdvdcss directly.
On Debian 9/Stretch and newer versions, you can install the libdvd-pkg package which automates the process of downloading and setting up the necessary library. This only requires you to have the "contrib" component enabled in your SourcesList file.
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.
Ripping
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)
writing output audio and video files may require particular codecs.
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
FAQ
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.
Converting DVD
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.
See also
BurnCd - working with CD/DVD/BD burners
External links
https://wiki.archlinux.org/index.php/Optical_disc_drive - Optical Disc Drive on Arch Linux wiki
http://www.yolinux.com/TUTORIALS/LinuxTutorialSysAdmin.html#MOUNTCD
http://www.justlinux.com/nhf/Hardware/Adding_an_IDE_CD-Writer_to_Linux.html
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/Filesystems-HOWTO-8.html 9660 FileSystem.
http://www.tldp.org/HOWTO/Bootdisk-HOWTO/cd-roms.html Bootable CD-ROM HowTo
CategoryHardware CategorySound CategoryVideo
ToDo: refactor, merge other CD/DVD related pagesq