https://wiki.archlinux.org/api.php?action=feedcontributions&user=Adb&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:13:44ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Optical_disc_drive&diff=417399Optical disc drive2016-01-27T15:52:30Z<p>Adb: /* Burning an audio CD */ Note on stereo WAV files and how to convert mono tracks to stereo.</p>
<hr />
<div>[[Category:Multimedia]]<br />
[[Category:Optical]]<br />
[[es:Optical disc drive]]<br />
[[it:Optical disc drive]]<br />
[[ja:光学ディスクドライブ]]<br />
[[ru:Optical disc drive]]<br />
[[zh-cn:Optical disc drive]]<br />
{{Related articles start}}<br />
{{Related|Codecs}}<br />
{{Related|MPlayer}}<br />
{{Related|dvdbackup}}<br />
{{Related|MEncoder}}<br />
{{Related|BluRay}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Optical disc drive|Wikipedia]]:<br />
<br />
:In computing, an optical disc drive (ODD) is a disk drive that uses laser light or electromagnetic waves within or near the visible light spectrum as part of the process of reading or writing data to or from optical discs. Some drives can only read from discs, but recent drives are commonly both readers and recorders, also called burners or writers. Compact discs, DVDs, and Blu-ray discs are common types of optical media which can be read and recorded by such drives. Optical drive is the generic name; drives are usually described as "CD" "DVD", or "Blu-ray", followed by "drive", "writer", etc.<br />
<br />
== Burning ==<br />
<br />
{{Warning|The quality of optical drives and the discs themselves varies greatly. Generally, using a slow burn speed is recommended for reliable burns. If you are experiencing unexpected behaviour from the disc, try burning at the lowest speed supported by your burner.}}<br />
<br />
The burning process of optical disc drives consists of creating or obtaining an image and writing it to an optical medium. The image may in principle be any data file. If you want to mount the resulting medium, then it is usually an ISO 9660 file system image file. Audio and multi-media CDs are often burned from a ''.bin'' file, under control of a ''.toc'' file or a ''.cue'' file which tell the desired track layout.<br />
<br />
=== Install burning utilities ===<br />
<br />
If you want to use programs with graphical user interface, then follow [[#Burning CD/DVD/BD with a GUI]].<br />
<br />
The programs listed here are command line oriented. They are the back ends which are used by most free GUI programs for CD, DVD, and BD. GUI users might get to them when it comes to troubleshooting or to scripting of burn activities.<br />
<br />
You need at least one program for creation of file system images and one program that is able to burn data onto your desired media type.<br />
<br />
Available programs for ISO 9660 image creation are:<br />
<br />
* ''mkisofs'' from {{Pkg|cdrtools}}<br />
* ''xorriso'' and ''xorrisofs'' from {{Pkg|libisoburn}}<br />
* ''genisoimage'' from {{Pkg|cdrkit}} (unmaintained)<br />
<br />
The traditional choice is ''mkisofs''.<br />
<br />
Available programs for burning to media are:<br />
<br />
* ''cdrdao'' from {{Pkg|cdrdao}} (CD only, TOC/CUE/BIN only)<br />
* ''cdrecord'' from {{Pkg|cdrtools}}<br />
* ''cdrskin'' from {{Pkg|libburn}}<br />
* ''growisofs'' from {{Pkg|dvd+rw-tools}} (DVD and BD only)<br />
* ''xorriso'' and ''xorrecord'' from {{Pkg|libisoburn}}<br />
* ''wodim'' from {{Pkg|cdrkit}} (CD only, DVD deprecated, unmaintained)<br />
<br />
The traditional choices are ''cdrecord'' for CD and ''growisofs'' for DVD and Blu-ray Disk. For writing TOC/CUE/BIN files to CD, install {{Pkg|cdrdao}}.<br />
<br />
The free GUI programs for CD, DVD, and BD burning depend on at least one of the above packages.<br />
<br />
Both ''genisoimage'' and ''xorrisofs'' support the ''mkisofs'' options which are shown in this document.<br />
<br />
Both ''wodim'' and ''cdrskin'' support the shown ''cdrecord'' options; ''xorrecord'' also supports those which do not deal with audio CD.<br />
<br />
{{Note|{{Pkg|cdrkit}} and {{Pkg|cdrtools}} are in conflict. Install only one of them. {{Pkg|cdrtools}} is recommended: see {{bug|46114}}.}}<br />
<br />
=== Making an ISO image from existing files on hard disk ===<br />
<br />
The simplest way to create an ISO image is to first copy the needed files to one directory, for example: {{ic|./for_iso}}.<br />
<br />
Then generate the image file with ''mkisofs'':<br />
<br />
$ mkisofs -V "''ARCHIVE_2013_07_27''" -J -r -o ''isoimage.iso'' ''./for_iso''<br />
<br />
Each of those options are explained in the following sections.<br />
<br />
==== Basic options ====<br />
<br />
;{{ic|-V}}: Specifies the name (that is assigned to) of the file system. The ISO 9660 standard specs impose the limitations of 32-character string length, as well as limiting the characters allowed to sets of: "A" to "Z", "0" to "9", and "_". This volume label will probably show up as mount point if the medium is mounted automatically.<br />
;{{ic|-J}}: Enables [[Wikipedia:Joliet (file system)|Joliet]] extension, which allocates special space to store file names in Unicode (up to 64 UTF-16 characters for each file).<br />
;{{ic|-joliet-long}}: Increases maximum length of file names from 64 to 103 UTF-16 characters in Joliet table. Non-compliant to Joliet specs and not commonly supported.<br />
;{{ic|-r}}: Enables [[Wikipedia:Rock Ridge]] extension, which adds POSIX file system semantics to an image, including support of long 255-character filenames and Unix-style file permissions.<br />
;{{ic|-o}}: Sets the file path for the resulting ISO image.<br />
<br />
==== graft-points ====<br />
<br />
It is also possible to let ''mkisofs'' to collect files and directories from various paths<br />
<br />
$ mkisofs -V "''BACKUP_2013_07_27''" -J -r -o ''backup_2013_07_27.iso'' \<br />
-graft-points \<br />
''/photos=/home/user/photos \<br />
/mail=/home/user/mail \<br />
/photos/holidays=/home/user/holidays/photos''<br />
<br />
;{{ic|-graft-points}}: Enables the recognition of ''pathspecs'' which consist of a target address in the ISO file system (e.g. {{ic|/photos}}) and a source address on hard disk (e.g. {{ic|/home/user/photos}}). Both are separated by a "=" character.<br />
<br />
So this example puts the disk directory {{ic|/home/user/photos}}, {{ic|/home/user/mail}} and {{ic|/home/user/holidays/photos}}, respectively in the ISO image as {{ic|/photos}}, {{ic|/mail}} and {{ic|/photos/holidays}}.<br />
<br />
Programs ''mkisofs'' and ''xorrisofs'' accept the same options. For secure backups, consider using ''xorrisofs'' with option {{ic|--for_backup}}, which records eventual ACLs and stores an MD5 checksum for each data file.<br />
<br />
See the manuals of the ISO 9660 programs for more info about their options:<br />
* [http://linux.die.net/man/1/genisoimage genisoimage]<br />
* [http://cdrtools.sourceforge.net/private/man/cdrecord/index.html mkisofs]<br />
* [https://www.gnu.org/software/xorriso/man_1_xorrisofs.html xorrisofs]<br />
<br />
=== Mounting an ISO image ===<br />
<br />
You can mount an ISO image if you want to browse its files.<br />
To mount the ISO image, we can use:<br />
# mount -t iso9660 -o ro,loop ''/path/to/file.iso'' ''/mount-point''<br />
<br />
Do not forget to unmount the image when your inspection of the image is done:<br />
<br />
# umount /mount-point<br />
<br />
See also [[Mounting images as user]] for mounting without root privileges.<br />
<br />
=== Converting img/ccd to an ISO image ===<br />
<br />
To convert an {{ic|img}}/{{ic|ccd}} image, you can use {{Pkg|ccd2iso}}:<br />
<br />
$ ccd2iso ''~/image.img'' ''~/image.iso''<br />
<br />
=== Learning the name of your optical drive ===<br />
<br />
For the remainder of this section the name of your recording device is assumed to be {{ic|/dev/sr0}}.<br />
<br />
Check this by<br />
<br />
$ cdrecord dev=''/dev/sr0'' -checkdrive<br />
<br />
which should report {{ic|Vendor_info}} and {{ic|Identification}} fields of the drive.<br />
<br />
If no drive is found, check whether any {{ic|/dev/sr*}} exist and whether they offer read/write permission ({{ic|wr-}}) to you or your group.<br />
If no {{ic|/dev/sr*}} exists then try<br />
<br />
# modprobe sr_mod<br />
<br />
=== Reading the volume label of a CD or DVD ===<br />
<br />
If you want to get the name/label of the media, use ''dd'':<br />
<br />
$ dd if=''/dev/sr0'' bs=1 skip=32808 count=32<br />
<br />
=== Reading an ISO image from a CD, DVD, or BD ===<br />
<br />
You should determine the size of the ISO file system before copying it to hard disk. Most media types deliver more data than was written to them with the most recent burn run.<br />
<br />
Use program ''isosize'' out of package {{Pkg|util-linux}} to obtain the count of blocks to read:<br />
<br />
$ blocks=$(isosize -d 2048 ''/dev/sr0'')<br />
<br />
Have a look whether the obtained number of blocks is plausible<br />
<br />
{{hc|$ echo "That would be $(expr $blocks / 512) MB"|<br />
That would be 589 MB<br />
}}<br />
<br />
Then copy the determined amount of data from medium to hard disk:<br />
<br />
$ dd if=''/dev/sr0'' of=''isoimage.iso'' bs=2048 count=$blocks<br />
<br />
Omit {{ic|1= count=$blocks}} if you did not determine the size. You will probably get more data than needed. The resulting file will nevertheless be mountable. It should still fit onto a medium of the same type as the medium from which the image was copied.<br />
<br />
If the original medium was bootable, then the copy will be a bootable image. You may use it as pseudo CD for a virtual machine or burn it onto optical media which should then become bootable.<br />
<br />
=== Erasing CD-RW and DVD-RW ===<br />
<br />
Used CD-RW media need to be erased before you can write over the previously recorded data. This is done by<br />
<br />
$ cdrecord -v dev=''/dev/sr0'' blank=fast<br />
<br />
There are two options for blanking: {{ic|1=blank=fast}} and {{ic|1=blank=full}}. Full blanking is many times slower than fast, but with using fast you are losing ability of multi-session burning and recording of streams of unpredicted length. Also note than with fast blanking your data is not physically destroyed on disk and can be restored, which may be undesirable.<br />
<br />
Alternative commands are:<br />
<br />
$ wodim -v dev=''/dev/sr0'' blank=all<br />
$ cdrskin -v dev=''/dev/sr0'' blank=all<br />
$ xorriso -outdev ''/dev/sr0'' -blank as_needed<br />
<br />
To erase the DVD-RW use the ''dvd+rw-format'' utility from {{Pkg|dvd+rw-tools}}:<br />
<br />
$ dvd+rw-format -blank=fast ''/dev/sr0''<br />
<br />
Alternative commands are:<br />
<br />
$ cdrskin -v dev=''/dev/sr0'' blank=format_overwrite<br />
$ xorriso -outdev ''/dev/sr0'' -format as_needed<br />
<br />
Formatted DVD+RW (note for {{ic|+}}!) media can be overwritten without such erasure. So consider to apply once in their life time<br />
<br />
$ dvd+rw-format -force ''/dev/sr0''<br />
<br />
All other media are either write-once (CD-R, DVD-R, DVD+R, BD-R) or are overwritable without the need for erasing (DVD-RAM, BD-RE).<br />
<br />
=== Burning an ISO image to CD, DVD, or BD ===<br />
<br />
To burn a readily prepared ISO image file {{ic|isoimage.iso}} onto an optical medium, run for CD:<br />
<br />
$ cdrecord -v -sao dev=''/dev/sr0'' ''isoimage.iso''<br />
<br />
and for DVD or BD:<br />
<br />
$ growisofs -dvd-compat -Z ''/dev/sr0''=''isoimage.iso''<br />
<br />
{{Note|1=<br />
* Make sure that the medium is not mounted when you begin to write to it. Mounting may happen automatically if the medium contains a readable file system. In the best case, it will prevent the burn programs from using the burner device. In the worst case, there will be misburns because read operations disturbed the drive.<br />
So if in doubt, do:<br />
# umount /dev/sr0<br />
* ''growisofs'' has a [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713016 small bug] with blank BD-R media. It issues an error message after the burning is complete. Programs like ''k3b'' then believe the whole burn run failed.<br />
To prevent this, either<br />
** format the blank BD-R by {{ic|dvd+rw-format ''/dev/sr0''}} before submitting it to ''growisofs''<br />
** or use ''growisofs'' option {{ic|1= -use-the-force-luke=spare:none}}<br />
}}<br />
<br />
=== Verifying the burnt ISO image ===<br />
<br />
You can verify the integrity of the burnt medium to make sure it contains no errors. Always eject the medium and reinsert it before verifying. It will guarantee that not any kernel cache will be used to read the data.<br />
<br />
First calculate the MD5 checksum of the original ISO image:<br />
<br />
{{hc|$ md5sum isoimage.iso|<br />
e5643e18e05f5646046bb2e4236986d8 isoimage.iso<br />
}}<br />
<br />
Next calculate the MD5 checksum of the ISO file system on the medium.<br />
Although some media types deliver exactly the same amount of data as have been submitted to the burn program, many others append trailing garbage when being read. So you should restrict reading to the size of the ISO image file.<br />
<br />
$ blocks=$(expr $(du -b isoimage.iso | awk '{print $1}') / 2048)<br />
<br />
{{hc|<nowiki>$ dd if=/dev/sr0 bs=2048 count=$blocks | md5sum</nowiki>|<br />
43992+0 records in<br />
43992+0 records out<br />
90095616 bytes (90 MB) copied, 0.359539 s, 251 MB/s<br />
e5643e18e05f5646046bb2e4236986d8 -<br />
}}<br />
<br />
Both runs should yield the same MD5 checksum (here: {{ic|e5643e18e05f5646046bb2e4236986d8}}). If they do not, you will probably also get an I/O error message from the {{ic|dd}} run. {{ic|dmesg}} might then tell about SCSI errors and block numbers, if you are interested.<br />
<br />
=== ISO 9660 and burning on-the-fly ===<br />
<br />
It is not necessary to store an emerging ISO file system on hard disk before writing it to optical media. Only very old CD drives at very old computers could suffer failed burns due to empty drive buffer.<br />
<br />
If you omit option {{ic|-o}} from ''mkisofs'' then it writes the ISO image to standard output. This can be piped into the standard input of burn programs.<br />
<br />
$ mkisofs -V "ARCHIVE_2013_07_27" -J -r ./for_iso | \<br />
cdrecord -v dev=/dev/sr0 -waiti -<br />
<br />
Option {{ic|-waiti}} is not really needed here. It prevents ''cdrecord'' from writing to the medium before ''mkisofs'' starts its output. This would allow ''mkisofs'' to read the medium without disturbing an already started burn run. See next section about multi-session.<br />
<br />
On DVD and BD, you may let ''growisofs'' operate ''mkisofs'' for you and burn its output on-the-fly<br />
<br />
$ growisofs -Z ''/dev/sr0'' -V "''ARCHIVE_2013_07_27''" -r -J ''./for_iso''<br />
<br />
=== Multi-session ===<br />
<br />
ISO 9660 multi-session means that a medium with readable file system is still writable at its first unused block address, and that a new ISO directory tree gets written to this unused part. The new tree is accompanied by the content blocks of newly added or overwritten data files. The blocks of data files, which shall stay as in the old ISO tree, will not be written again.<br />
<br />
Linux and many other operating systems will mount the directory tree in the last session on the medium. This youngest tree will normally show the files of the older sessions, too.<br />
<br />
==== Multi-session by cdrecord ====<br />
<br />
CD-R and CD-RW stay writable (aka "appendable") if cdrecord option {{ic|-multi}} was used<br />
<br />
$ cdrecord -v -multi dev=''/dev/sr0'' ''isoimage.iso''<br />
<br />
Then the medium can be inquired for the parameters of the next session<br />
<br />
$ m=$(cdrecord dev=''/dev/sr0'' -msinfo)<br />
<br />
By help of these parameters and of the readable medium in the drive you can produce the add-on ISO session<br />
<br />
$ mkisofs -M ''/dev/sr0'' -C "$m" \<br />
-V "''ARCHIVE_2013_07_28''" -J -r -o ''session2.iso'' ''./more_for_iso''<br />
<br />
Finally append the session to the medium and keep it appendable again<br />
<br />
$ cdrecord -v -multi dev=''/dev/sr0'' ''session2.iso''<br />
<br />
Programs ''cdrskin'' and ''xorrecord'' do this too with DVD-R, DVD+R, BD-R and unformatted DVD-RW. Program ''cdrecord'' does multi-session with at least DVD-R and DVD-RW. They all do with CD-R and CD-RW, of course.<br />
<br />
Most re-usable media types do not record a session history that would be recognizable for a mounting kernel. But with ISO 9660 it is possible to achieve the multi-session effect even on those media.<br />
<br />
''growisofs'' and ''xorriso'' can do this and hide most of the complexity.<br />
<br />
==== Multi-session by growisofs ====<br />
<br />
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 {{ic|-o}} and deprecates option {{ic|-C}}. By default it uses the ''mkisofs''. You may specify to use one of the others compatible backend program by setting environment variable {{ic|MKISOFS}}:<br />
<br />
$ export MKISOFS="genisoimage"<br />
$ export MKISOFS="xorrisofs"<br />
<br />
The wish to begin with a new ISO file system on the optical medium is expressed by option {{ic|-Z}}<br />
<br />
$ growisofs -Z ''/dev/sr0'' -V "''ARCHIVE_2013_07_27''" -r -J ''./for_iso''<br />
<br />
The wish to append more files as new session to an existing ISO file system is expressed by option {{ic|-M}}<br />
<br />
$ growisofs -M ''/dev/sr0'' -V "''ARCHIVE_2013_07_28''" -r -J ''./more_for_iso''<br />
<br />
For details see the [http://linux.die.net/man/1/growisofs growisofs manual] and the manuals of ''genisoimage'', ''mkisofs'' and ''xorrisofs''.<br />
<br />
==== Multi-session by xorriso ====<br />
<br />
''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 {{ic|-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.<br />
<br />
$ xorriso -outdev ''/dev/sr0'' -blank as_needed \<br />
-volid "''ARCHIVE_2013_07_27''" -joliet on -add ''./for_iso'' --<br />
<br />
On non-blank writable media ''xorriso'' appends the newly given disk files if command {{ic|-dev}} is used rather than {{ic|-outdev}}. Of course, no command {{ic|-blank}} should be given here<br />
<br />
$ xorriso -dev ''/dev/sr0'' \<br />
-volid "''ARCHIVE_2013_07_28''" -joliet on -add ''./more_for_iso'' --<br />
<br />
For details see the [https://www.gnu.org/software/xorriso/man_1_xorriso.html manual page] and especially its [https://www.gnu.org/software/xorriso/man_1_xorriso.html#EXAMPLES examples]<br />
<br />
=== BD Defect Management ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
''cdrecord'' does not format BD-R. It has no means to prevent Defect Management on BD-RE media, though.<br />
<br />
''growisofs'' formats BD-R by default. The Defect Management can be prevented by option {{ic|1= -use-the-force-luke=spare:none}}. It has no means to prevent Defect Management on BD-RE media, though.<br />
<br />
''cdrskin'', ''xorriso'' and ''xorrecord'' do not format BD-R by default. They do with {{ic|1= cdrskin blank=format_if_needed}}, resp. {{ic|1= xorriso -format as_needed}}, resp. {{ic|1= xorrecord blank=format_overwrite}}. These three programs can disable Defect Management with BD-RE and already formatted BD-R by {{ic|1= cdrskin stream_recording=on}}, resp. {{ic|1= xorriso -stream_recording on}}, resp. {{ic|1= xorrecord stream_recording=on}}.<br />
<br />
=== Burning an audio CD ===<br />
<br />
Create your audio tracks and store them as uncompressed, 16-bit, stereo WAV files. To convert MP3 to WAV, ensure {{Pkg|lame}} is installed, ''cd'' to the directory with your MP3 files, and run:<br />
<br />
$ for i in *.mp3; do lame --decode "$i" "$(basename "$i" .mp3)".wav; done<br />
<br />
In case you get an error when trying to burn WAV files converted with LAME, try decoding with {{Pkg|mpg123}}:<br />
<br />
$ for i in *.mp3; do mpg123 --rate 44100 --stereo --buffer 3072 --resync -w $(basename $i .mp3).wav $i; done<br />
<br />
Name the audio files in a manner that will cause them to be listed in the desired track order when listed alphabetically, such as {{ic|01.wav}}, {{ic|02.wav}}, {{ic|03.wav}}, etc. Use the following command to simulate burning the WAV files as an audio CD:<br />
<br />
$ cdrecord '''-dummy''' -v -pad speed=1 dev=''/dev/sr0'' -dao -swab *.wav<br />
<br />
In case you detect errors or empty tracks like:<br />
<br />
Track 01: audio 0 MB (00:00.00) no preemp pad<br />
<br />
try another decoder (e.g. mpg123) or try using ''cdrecord'' from the {{Pkg|cdrtools}} package.<br />
<br />
Note, that the WAV file has to be 16bit Stereo 44100 Hz. Check you WAV tracking using the standard {{ic|file}} command. Otherwise you will get the following error:<br />
<br />
wodim: Inappropriate audio coding in 'file.wav'.<br />
<br />
To quickly convert a mono file into stereo, you can use sox, or any other application you have available:<br />
<br />
sox input.wav -c 2 output.wav<br />
<br />
If everything worked, you can remove the {{ic|dummy}} flag to actually burn the CD.<br />
<br />
To test the new audio CD, use [[MPlayer]]:<br />
<br />
$ mplayer cdda://<br />
<br />
=== Burning a BIN/CUE ===<br />
<br />
To burn a BIN/CUE image run:<br />
<br />
$ cdrdao write --device ''/dev/sr0'' ''image.cue''<br />
<br />
==== TOC/CUE/BIN for mixed-mode disks ====<br />
<br />
ISO images only store a single data track. If you want to create an image of a mixed-mode disk (data track with multiple audio tracks) then you need to make a TOC/BIN pair:<br />
<br />
$ cdrdao read-cd --read-raw --datafile ''image.bin'' --driver generic-mmc:0x20000 --device ''/dev/cdrom'' ''image.toc''<br />
<br />
Some software only likes CUE/BIN pair, you can make a CUE sheet with ''toc2cue'' (part of {{Pkg|cdrdao}}):<br />
<br />
$ toc2cue ''image.toc'' ''image.cue''<br />
<br />
=== Burn backend problems ===<br />
<br />
If you're experiencing problems, you may ask for advise at mailing list [mailto:cdwrite@other.debian.org 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.<br />
<br />
Tell the command lines you tried, the medium type (e.g. 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.<br />
<br />
=== Burning CD/DVD/BD with a GUI ===<br />
<br />
There are several applications available to burn CDs in a graphical environment.<br />
<br />
See also [[Wikipedia:Comparison of disc authoring software]].<br />
<br />
* {{App|[[Wikipedia:AcetoneISO|AcetoneISO]]|All-in-one ISO tool (supports BIN, MDF, NRG, IMG, DAA, DMG, CDI, B5I, BWI, PDI and ISO).|http://sourceforge.net/projects/acetoneiso|{{Pkg|acetoneiso2}}}}<br />
* {{App|BashBurn|Lightweight terminal based menu frontend for CD/DVD burning tools.|http://bashburn.dose.se/|{{Pkg|bashburn}}}}<br />
* {{App|[[Wikipedia:Brasero (software)|Brasero]]|Disc burning application for the GNOME desktop that is designed to be as simple as possible. Part of {{Grp|gnome-extra}}.|https://wiki.gnome.org/Apps/Brasero|{{Pkg|brasero}}}}<br />
* {{App|cdw|Ncurses frontend to ''cdrecord'', ''mkisofs'', ''growisofs'', ''dvd+rw-mediainfo'', ''dvd+rw-format'' and ''xorriso''.|http://cdw.sourceforge.net/|{{AUR|cdw}}}}<br />
* {{App|[[Wikipedia:GnomeBaker|GnomeBaker]]|Full featured CD/DVD burning application for the GNOME desktop.|http://gnomebaker.sourceforge.net/|{{AUR|gnomebaker}}}}<br />
* {{App|Graveman|GTK-based CD/DVD burning application. It requires configuration to point to correct devices.|http://graveman.tuxfamily.org/|{{AUR|graveman}}{{Broken package link|{{aur-mirror|graveman}}}}}}<br />
* {{App|[[Wikipedia:ISO_Master|isomaster]]|ISO image editor.|http://littlesvr.ca/isomaster|{{AUR|isomaster}}}}<br />
* {{App|[[Wikipedia:K3b|K3b]]|Feature-rich and easy to handle CD burning application based on KDElibs.|http://www.k3b.org/|{{Pkg|k3b}}}}<br />
* {{App|[[Wikipedia:X-CD-Roast|X-CD-Roast]]|Lightweight ''cdrtools'' front-end for CD and DVD writing.|http://www.xcdroast.org/|{{AUR|xcdroast}}{{Broken package link|{{aur-mirror|xcdroast}}}}}}<br />
* {{App|Xfburn|Simple front-end to the libburnia libraries with support for CD/DVD(-RW), ISO images, and BurnFree.|http://goodies.xfce.org/projects/applications/xfburn|{{Pkg|xfburn}}}}<br />
* {{App|xorriso-tcltk|Graphical front-end to ISO and CD/DVD/BD burn tool xorriso|https://www.gnu.org/software/xorriso/xorriso-tcltk-screen.gif|{{Pkg|libisoburn}}}}<br />
<br />
== Playback ==<br />
<br />
=== CD ===<br />
<br />
Playback of audio CDs requires the {{Pkg|libcdio}} package.<br />
<br />
=== DVD ===<br />
<br />
If you wish to play encrypted DVDs, you must install the libdvd* packages:<br />
* {{Pkg|libdvdread}}<br />
* {{Pkg|libdvdcss}}<br />
* {{Pkg|libdvdnav}}<br />
<br />
Additionally, you must install player software. Popular DVD players are [[MPlayer]], [[Wikipedia:Xine|xine]] and [[VLC]]. See the [[List of applications/Multimedia#Video players|video players]] list and the specific instructions for [[MPlayer#DVD playing|MPlayer]].<br />
<br />
== Ripping ==<br />
<br />
[[Wikipedia:Ripping|Ripping]] is the process of copying audio or video content to a hard disk, typically from removable media or media streams.<br />
<br />
=== CD ===<br />
<br />
* {{App|[[Wikipedia:ABCDE|Abcde]]|Comprehensive command-line tool for ripping audio CDs.|http://abcde.einval.com/|{{Pkg|abcde}}}}<br />
* {{App|[[Wikipedia:Asunder|Asunder]]|GTK+-based CD ripping program.|http://littlesvr.ca/asunder/|{{Pkg|asunder}}}}<br />
* {{App|[[Wikipedia:cdparanoia|cdparanoia]]|Compact Disc Digital Audio (CDDA) Digital Audio Extraction (DAE) tool.|http://xiph.org/paranoia/index.html|{{Pkg|cdparanoia}}}}<br />
* {{App|Gnac|Audio converter for GNOME.|http://gnac.sourceforge.net/|{{Pkg|gnac}}}}<br />
* {{App|Goobox|CD player and ripper for GNOME.|https://people.gnome.org/~paobac/goobox/|{{Pkg|goobox}}}}<br />
* {{App|[[Wikipedia:Grip (software)|Grip]]|Fast and light CD ripper within the GNOME project that resembles [[Wikipedia:Audiograbber|Audiograbber]].|http://sourceforge.net/projects/grip/|{{Pkg|grip}}}}<br />
* {{App|KAudioCreator|Program for ripping and encoding Audio CDs and encoding files from disk.|http://kde-apps.org/content/show.php/KAudioCreator?content&#61;107645|{{Pkg|kaudiocreator}}}}<br />
* {{App|morituri|CD ripper aiming for accuracy over speed. Uses cdparanoia, MusicBrainz, AccurateRip.|http://thomas.apestaart.org/morituri/trac/|{{Pkg|morituri}}}}<br />
* {{App|ripperX|GTK+ program to rip and encode MP3 files.|http://sourceforge.net/projects/ripperx/|{{Pkg|ripperx}}}}<br />
* {{App|ripright|Minimal CD ripper modeled on autorip.|http://www.mcternan.me.uk/ripright/|{{AUR|ripright}}}}<br />
* {{App|rubyripper|Audiodisk ripper that tries to deliver a secure rip through multiple rippings of the same track and corrections of any differences.|http://code.google.com/p/rubyripper/|{{Pkg|rubyripper}}}}<br />
* {{App|[[Wikipedia:Sound Juicer|Sound Juicer]]|CD ripper for GNOME.|http://burtonini.com/blog/computers/sound-juicer|{{Pkg|sound-juicer}}}}<br />
* {{App|soundKonverter|Front-end to various audio converters.|http://www.kde-apps.org/content/show.php?content&#61;29024|{{Pkg|soundkonverter}}}}<br />
<br />
=== DVD ===<br />
<br />
Often, the process of ripping a DVD can be broken down into two subtasks:<br />
# '''Data extraction''' — Copying the audio and/or video data to a hard disk,<br />
# [[Wikipedia:Transcode|Transcoding]] — Converting the extracted data into a suitable format.<br />
<br />
Some utilities perform both tasks, whilst others focus on one aspect or the other:<br />
<br />
* {{App|dvd-vr|Tool which easily converts VRO files extracted from a [[Wikipedia:DVD-VR|DVD-VR]] and splits them in regular VOB files.|http://www.pixelbeat.org/programs/dvd-vr/|{{AUR|dvd-vr}}{{Broken package link|{{aur-mirror|dvd-vr}}}}}}<br />
* {{App|[[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/|{{Pkg|dvdbackup}}}}<br />
* {{App|[[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.|http://ffmpeg.org/|See [[FFmpeg#Package_installation|article]]}}<br />
* {{App|HandBrake|Multithreaded video transcoder, which offers both a graphical and command-line interface with many preset configurations.|http://handbrake.fr/|{{Pkg|handbrake}}}}<br />
* {{App|Hybrid|Multi platform Qt based frontend for a bunch of other tools which can convert nearly every input to x264/Xvid/VP8 + ac3/ogg/mp3/aac/flac inside an mp4/m2ts/mkv/webm/mov/avi container, a Blu-ray or an AVCHD structure.|http://www.selur.de/|{{AUR|hybrid-encoder}}}}<br />
* {{App|[[MEncoder]]|Free command line video decoding, encoding and filtering tool released under the GNU GPL. It is a close sibling to MPlayer and can convert all the formats that MPlayer understands into a variety of compressed and uncompressed formats using different codecs. Wrapper programs like {{AUR|h264enc}} and {{AUR|undvd}}{{Broken package link|{{aur-mirror|undvd}}}} can provide an assistive interface. Many [[MEncoder#GUI frontends|GUI frontends]] are available.|http://www.mplayerhq.hu/|{{Pkg|mencoder}}}}<br />
* {{App|Transcode|Video/DVD ripper and encoder with the CLI.|http://tcforge.berlios.de/|{{Pkg|transcode}}}}<br />
<br />
==== dvd::rip ====<br />
<br />
dvd::rip is a front-end to {{Pkg|transcode}}, used to extract DVD's to the hard disk and transcode or extract and transcode on-the-fly.<br />
<br />
The following packages should be installed:<br />
* {{Pkg|dvdrip}}: GTK front-end for {{Pkg|transcode}}, which performs the ripping and encoding<br />
* {{Pkg|libdv}}: Software codec for DV video<br />
* {{Pkg|xvidcore}}: If you want to encode your ripped files as XviD, an open source MPEG-4 video codec (free alternative to DivX).<br />
* {{AUR|divx4linux}}{{Broken package link|{{aur-mirror|divx4linux}}}}: If you want to encode your ripped files as DivX.<br />
* {{AUR|subtitleripper}}{{Broken package link|{{aur-mirror|subtitleripper}}}}: If you want to read and process subtitles.<br />
The dvd::rip preferences are mostly well-documented/self-explanatory. If you need help with something, see http://www.exit1.org/dvdrip/doc/gui-gui_pref.cipp.<br />
<br />
Ripping a DVD is often a simple matter of selecting the preferred codec(s), selecting the desired titles, then clicking the "Rip" button.<br />
<br />
== Troubleshooting ==<br />
<br />
=== K3b locale error ===<br />
<br />
When running K3b, if the following message appears:<br />
<br />
System locale charset is ANSI_X3.4-1968<br />
Your system's locale charset (i.e. the charset used to encode file names) is<br />
set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally.<br />
Most likely the locale is not set at all. An invalid setting will result in<br />
problems when creating data projects.Solution: To properly set the locale<br />
charset make sure the LC_* environment variables are set. Normally the distribution<br />
setup tools take care of this.<br />
<br />
It means that your locale is not set well.<br />
<br />
To fix it,<br />
<br />
* Remove {{ic|/etc/locale.gen}}<br />
* Re-install {{Pkg|glibc}}<br />
* Edit {{ic|/etc/locale.gen}}, enabling all the locales that corresponds to your language and preferences AND ALL the {{ic|en_US}} locales for compatibility:<br />
<br />
{{bc|<br />
en_US.UTF-8 UTF-8<br />
en_US ISO-8859-1<br />
}}<br />
<br />
* Re-generate the locales with ''locale-gen'':<br />
{{hc|# locale-gen|<br />
Generating locales...<br />
en_US.UTF-8... done<br />
en_US.ISO-8859-1... done<br />
pt_BR.UTF-8... done<br />
pt_BR.ISO-8859-1... done<br />
Generation complete.<br />
}}<br />
<br />
More info [https://bbs.archlinux.org/viewtopic.php?pid=251512%29; here].<br />
<br />
=== Brasero fails to find blank discs ===<br />
<br />
Brasero uses {{Pkg|gvfs}} to manage CD/DVD burning devices. Also make sure that your session [[General troubleshooting#Session permissions|is not broken]].<br />
<br />
=== Brasero fails to normalize audio CD ===<br />
<br />
If you try to burn it may stop at the first step called Normalization.<br />
<br />
As a workaround you can disable the normalization plugin using the ''Edit > Plugins'' menu<br />
<br />
=== VLC: Error "... could not open the disc /dev/dvd" ===<br />
<br />
If you get an error like<br />
<br />
vlc dvdread could not open the disc "/dev/dvd"<br />
<br />
it may be because there is no device node {{ic|/dev/dvd}} on your system. Udev no longer creates {{ic|/dev/dvd}} and instead uses {{ic|/dev/sr0}}. To fix this, edit the VLC configuration file ({{ic|~/.config/vlc/vlcrc}}):<br />
<br />
# DVD device (string)<br />
dvd=/dev/sr0<br />
<br />
=== DVD drive is noisy ===<br />
<br />
If playing DVD videos causes the system to be very loud, it may be because the disk is spinning faster than it needs to. To temporarily change the speed of the drive, run:<br />
<br />
# eject -x 12 /dev/dvd<br />
<br />
Sometimes:<br />
<br />
# hdparm -E12 /dev/dvd<br />
<br />
Any speed that is supported by the drive can be used, or 0 for the maximum speed.<br />
<br />
[http://hektor.umcs.lublin.pl/~mikosmul/computing/tips/cd-rom-speed.html Setting CD-ROM and DVD-ROM drive speed]<br />
<br />
=== Playback does not work with new computer (new DVD-Drive) ===<br />
<br />
If playback does not work and you have a new computer (new DVD-Drive) the reason might be that the [[Wikipedia:DVD region code|region code]] is not set. You can read and set the region code with the {{AUR|regionset}} package.<br />
<br />
=== None of the above programs are able to rip/encode a DVD to my hard disk! ===<br />
<br />
Make sure the region of your DVD reader is set correctly; otherwise, you will get loads of inexplicable [[Wikipedia:Content Scramble System|CSS]]-related errors. Use the {{AUR|regionset}} package to do so.<br />
<br />
=== GUI program log indicates problems with backend program ===<br />
<br />
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.<br />
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.<br />
<br />
==== Special case: medium error / write error ====<br />
<br />
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.<br />
<br />
K3b with backend wodim:<br />
Sense Bytes: 70 00 03 00 00 00 00 12 00 00 00 00 0C 00 00 00<br />
Sense Key: 0x3 Medium Error, Segment 0<br />
Sense Code: 0x0C Qual 0x00 (write error) Fru 0x0<br />
<br />
Brasero with backend growisofs:<br />
BraseroGrowisofs stderr: :-[ WRITE@LBA=0h failed with SK=3h/ASC=0Ch/ACQ=00h]: Input/output error<br />
<br />
Brasero with backend libburn:<br />
BraseroLibburn Libburn reported an error SCSI error on write(16976,16): [3 0C 00] Write error<br />
<br />
=== AHCI ===<br />
<br />
If your new DVD drive is detected but you can't mount disks, check wether your BIOS uses [[AHCI]] and add the module to the kernel image.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} and add {{ic|ahci}} to the {{ic|MODULES}} variable (see [[mkinitcpio]] for details):<br />
MODULES="ahci"<br />
<br />
Rebuild the kernel image so that it includes the newly added module:<br />
# mkinitcpio -p linux<br />
<br />
== See also ==<br />
<br />
* In the United States, backup of physically obtained media is allowed under these conditions: [https://www.riaa.com/resources-learning/about-piracy/ About Piracy - RIAA].<br />
* [[Convert any Movie to DVD Video]]<br />
* [http://libburnia-project.org/ Main page of the project Libburnia]</div>Adbhttps://wiki.archlinux.org/index.php?title=Cmus&diff=412314Cmus2015-12-14T23:50:10Z<p>Adb: Configuration paragraph was obscure, added config file location. Switching between artist/track panel by pressing tab.</p>
<hr />
<div>[[Category:Multimedia players]]<br />
[[sr:Cmus]]<br />
[http://cmus.sourceforge.net/ cmus] ''(C* MUsic Player)'' is a small, fast and powerful console audio player which supports most major audio formats. Various features include gapless playback, ReplayGain support, MP3 and Ogg streaming, live filtering, instant startup, customizable key-bindings, and vi-style default key-bindings.<br />
<br />
=Installation=<br />
[[Install]] {{Pkg|cmus}}, available in the [[Official repositories]].<br />
<br />
Alternatively, there is also a development version available in the [[AUR]] called {{AUR|cmus-git}}.<br />
<br />
== Using cmus with alsa ==<br />
When using cmus with [[Advanced Linux Sound Architecture]] the default configuration does not allow playing music. What you might encounter when when trying to start cmus is a blank terminal line with no output whatsoever. To fix it, create a new config file and set the following variables<br />
{{hc|~/.config/cmus/rc|2=<br />
set output_plugin=alsa<br />
set dsp.alsa.device=default<br />
set mixer.alsa.device=default<br />
set mixer.alsa.channel=Master<br />
}}<br />
<br />
=Usage=<br />
Cmus comes with a great reference manual.<br />
$ man cmus <br />
$ man cmus-tutorial<br />
$ man cmus-remote<br />
<br />
== Starting Cmus ==<br />
<br />
To start cmus, type:<br />
$ cmus<br />
<br />
When you first launch cmus it will open to the album/artist tab.<br />
<br />
== Adding Music ==<br />
Press {{ic|5}} to switch to the file-browser tab so we can add some music.<br />
Now, use the arrow keys ({{ic|up}}, {{ic|down}}), {{ic|Enter}} and {{ic|Backspace}} to navigate to where you have audio files stored. Alternatively, you may use the vim bindings ({{ic|k}}, {{ic|j}}) to navigate up and down through your music.<br />
<br />
To add music to your cmus library, use the arrow keys to highlight a file or folder, and press {{ic|a}}. When you press {{ic|a}} cmus will move you to the next line down (so that it is easy to add a bunch of files/folders in a row) and start adding the file/folder you pressed {{ic|a}} in to your library. This may take a bit if you added a folder with a lot of music in it. As files are added, you will see the second time in the bottom right go up. This is the total duration of all the music in the cmus library.<br />
{{Note|cmus does not move, duplicate or change your files. It just remembers where they are and caches the metadata (duration, artist, etc.)}} <br />
{{Note|Cmus automatically saves your settings, library and everything when you quit.}}<br />
<br />
== Playing Tracks ==<br />
Press {{ic|1}} to go to the simple library view. Use the {{ic|up}} and {{ic|down}} arrow keys (or {{ic|k}}, {{ic|j}}) to select an artist and album you would like to hear. Pressing {{ic|space}} on the artist name will collapse or expand the albums it contains. Switch between list of tracks and artist/album view by pressing {{ic|Tab}} and press {{ic|Enter}} to play the selected track. Here's some keys to control the playback:<br />
:Press {{ic|c}} to pause/unpause<br />
:Press {{ic|right}}/{{ic|left}} (or {{ic|h}}, {{ic|l}}) arrow keys to seek by 10 seconds<br />
:Press {{ic|<}}/{{ic|>}} seek by one minute<br />
<br />
== Keybindings ==<br />
See the configuration section on how to change keybindings.<br />
<br />
=Tabs=<br />
There are 7 tabs in cmus. Press keys {{ic|1}}-{{ic|7}} to change active tab. <br />
<br />
== Library tab (1) ==<br />
Display all tracks in so-called '''library'''. Tracks are sorted artist/album tree. Artist sorting is done alphabetically. Albums are sorted by year. <br />
<br />
== Sorted library tab (2) ==<br />
Displays same content as view, but as a simple list which is automatically sorted by user criteria. <br />
<br />
== Playlist tab (3) ==<br />
Displays editable playlist with optional sorting. <br />
<br />
== Play Queue tab (4) ==<br />
Displays queue of tracks which are played next. These tracks are played before anything else (i.e. the playlist or library).<br />
<br />
== Browser (5) ==<br />
Directory browser. In this tab, music can be added to either the library, playlist or queue from the filesystem. <br />
<br />
== Filters tab (6) ==<br />
Lists user defined filters.<br />
<br />
== Settings tab (7) ==<br />
Change settings. See configuration for further information.<br />
<br />
= Configuration =<br />
To configure cmus start it and switch to the configuration tab by pressing {{ic|7}}. Now you can see a list of default keybindings. Select a field in the list with the arrow keys and press{{ic|Enter}} to edit the values. You can also remove bindings with {{ic|D}} or {{ic|del}}. To edit unbound commands and option variables scroll down in the list to the relevant section. Variables can also be toggled instead of edited with {{ic|space}}. Cmus allows changing the color of nearly every interface element. You can prefix colors with "light" to make them appear brighter and set attributes for some text elements.<br />
<br />
== Remote Control ==<br />
Cmus can be controlled externally through a unix-socket with {{ic|cmus-remote}}. This makes it easy to control playback through an external application or key-binding.<br />
<br />
One such usage of this feature is to control playback in Cmus with the XF86 keyboard events. The following script when run will start Cmus in an xterm terminal if it isn't running, otherwise it will will toggle play/pause:<br />
<br />
{{bc|1=<br />
#!/bin/sh<br />
# This command will break if you rename it to<br />
# something containing "cmus".<br />
<br />
if ! pgrep cmus ; then<br />
xterm -e cmus<br />
else<br />
cmus-remote -u<br />
fi<br />
}}<br />
<br />
To use the previous script in [[Openbox]], copy the code above into a file {{ic|~/bin/cplay}}. Make the file executable using {{ic|chmod +x ~/bin/cplay}}. Next edit {{ic|~/.config/openbox/rc.xml}} and change the following key-bindings to look like this:<br />
{{note|Make sure there are no conflicting keybindings in rc.xml}}<br />
<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keyboard><br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>cmus-remote -u</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>cmus-remote -n</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>cmus-remote -r</command><br />
</action><br />
</keybind><br />
</keyboard><br />
</nowiki>}}<br />
<br />
Now when you use the {{ic|XF86AudioPlay}} key on your keyboard, cmus will open up. If it's opened already it will then start playing. Using the XF86AudioNext and XF86AudioPrev keys will change tracks.<br />
<br />
=Links=<br />
# [https://github.com/cmus/cmus Git Repository]<br />
# [https://cmus.github.io/ Website]</div>Adb