Back to Home

Create high-quality rips Audio-CD

Audio CD · cdparanoia · EAC · flac · lame · ogg · cue · linux

Create high-quality rips Audio-CD

    As you know, if you look a little, then in Linux you can find software to solve almost any task. Strange, but on the Internet there is not much information on creating high-quality rips of audio disks in Linux. I will try to fix 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. In Linux, there is an excellent tool for removing native rips - cdparanoia . Numerous tests of numerous audiophiles have not been able to answer the question of what better rips: EAC or cdparanoia. Therefore, it can be quite calmly assumed that cdparanoia and EAC provide absolutely the same quality and therefore use the native utility under Linux, i.e. paranoia.

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

    Using cdparanoia


    First, make sure that you have the latest version of cdparanoia in your system. If anything, you can download its binary from the official website http://xiph.org/paranoia/ . Yes, paranoia has not been updated for a long time. On the other hand, I have never seen the 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 proper instructions to talk about some kind of rip quality is simply pointless. To do this, first you need to determine the model of the drive. You can do this with the team

    lshw -c disk
    

    Now go to accuraterip.com and watch the offset. In my case, it is +6.

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

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

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

    If everything went without errors - good. If not, then you can verify the accuracy of the rip only by removing it several times and comparing the resulting files. You can compare by calculating the 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 of audio data is received.

    Getting Disk Partitioning and CDTEXT


    Now you need to remove all the information about the marking 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 disk with the command

    cdrdao read-toc disk.toc
    

    And then convert the resulting file to cue with the command

    cueconvert -i toc disk.toc disk.cue
    

    All that remains is to manually fix cue, bringing it to the desired view.

    Cutting an image into tracks and coding


    For some reason, there is a completely stupid tendency to store audio discs as a single image with cue attached. I don’t know where it came from, but there are two powerful arguments against it:

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


    So let's figure out how to cut a disk and then encode the tracks in the desired format. You will need one more package - shntool.

    Now just do

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

    This will result in a bunch of split-track **. Wav files. Now they need to be encoded in the desired format. Actually all this hassle with high-quality rips hints that this format should be lossless, although I also code 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 will need one or more of these packages: flac, oggenc, lame.

    Now for coding in flac 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 simply the most optimal.

    Spelling tags


    It remains only to register the tags in the files and rename them as needed. You can automatically add information from cue to tags using 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 using the very convenient EasyTag utility.

    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 disk. However, it all depends on your tasks.

    UPD: To not be scared. All of the above is completely optional, there is an excellent GUI program Rubi Ripper, which also reads the tracks several times and corrects for necessary reading differences, 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 written based on http://help.ubuntu.ru/wiki/rip_audio_disks , I invite all 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.

    Read Next