Optical disc drive (简体中文)

From ArchWiki

来自维基百科:

在计算机领域,Optical disc drive(ODD)是一种光盘驱动器,它使用激光或可见光频谱内或附近的电磁波作为向光盘读写数据过程的一部分。

刻录

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: 是否有被 Arch Linux 打包过的命令行工具可以将文件分卷写入碟片中? (像是 GAFFitter 或 cdrkit 的 dirsplit) (Discuss in Talk:Optical disc drive (简体中文))
Warning: 有很大数量的光学驱动器和碟片是有很大不同的。通常,在需要可靠性的时候,推荐使用慢速刻录。如果你遇到了未预期的行为时,尝试使用刻录器所支持的最慢速度刻录。

光盘驱动器的刻录过程包括创建或获得一个图像并将其写入光学介质。该镜像原则上可以是任何数据文件。如果你想挂载生成的介质,那么它通常是一个ISO 9660文件系统的镜像文件。音频和多媒体光盘通常是从.bin文件刻录的,在.toc文件或.cue文件的控制下,告诉所需的轨道布局。

安装刻录工具

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Says twice that X is the traditional choice without stating why. (Discuss in Talk:Optical disc drive (简体中文))

如果你想要使用 GUI 程序,见 #Burning CD/DVD/BD with a GUI

这里列出的程序是面向命令行的。它们是大多数用于CD、DVD和BD的免费GUI程序所使用的后端。当涉及到故障排除或编写刻录活动的脚本时,GUI用户可能会用到它们。

你至少需要一个创建文件系统镜像的程序和一个能够将数据刻录到你所需要的媒体类型的程序。

可用于创建ISO9660类型镜像的应用有:

常见的选择是 mkisofs.

可用于刻录媒体文件的应用有:

常见的对于 CD 的选择有 cdrecord 而 对于 DVD 和 BD 的选择有growisofs 。为将 TOC/CUE/BIN 烧录到 CD,安装 cdrdao.

自由的 GUI 烧录程序至少依赖于一个上述包。

在这份文档中,xorrisofs 支持 mkisofs 选项。

cdrskin 支持 cdrecord 选项 ; xorrecord 在不处理音频 CD 时也支持它。

从已存在的文件构建一个 ISO 镜像

先将需要的文件拷贝到一个文件夹,是创建一个 ISO 镜像的最简单办法。例如:./for.iso

然后用 mkisofs 生成这个镜像:

$ mkisofs -V "ARCHIVE_2013_07_27" -J -r -o isoimage.iso ./for_iso

这些选项在下列的节中被解释。

基本选项

-V
(分配给)文件系统的名称。ISO 9660 标准限定了 32 字节的长度,同样,这些字符被限制为:"A"-"Z","0"-"9"以及"_"。卷标签可能展示为挂载点,如果这个介质是被自动挂载的。
-J
启用 Joliet 扩展, 允许特定空间用 Unicode 存储文件名称。(最高每个文件 64 UTF-16 字符)。
-joliet-long
增加 Joliet 表命名的最大长度,从 64 到 103 字符。 不符合Joliet规范,通常不受支持。
-r
Enables Rock Ridge 扩展,POSIX 文件系统到一个镜像,包括 255 字符长度的文件名和 Unix 风格文件拓展名。
-o
为输出的 ISO 镜像设置文件路径。

移植点

可以让 "mkisofs" 查找文件和目录从制定路径

$ mkisofs -V "BACKUP_2013_07_27" -J -r -o backup_2013_07_27.iso \
  -graft-points \
  /photos=/home/user/photos \
  /mail=/home/user/mail \
  /photos/holidays=/home/user/holidays/photos

-graft-points 允许识别由ISO文件系统中的目标地址组成的“路径规范” (如 /photos) 和源地址 (如 /home/user/photos). 使用 "=" 字符分隔。

这个例子将 文件夹 /home/user/photos/home/user/mail and /home/user/holidays/photos 分别设为 ISO 镜像中的 /photos, /mail and /photos/holidays

mkisofsxorrisofs 使用相同的参数。使用安全备份,为 xorrisofs 加上 --for_backup,这将记录事件 ACL 并为每个文件存储 MD5 校验值。

mkisofs(8)xorrisofs(1) 手册以获得更多关于命令的参数的信息。

挂载一个 ISO 镜像

你可以挂载一个 ISO 镜像,如果你想要浏览它的文件。 我们可以使用下面的指令挂载一个 ISO 镜像:

# mount -t iso9660 -o ro,loop /path/to/file.iso /mount-point

浏览完毕后,一定记得卸载:

# umount /mount-point

无 Root 用户挂载镜像,见 Mounting images as user

转换 img/ccd 到 iso

转换 img/ccd 镜像, 你可使用 ccd2iso:

$ ccd2iso ~/image.img ~/image.iso

知晓你的设备的名称

为剩余部分,假定你设的记录设备的节为 /dev/sr0

用下面的指令检查

$ cdrecord dev=/dev/sr0 -checkdrive

这将报告这个设备的 Vendor_infoIndentification

如果没有找到设备,检查一切 /dev/sr* 是否存在,当他们提供了读写权限 (wr-) 到你的组。

如果没有 /dev/sr* 存在,尝试手动加载模块 sr_mod

读取 CD/DVD 的卷名

如果你想获得名称或标签,使用dd:

$ dd if=/dev/sr0 bs=1 skip=32808 count=32

从 CD, DVD 或 BD 中创建 ISO 镜像

为从介质中拷贝数据,并不让空块填充它,先确定它的块/扇区数量与大小(多数为每个 2048)。

$ isosize -x /dev/sr0
sector count: 2041796, sector size: 2048

$ isoinfo -d -i /dev/sr0 | awk '/block size|Volume size/'
Logical block size is: 2048
Volume size is: 2041796
Note: 别忘记把/dev/sr0换成你的光驱。

然后用dd用获得的数据拷出来:

$ dd if=/dev/sr0 of=discmage.iso bs=sector_size count=sector_count status=progress
Tip: 如果介质坏了,建议用类似于 ddrescue 这样的专门工具,见 Disk cloning#Using ddrescue

如果原介质是可启动的,它的拷贝也将是一个可启动镜像。你可能将它用于虚拟机的虚拟光驱或将它烧录到光学介质,这也将是可启动的。 [1]

擦除CD-RW和DVD-RW

使用过的CD-RW介质需要在写上以前记录的数据之前被擦除。这可以通过以下方式完成

$ cdrecord -v dev=/dev/sr0 blank=fast

清空有两个选项:blank=fast 和 blank=all。完全清空的持续时间与完全写操作一样长。它覆盖了光盘上的有效载荷数据。然而这不应该被认为是安全地使这些数据不可读。为了这个目的,建议用随机数据进行几次全写运行。

替代命令有:

$ cdrskin -v dev=/dev/sr0 blank=fast
$ xorriso -outdev /dev/sr0 -blank as_needed

擦除 DVD-RW 使用 dvd+rw-format 工具来自 dvd+rw-tools:

$ dvd+rw-format -blank=fast /dev/sr0

替代命令有:

$ cdrecord -v dev=/dev/sr0 blank=fast
$ cdrskin -v dev=/dev/sr0 blank=deformat_sequential_quickest
$ xorriso -outdev /dev/sr0 -blank deformat_quickest

这种快速消隐的DVD-RW不适合多时段使用,也不能接受未预知长度的输入流。为此,人们必须使用以下方法之一:

$ cdrecord -v dev=/dev/sr0 blank=all
$ dvd+rw-format -blank=full /dev/sr0
$ cdrskin -v dev=/dev/sr0 blank=as_needed
$ xorriso -outdev /dev/sr0 -blank as_needed

其他媒体类型要么是一次性写入(CD-R、DVD-R、DVD+R、BD-R),要么是无需擦除的可重写(DVD-RAM、DVD+RW、BD-RE)。

格式化 DVD-RW

格式化过的 DVD-RW 介质可以在不提前擦除的情况下重写。所以考虑在其生命周期内格式化一次。

$ dvd+rw-format -force /dev/sr0
$ cdrskin -v dev=/dev/sr0 blank=format_if_needed
$ xorriso -outdev /dev/sr0 -format as_needed

不像 DVD-RAM, DVD+RW 和 BD-RE,格式化的 DVD-RW 无法被用于(低速)硬盘直写,而是需要驱动 ptcdvd。见 pktsetup(8)

格式化 BD-RE 和 BD-R

BD-RE 需要在使用前格式化。当检测到未格式化状态时,烧录程序会自动完成它。然而,数据存储区域的大小可能会受到上述DVD-RW格式命令的影响。

BD-R 可以是格式化的或非格式化的。非格式化的写入将会全程普通速度写入,并提供最大的存储空间。格式化的可以在写入操作时检查,坏块会从空闲块中被替换。这可能会把速度降到一半于普通速度。普通的格式化会使存储空间下降 768MiB。

growisofs 默认会格式化 BD-R,其他的不会。growisofs 可不进行格式化。cdrskin 和 xorriso 可以完全速度写入格式化的 BD-RE 或 BD-R:

 $ growisofs -use-the-force-luke=spare:none ...growisofs.or.mkisofs.options...
 $ cdrskin stream_recording=on ...cdrecord.options...
 $ xorriso -stream_recording on ...xorriso.commands...

烧录一个 ISO 镜像到 CD、DVD 或 BD。

为烧录一个 ISO 镜像文件 isoimage.iso 到光学介质, 为CD:

$ cdrecord -v -sao dev=/dev/sr0 isoimage.iso

为 DVD 或 BD:

$ growisofs -dvd-compat -Z /dev/sr0=isoimage.iso

为 CD、BD 或 DVD:

$ xorriso -as cdrecord -v dev=/dev/sr0 -dao isoimage.iso
Note:
  • 当你准备写入时,确保介质未挂载。当介质包含一个可读的文件系统时,管挂载可能是自动的。在最好的情况下,它会防止烧录程序使用烧录设备。在最坏的情况下,可能会因为读取操作弄坏设备。所以,在不能确定的情况下,
    # umount /dev/sr0
  • growisofs 有个关于 BD-R 空白介质的小 bug。它会报出一个错误信息在烧录完成后。像 k3b 这样的程序会认为整个烧录过程失败了。为防止这个问题:
    • 这样 dvd+rw-format /dev/sr0 格式化在使用 growisofs 之前。
    • 或用 growisofs 选项 -use-the-force-luke=spare:none

验证烧录的ISO镜像

你可以验证烧录的介质的完整性,以确保它不包含错误。在验证之前一定要弹出介质并重新插入。这将保证任何内核缓存不会被用来读取数据。

首先计算原始ISO镜像的MD5校验值:

$ md5sum isoimage.iso
 e5643e18e05f5646046bb2e4236986d8 isoimage.iso

之后在介质上为每个 ISO 文件系统计算 MD5。不过一些类型的介质完全提交给烧录程序相同数量的数据,很多其他的尾随的垃圾也会被读取。所以你需要限制为 ISO 镜像文件读取的大小。

$ blocks=$(expr $(du -b isoimage.iso | awk '{print $1}') / 2048)
$ dd if=/dev/sr0 bs=2048 count=$blocks | md5sum
43992+0 records in
43992+0 records out
90095616 bytes (90 MB, 86 MiB) copied, 0.359539 s, 251 MB/s
e5643e18e05f5646046bb2e4236986d8  -

每次执行都需要给出相同的 MD5 校验值(这:e5643e18e05f5646046bb2e4236986d8)。如果没有,你可能会一同获得一个 I/O 错误自 dd 的运行中。当你感兴趣的时候,dmesg 可能告诉你 SCSI 错误和块编号。

ISO 9660 和运行时烧录

没有必要存储一个应急的 ISO 文件系统在硬盘,在它写到光学介质前。在写到一个空设备缓冲区的时候,只有极老的 CD 驱动器在极老的电脑上运行会遭受错误。

如果你省略了 mkisofs-o 选项,它将写一个 ISO 镜像到标准输出。这可被用管道导到烧录程序。

$ mkisofs -V "ARCHIVE_2013_07_27" -J -r ./for_iso | \
  cdrecord -v dev=/dev/sr0 -waiti -

选项 -waiti 此处并非必须. 它避免 cdrecordmkisofs 在其输出前写入到介质。这将允许 mkisofs 排除干扰的去读取已开始烧录的介质。见关于多会话的下一节。

在 DVD 和 BD 中, 你可能让 growisofs 为你操作 mkisofs 并在运行烧录它的输出:

$ growisofs -Z /dev/sr0 -V "ARCHIVE_2013_07_27" -r -J ./for_iso

多会话

ISO-9960 多会话意味着一个介质使用只读文件系统的同时,依然可以在第一个未被使用的块地址写,并且在这个块上会有新的 ISO 树。这个新树协同于新加的或覆写的文件的数据块。数据的块在旧的 ISO 树中的,无法再被写。

Linux 和其他操作系统将挂载在介质上的最新的会话上的文件夹树。最新的树也将正常的显示旧会话的文件。

使用 cdrecord 的多会话

CD-R 和 CD-RW 在 -multi 参数使用时保持可写(或者说可追加)

$ cdrecord -v -multi dev=/dev/sr0 isoimage.iso

之后,可以用这个下一个会话的参数在介质中查询

$ m=$(cdrecord dev=/dev/sr0 -msinfo)

通过这些参数的帮助,和驱动器中的可读介质,你可以制作一个附加的 ISO 会话

$ mkisofs -M /dev/sr0 -C "$m" \
   -V "ARCHIVE_2013_07_28" -J -r -o session2.iso ./more_for_iso

最后添加这些会话到介质并使其再次可追加

$ cdrecord -v -multi dev=/dev/sr0 session2.iso

cdrskinxorrecord 也可做这些到 DVD-R, DVD+R, BD-R 和 未格式化的 DVD-RW 上。cdrecord 使多会话可被用于最新的 DVD-R 和 DVD-RW。当然,这也可用于 CD-R 和 CD-RW。

growisofsxorriso 也可做这些,并且隐藏大部分复杂操作。

Multi-session by growisofs

By default, growisofs uses mkisofs as a backend for creating ISO images forwards most of its program arguments to . See above examples of mkisofs. It bans option -o and deprecates option -C. By default it uses the mkisofs. You may specify to use one of the others compatible backend program by setting environment variable MKISOFS:

$ export MKISOFS="xorrisofs"

The wish to begin with a new ISO file system on the optical medium is expressed by option -Z

$ growisofs -Z /dev/sr0 -V "ARCHIVE_2013_07_27" -r -J ./for_iso

The wish to append more files as new session to an existing ISO file system is expressed by option -M

$ growisofs -M /dev/sr0 -V "ARCHIVE_2013_07_28" -r -J ./more_for_iso

For details see the growisofs(1) manual and the manuals of mkisofs and xorrisofs.

Multi-session by xorriso

xorriso learns the wish to begin with a new ISO file system from the blank state of the medium. So it is appropriate to blank it if it contains data. The command -blank as_needed applies to all kinds of re-usable media and even to ISO images in data files on hard disk. It does not cause error if applied to a blank write-once medium.

$ xorriso -outdev /dev/sr0 -blank as_needed \
          -volid "ARCHIVE_2013_07_27" -joliet on -add ./for_iso --

On non-blank writable media xorriso appends the newly given disc files if command -dev is used rather than -outdev. Of course, no command -blank should be given here

$ xorriso -dev /dev/sr0 \
          -volid "ARCHIVE_2013_07_28" -joliet on -add ./more_for_iso --

For details see the xorriso(1) man page and especially its examples.

BD Defect Management

BD-RE and formatted BD-R media are normally written with enabled Defect Management. This feature reads the written blocks while they are still stored in the drive buffer. In case of poor read quality the blocks get written again or redirected to the Spare Area where the data get stored in replacement blocks.

This checkreading reduces write speed to at most half of the nominal speed of drive and BD medium. Sometimes it is even worse. Heavy use of the Spare Area causes long delays during read operations. So Defect Management is not always desirable.

cdrecord does not format BD-R. It has no means to prevent Defect Management on BD-RE media, though.

growisofs formats BD-R by default. The Defect Management can be prevented by option -use-the-force-luke=spare:none. It has no means to prevent Defect Management on BD-RE media, though.

cdrskin, xorriso and xorrecord do not format BD-R by default. They do with cdrskin blank=format_if_needed, resp. xorriso -format as_needed, resp. xorrecord blank=format_overwrite. These three programs can disable Defect Management with BD-RE and already formatted BD-R by cdrskin stream_recording=on, resp. xorriso -stream_recording on, resp. xorrecord stream_recording=on.

Burning an audio CD

Create your audio tracks and store them as uncompressed, 16-bit, 44100-Hz, stereo WAV files. To convert MP3 to WAV, ensure lame is installed, cd to the directory with your MP3 files, and run:

$ for i in *.mp3; do lame --decode "$i" "$(basename "$i" .mp3)".wav; done

In case you get an error when trying to burn WAV files converted with LAME, try decoding with mpg123:

$ for i in *.mp3; do mpg123 --rate 44100 --stereo --buffer 3072 --resync -w $(basename "$i" .mp3).wav $i; done

To convert AAC to WAV ensure faad2 is installed and run:

$ for i in *.m4a; do faad $i; done

To fix the bitrate of an already existing WAV file (or many other formats), try using sox:

$ for i in *.wav; do sox "$i" -c 2 -r 44100 "$(basename "$i" .wav)"-ok.wav; done

Name the audio files in a manner that will cause them to be listed in the desired track order when listed alphabetically, such as 01.wav, 02.wav, 03.wav, etc. Use the following command to simulate burning the WAV files as an audio CD:

$ cdrecord -dummy -v -pad speed=1 dev=/dev/sr0 -dao -swab *.wav

If everything worked, you can remove the -dummy flag to actually burn the CD.

Note: The produced disc may not play in all CD players. For an audio-only disc (discarding some track metadata), add the -audio flag.

To test the new audio CD, use MPlayer:

$ mplayer cdda://

Burning a BIN/CUE

To burn a BIN/CUE image run:

$ cdrdao write --device /dev/sr0 image.cue

TOC/CUE/BIN for mixed-mode discs

ISO images only store a single data track. If you want to create an image of a mixed-mode disc (data track with multiple audio tracks) then you need to make a TOC/BIN pair:

$ cdrdao read-cd --read-raw --datafile image.bin --driver generic-mmc:0x20000 --device /dev/cdrom image.toc

Some software only likes CUE/BIN pair, you can make a CUE sheet with toc2cue (part of cdrdao):

$ toc2cue image.toc image.cue

Burn backend problems

If you are experiencing problems, you may ask for advise at mailing list cdwrite@other.debian.org, or try to write to the one of support mail addresses if some are listed near the end of the program's man page.

Tell the command lines you tried, the medium type (如 CD-R, DVD+RW, ...), and the symptoms of failure (program messages, disappointed user expectation, ...). You will possibly get asked to obtain the newest release or development version of the affected program and to make test runs. But the answer might as well be, that your drive dislikes the particular medium.

Burning CD/DVD/BD with a GUI

There are several applications available to burn CDs in a graphical environment.

See also Wikipedia:Comparison of disc authoring software.

  • AcetoneISO — All-in-one ISO tool (supports BIN, MDF, NRG, IMG, DAA, DMG, CDI, B5I, BWI, PDI and ISO).
https://sourceforge.net/projects/acetoneiso || acetoneiso2AUR
  • BashBurn — Lightweight terminal based menu frontend for CD/DVD burning tools.
http://bashburn.dose.se/ || bashburn
  • Brasero — Disc burning application for the GNOME desktop that is designed to be as simple as possible.
https://wiki.gnome.org/Apps/Brasero || brasero
  • cdw — Ncurses frontend to cdrecord, mkisofs, growisofs, dvd+rw-mediainfo, dvd+rw-format and xorriso.
http://cdw.sourceforge.net/ || cdwAUR
  • Graveman — GTK-based CD/DVD burning application. It requires configuration to point to correct devices.
https://graveman.tuxfamily.org/ || gravemanAUR
  • isomaster — ISO image editor.
http://littlesvr.ca/isomaster || isomasterAUR
  • K3b — Feature-rich and easy to handle CD burning and ripping application based on KDElibs.
https://userbase.kde.org/K3b || k3b
  • X-CD-Roast — Lightweight cdrtools front-end for CD and DVD writing.
http://www.xcdroast.org/ || xcdroastAUR
  • Xfburn — Simple front-end to the libburnia libraries with support for CD/DVD(-RW), ISO images, and BurnFree.
https://docs.xfce.org/apps/xfburn/start || xfburn
  • xorriso-tcltk — Graphical front-end to ISO and CD/DVD/BD burn tool xorriso
https://www.gnu.org/software/xorriso/ || libisoburn

播放

CD

CD的音频播放需要libcdio 软件包。为了使KDE应用程序如Dolphin能够读取CD中的音频,你需要安装audiocd-kio

DVD

如果你想播放加密的DVD,你必须安装诸如libdvd*软件包。

除此之外,你还需要安装媒体播放器。热门的DVD播放器包括MPlayer, xineVLC。 参见 视频播放 上的列表和对于 MPlayer 的特殊介绍。

Blu-ray

参见 Blu-ray#Playback

Ripping

Ripping is the process of copying audio or video content to a hard disk, typically from removable media or media streams.

Audio CD

Console

  • abcde — Comprehensive command-line tool for ripping audio CDs.
https://abcde.einval.com/ || abcdeAUR
  • cdda2wav — CD-audio extraction program with paranoia support.
http://www.cdda2wav.de/ || cdrtools
  • cdparanoia — Compact Disc Digital Audio (CDDA) Digital Audio Extraction (DAE) tool.
https://xiph.org/paranoia/index.html || cdparanoia
  • cyanrip — Extensive CD ripper with musicbraniz integration, error detection, log generation, many formats, HDCD decoding, covert art automatic download.
https://github.com/cyanreg/cyanrip/ || cyanripAUR
  • ripright — Minimal CD ripper modeled on autorip.
https://www.mcternan.me.uk/ripright/ || riprightAUR
  • ripit — Command-line ripper that supports MusicBrainz, freeddb and various codecs.
https://www.ripit.pl/ || ripitAUR
  • shnsplit — Splits .wav and .flac files according to a CUE sheet and encodes the resulting pieces. A useful companion to ABCDE.
http://shnutils.freeshell.org/shntool/ || shntoolAUR
  • whipper — CD ripper aiming for accuracy over speed. Uses cdparanoia, MusicBrainz, AccurateRip.
https://github.com/whipper-team/whipper || whipper

Graphical

  • Asunder — GTK-based CD ripping program.
http://littlesvr.ca/asunder/ || asunder
  • Audex — Audio grabber tool for CD-ROM drives based on KDE.
https://userbase.kde.org/Audex || audex
  • fre:ac — Audio converter and CD ripper with support for various popular formats and encoders.
https://freac.org/ || freacAUR
  • Goobox — CD player and ripper for GNOME.
https://people.gnome.org/~paobac/goobox/[dead link 2022-09-22 ⓘ] || goobox
  • Grip — Fast and light CD ripper within the GNOME project that resembles Audiograbber.
https://sourceforge.net/projects/grip/ || gripAUR.
  • K3b — Feature-rich and easy to handle CD/DVD burning and ripping application based on KDElibs.
https://userbase.kde.org/K3b || k3b
https://invent.kde.org/unmaintained/kaudiocreator || kaudiocreator-gitAUR
  • ripperX — GTK program to rip CD audio tracks and encode them to the Ogg, MP3, or FLAC formats.
https://sourceforge.net/projects/ripperx/ || ripperxAUR
  • rubyripper — Audio disc ripper that tries to deliver a secure rip through multiple rippings of the same track and corrections of any differences.
https://github.com/bleskodev/rubyripper || rubyripperAUR
https://wiki.gnome.org/Apps/SoundJuicer || sound-juicer
  • soundKonverter — Front-end to various audio converters.
https://www.linux-apps.com/content/show.php?content=29024 || soundkonverter

DVD-Video

See also Wikipedia:Comparison of DVD ripper software.

Often, the process of ripping a DVD can be broken down into two subtasks:

  1. Data extraction — Copying the audio and/or video data to a hard disk,
  2. Transcoding — Converting the extracted data into a suitable format.

Some utilities perform both tasks, whilst others focus on one aspect or the other.

Console

  • dvdbackup — Tool for pure data extraction which does not transcode. It is useful for creating exact copies of encrypted DVDs in conjunction with libdvdcss or for decrypting video for other utilities unable to read encrypted DVDs.
http://dvdbackup.sourceforge.net/ || dvdbackup
  • FFmpeg — Complete and free Internet live audio and video broadcasting solution for Linux/Unix, capable to do a direct rip in any format (audio/video) from a DVD-Video ISO image, just select the input as the ISO image and proceed with the desired options. It also allows to downmixing, shrinking, spliting, selecting streams among other features.
https://ffmpeg.org/ || ffmpeg
  • HandBrake CLI — Simple yet powerful video transcoder ideal for batch mkv/x264 ripping.
https://handbrake.fr/ || handbrake-cli
  • MEncoder — Free command line video decoding, encoding and filtering tool. It supports ripping and transcoding DVD-Video.
http://www.mplayerhq.hu/ || mencoder
  • subtitleripper — Convert DVD subtitles into text format.
http://subtitleripper.sourceforge.net/ || subtitleripperAUR
|| transcode
  • Vobcopy — Copies DVD .vob files to hard disk, decrypting them on the way.
https://github.com/barak/vobcopy || vobcopyAUR

Graphical

  • dvd::rip — Front-end to transcode, used to extract DVD's to the hard disk and transcode or extract and transcode on-the-fly.
https://www.exit1.org/dvdrip/ || dvdripAUR
  • HandBrake — Simple yet powerful video transcoder ideal for batch mkv/x264 ripping. GTK version.
https://handbrake.fr/ || handbrake
  • K3b — Feature-rich and easy to handle CD/DVD burning and ripping application based on KDElibs.
https://userbase.kde.org/K3b || k3b
  • OGMRip — An application and a set of libraries for ripping and encoding DVD into AVI, OGM, MP4, or Matroska files using a wide variety of codecs. It relies on mplayer, mencoder, ogmtools, mkvtoolnix, mp4box, oggenc, lame, and faac to perform its tasks.
http://ogmrip.sourceforge.net/ || ogmripAUR

DVD-Audio

  • Python Audio Tools — Includes dvda2track, which is easy to use command line tool to extract DVD-Audio tracks to uncompressed wav files.
http://audiotools.sourceforge.net/ || audiotoolsAUR

Multi-format

  • Aaru — Software for archival ripping of CDs, DVDs, and harddrives
https://aaru.app || aaruAUR

Troubleshooting

Brasero fails to normalize audio CD

If you try to burn it may stop at the first step called Normalization.

As a workaround you can disable the normalization plugin using the Edit > Plugins menu

VLC: Error "... could not open the disc /dev/dvd"

If you get an error like

vlc dvdread could not open the disc "/dev/dvd"

it may be because there is no device node /dev/dvd on your system. Udev no longer creates /dev/dvd and instead uses /dev/sr0. To fix this, edit the VLC configuration file (~/.config/vlc/vlcrc):

# DVD device (string)
dvd=/dev/sr0

DVD drive is noisy

If playing DVD videos causes the system to be very loud, it may be because the disc is spinning faster than it needs to. To temporarily change the speed of the drive, run:

# eject -x 12 /dev/dvd

Sometimes:

# hdparm -E12 /dev/dvd

Any speed that is supported by the drive can be used, or 0 for the maximum speed.

Setting CD-ROM and DVD-ROM drive speed

Playback does not work with new computer (new DVD-Drive)

If playback does not work and you have a new computer (new DVD-Drive) the reason might be that the region code is not set. You can read and set the region code with the regionsetAUR package.

None of the above programs are able to rip/encode a DVD to my hard disk!

Make sure the region of your DVD reader is set correctly; otherwise, you will get loads of inexplicable CSS-related errors. Use the regionsetAUR package to do so.

If ripping still does not work with the correct region set, refer to the libdvdcss developer documentation for enabling log messages and setting other relevant options.

GUI program log indicates problems with backend program

If you use a GUI program and experience problems which the program's log blames on some backend program, then try to reproduce the problem by the logged backend program arguments. Whether you succeed with reproducing or not, you may report the logged lines and your own findings to the places mentioned in #Burn backend problems section.

Special case: medium error / write error

Here are some typical messages about the drive disliking the medium. This can only be solved by using a different drive or a different medium. A different program will hardly help.

Brasero with backend growisofs:

BraseroGrowisofs stderr: :-[ WRITE@LBA=0h failed with SK=3h/ASC=0Ch/ACQ=00h]: Input/output error

Brasero with backend libburn:

BraseroLibburn Libburn reported an error SCSI error on write(16976,16): [3 0C 00] Write error

BD-R DL 50GB errors on trying to burn second layer

Using growisofs from dvd+rw-tools for burning 50GB BD-R DL discs might result in a fatal error and damaged media, such as:

$ growisofs -Z /dev/sr0 -J -R -V "label" files
Executing 'mkisofs -J -R -V label files | builtin_dd of=/dev/sr0 obs=32k seek=0'
I: -input-charset not specified, using utf-8 (detected in locale settings)
  0.03% done, estimate finish Fri Jan 29 19:50:36 2016
  0.05% done, estimate finish Fri Jan 29 19:50:36 2016
  0.08% done, estimate finish Fri Jan 29 19:50:36 2016
/dev/sr0: pre-formatting blank BD-R for 49.8GB...
/dev/sr0: "Current Write Speed" is 8.2x4390KBps.
  0.11% done, estimate finish Sat Jan 30 03:29:13 2016
  0.13% done, estimate finish Sat Jan 30 02:10:01 2016
...
 63.20% done, estimate finish Fri Jan 29 20:43:45 2016
:-[ WRITE@LBA=b6d820h failed with SK=3h/WRITE ERROR]: Input/output error
:-( write failed: Input/output error
/dev/sr0: flushing cache
/dev/sr0: closing track
/dev/sr0: closing session
:-[ CLOSE SESSION failed with SK=5h/INVALID FIELD IN CDB]: Input/output error
/dev/sr0: reloading tray

This happened at the 25GB boundary when starting to write the second layer. Using cdrecord from cdrtools works with no problems. Tested with a 'HL-DT-ST BD-RE WH16NS40' LG burner, and Verbatim BD-R DL 6x discs (#96911). FS#47797

Disc tray autocloses

If after ejecting a cd, either by using the eject command, or pushing the drive button, the drive disc tray autocloses before being able to remove the disc, try the following command:

# sysctl -w dev.cdrom.autoclose=0

If that solves the problem, make the change permanent:

/etc/sysctl.d/60-cdrom-autoclose.conf
dev.cdrom.autoclose = 0

If the above does not work and as a last resort measure, you can unload the disc module from the kernel via:

# rmmod sr_mod

the disc drive should now behave as expected but will not mount disc anymore. After putting a disc into the drive, reactivate the module via:

# modprobe sr_mod

the disc should now mount.

See also