📜 ⬆️ ⬇️

Creating high-quality audio rips

As you know, if you search a bit, then in Linux you can find software to solve almost any problem. Strange, but on the Internet there is not a lot of information on creating high-quality rips for audio CDs in Linux. I will try to correct this situation a little.

To begin with, EAC is not a panacea. It can be run under Wine, but there is not much point in this. Linux has a great native rip remover - cdparanoia. Numerous tests of numerous audiophiles have never been able to answer the question, which rips better: EAC or cdparanoia. Therefore, we can safely assume that cdparanoia and EAC provide exactly the same quality and therefore use native utility under Linux, i.e. paranoia.

In addition, it is also worth noting that virtually all Linux rip programs are actually just a wrapper over cdparanoia. Therefore, I personally prefer to use this utility directly, since the console does not cause me any negative emotions.

Using cdparanoia


First, make sure that you have the latest version of cdparanoia on your system. If anything, you can download its binary from the official site http://xiph.org/paranoia/ . Yes, paranoia has not been updated for a long time. On the other hand, I have never seen any mention of any problems in the work of the latest stable version.
')
Now you need to find out the reading offset for your drive (offset), without correctly specifying it, it’s simply pointless to talk about some kind of rip quality. To do this, first you need to determine the drive model. You can do this with the command

 lshw -c disk

Now go to the accuracyterip.com and look at the offset. In my case it is +6.

Well, finally we remove the rip team (do not forget to change the offset!)

 cdparanoia -vzl -O +6 [::] - CDImage.wav

Other options are possible, for details, contact the man, which is also on the official website .

If everything went smoothly, good. If not, then you can check the accuracy of the rip only by removing it several times and comparing the received files. You can compare by calculating a checksum, for example, with the command

 md5sum -b * .wav

If the amounts do not match, then the files are different, in this case it is usually easiest to select the file that matches the maximum number of times.

So, we assume that the exact rip audio data received.

Getting disk layout and CDTEXT


Now you need to remove all the information about the layout of the tracks and the compositions and the author. We will save it in a standard cue file. You will need two packages - cuetools and cdrdao. Now, first remove all metadata from the disk with the command

 cdrdao read-toc disk.toc

And then convert the resulting file into a cue with the command

 cueconvert -i toc disk.toc disk.cue

All that remains is to manually correct the cue, bringing it to the desired form.

Cutting an image into tracks and encoding


For some reason, there is a completely foolish tendency to store audio CDs as a single image with an attached cue. Where she went from is unknown to me, but there are two weightiest arguments against her:

  1. A cue is a physical markup and metadata file. It is simply not intended to preserve any complete information about the disc and tracks. The stupidest attempts to extend its syntax due to special comments resulted in the fact that cue stopped understanding many players correctly.
  2. A single image is terribly inconvenient when you need to listen or copy only one song.


So let's see how to cut the disc and then encode the tracks in the desired format. You will need another package - shntool.

Now just run

 cuebreakpoints disk.cue |  shnsplit -o wav CDImage.wav

The result is a bunch of split-track **. Wav files. Now they need to be encoded in the desired format. Actually all this trouble with high-quality rips hints that this format should be lossless, although I encode it in OGG Vorbis for listening on the player. lossless is definitely flac, lossy is Vorbis, just in case, I’ll also say about mp3.

So, you need one or more of these packages: flac, oggenc, lame.

Now for flac encoding, you can use the command

 flac -8 split-track * .wav

For OGG Vorbis

 oggenc -q 7 split-track * .wav

For mp3

 lame -h -b 320 split-track * .wav

Of course, you can set other options, these are just the most optimal.

Tagging


It remains only to register the tags in the files and rename them as needed. You can automatically add information from the cue to the tags with the command

 cuetag disk.cue split-track * .flac

Instead of flac, of course, you need to substitute the desired extension. Well, you can rename files and fill in the remaining tags with the help of a very convenient utility EasyTag.

All the above commands can be combined into one script:

 #! / bin / sh

 cdparanoia -vzl -O +6 [::] - CDImage.wav
 cdrdao read-toc disk.toc
 cueconvert -i toc disk.toc disk.cue
 cuebreakpoints disk.cue |  shnsplit -o wav CDImage.wav
 flac -8 split-track * .wav
 cuetag disk.cue split-track * .flac

Well, or something like that. Do not forget to set the correct options in the commands!

That's all. If you make a slightly more advanced script, then you can easily carry out any processing of audio data from the disk. However, it all depends on your tasks.

UPD: To not be scared. All of the above is not necessary to perform, there is an excellent Rubi Ripper GUI program, which also re-reads the tracks itself several times and corrects read discrepancies if necessary, which is important when reading a damaged disk. The purpose of this post is to tell how everything can be done in steps with any settings and manipulations at any step.



This article is based on http://help.ubuntu.ru/wiki/rip_audio_diskov , I invite everyone interested to join the development of the resource of Russian-language documentation on Ubuntu in order to have as much useful information as possible in one place.

Source: https://habr.com/ru/post/97316/


All Articles