PDA

View Full Version : ultimate format to store ripped CD audio?


rlu
27th August 2013, 00:32
Hello,

my CD collection now comprises about 700 CDs. About 10 years ago I went through the collection and ripped to OGG (individual tracks). During the process I discovered two pressed CDs that had failed, presumably because of oxidation of the aluminum layer. One was replaced by the publisher (Deutsche Grammophon - yay), the other was no longer available.

Obviously, I cannot produce a perfect replacement for any CDs that should fail, and this bothers me.

Thus I would like to re-rip my collection and store in a format that satisfies the following requirements:
1) can be used to produce a perfect replacement for a failed CD (i.e., lossless)
2) individual tracks can be encoded to OGG/MP3/whatever using the rip-data

There are two approaches (it seems):
1) rip a CD monolithically and have some method to extract the data for any particular track that is to be encoded
2) rip tracks individually along with *all* the addition information (lead in, etc) needed to produce a perfect copy of the original CD

I would be grateful for any hints on how to achieve this goal. By the way, I'm a pure-linux user, and am pretty-much only interested in solutions involving open-source software.

cheers,
RLU

qyot27
27th August 2013, 05:53
I store my own CD archives as a single file (ripped as standard PCM Wave, then converted to FLAC) with a cuesheet, and then split and encode the individual tracks to AAC (and at least with the latest one, also Opus; I used Vorbis once for a 5.1 channel rip from a DVD Audio disc, though). About 80% of the process is FOSS, because the ripping, splitting, and tagging programs are merely gratis (and for Windows, as I generally don't deal with actual media work that much under Ubuntu), not libre.

But for this purpose, I think that cdda2wav (cdrtools or cdrkit, depending on your philosophical bent) and shntool (http://www.etree.org/shnutils/shntool/) are the appropriate stand-ins for the non-FOSS stuff I use. cdda2wav does have the ability to rip as WAV/CUE, shntool can split it into individual tracks, and then you can construct a for loop with your audio encoder of choice, and then either tag later or use the encoder's own metadata options to do it at the same time.


After all the ripping/encoding is done, I pack the FLAC and AAC encodes into a RAR archive (you could use 7z, or .tar.xz; the only reason I don't is because those don't store crtime), and burn them off to a DVD-R. If you want to be ultra-paranoid, you could use M-DISC media for that part.

Ghitulescu
27th August 2013, 10:27
Those two requirements are not 100% parallel :), so you have to define your priorities first.

For storage ISO+CUE or BIN+CUE or WAV+CUE is probably the best, if you intend to reproduce the disc. Individual tracks in uncompressed or lossless form can be used to reconstruct only the music.

On the other hand, most players in the past refused to play almost anything but MP3. The situation improved a lot nowadays, the portables being able to play also FLAC, WAV and others, yet some optical disc-based standalone are still very picky. The computer plays all, provided the codecs exist (and they do).

So you may end with two formats, one for playback, the other one for storage (and further reconstruction).

detmek
27th August 2013, 11:24
Not realy. Single FLAC + CUE will do the trick. It is lossless, it saves the space, it is possible to extract single songs from it and it is possible to reconstruct original CD from it. Everything can be done with EAC as it can rip to FLAC, verify the ripped track and burn those track to Audio CD with correct offset.

P.S. foobar2000 and dbPoweramp can be used for ripping discs as both support AccurateRip and Secure Rip, too. CUETools shoud be an option but I never used it, so I don't know exactly its capabilities.

Brazil2
27th August 2013, 11:41
Single FLAC + CUE will do the trick. It is lossless, it saves the space, it is possible to extract single songs form it and it is possible to reconstruct original CD form it.
Agreed, because CD images are almost all proprietary formats (ISO won't work for Audio CDs) and who knows which ones you will still be able to use in 20 years time while I bet there will still be some FLAC decoders available.

Ghitulescu
27th August 2013, 16:12
Not realy. Single FLAC + CUE will do the trick.
As I said, for track by track. However, should a CD be gap-less (like most electronic music and live concerts) there is a good chance that a short (and nasty) gap would appear at track boundaries. If one wants FLAC, nothing prevents him from compressing the whole CD as one file.

detmek
27th August 2013, 23:06
AFAIK, all lossless formats are gapless.
About reconstruction, if Audio CD is ripped correctly it shoud be easy to reconstruct it even from multiple tracks, without CUE. But, I didn't try that.

juhok
28th August 2013, 01:07
I've ripped the same CD to A) single file + cue B) multiple files + cue. It has been possible to reconstruct A from B and B from A and they are bit identical.

qyot27
28th August 2013, 03:12
P.S. foobar2000 and dbPoweramp can be used for ripping discs as both support AccurateRip and Secure Rip, too. CUETools shoud be an option but I never used it, so I don't know exactly its capabilities.
The important part from the OP:
By the way, I'm a pure-linux user, and am pretty-much only interested in solutions involving open-source software.
So EAC, foobar2000, and dBpoweramp are out of the question. 'Pure Linux' implies 'no Wine', and regardless of that, none of those are open source.

detmek
28th August 2013, 05:59
I am not Linux user but - cdparanoia, maybe?
Although, I don't see a problem in using wine.

Ghitulescu
28th August 2013, 08:54
But, I didn't try that.
That is exactly the point :)

A0
30th August 2013, 15:19
Using EAC (http://blowfish.be/eac/) to produce flac tracks + cue is the best solution I know of. For linux, I heard about Grip (http://ubuntuforums.org/showthread.php?t=183125&highlight=grip+know) and Rubyripper. You can always take iso image of the CDs as well.

detmek
30th August 2013, 16:56
That is exactly the point :)
Just because I didn't try doesn't mean it wont work.

Using EAC (http://blowfish.be/eac/) to produce flac tracks + cue is the best solution I know of. For linux, I heard about Grip (http://ubuntuforums.org/showthread.php?t=183125&highlight=grip+know) and Rubyripper. You can always take iso image of the CDs as well.

No, you can not make ISO image of Audio CD as ISO format does not support Audio CD raw data.
Also, creating similar image does not guarantees that CD will be red correctly. Reading errors are posible. The only way to be sure that Audio CD is ripped correctly is to compare result with some online database like AccurateRip.

Sparktank
30th August 2013, 21:30
I believe HydrogenAudio would have more detailed info with actual feedback for DAE on Linux systems.

You should check out there for some solutions.
A custom google search shows a few threads dating back quite a few years.

site:hydrogenaudio.org/forums/ accurate dae linux

You'll have to sift through quite a bit of reading.

A0
31st August 2013, 02:20
No, you can not make ISO image of Audio CD as ISO format does not support Audio CD raw data.
Also, creating similar image does not guarantees that CD will be red correctly. Reading errors are posible. The only way to be sure that Audio CD is ripped correctly is to compare result with some online database like AccurateRip.

Yeah I just read that, and found also another tool (http://wiki.hydrogenaudio.org/index.php?title=CUETools) that could run on linux. Thanks for heads up. I read though that is possible to get iso/bin + cue and build your audio cd again whenever you want as Ghitulescu pointed. Don't know what app could do that on linux tho.

Ghitulescu
2nd September 2013, 09:17
Just because I didn't try doesn't mean it wont work.
Can't figure out why I said it won't always work for gapless albums? :):)
Because I tried and there is also a nice *technical* explanation why it won't work, except in particular cases.

hello_hello
2nd September 2013, 11:17
Can't figure out why I said it won't always work for gapless albums? :):)
Because I tried and there is also a nice *technical* explanation why it won't work, except in particular cases.

If you rip an entire CD as a single flac file + cue, why shouldn't it be gapless?
What's the technical explanation as to why it won't work, if there is one, because it certainly works for me.

I've got a gapless album here (Dark Side of the Moon) ripped as a single flac file, no cue (the flac file itself is tagged as a multitrack file), and it plays back gaplessly. I can even convert that single flac file to individual tracks and they still play gaplessly using foobar2000. I just tried it.
I tried a second gapless album ripped as a single flac file. It also plays back gaplessly.

If the entire album is ripped as a single file I'm not sure how you can go wrong. If it's ripped as individual tracks as long as the correct "gapless metadata" is written to each (probably just applies to lossy encoding) and you're using a player which supports gapless playback, it should work as advertised.
Are you sure you tested using a player which supports gapless playback, because you must have done something wrong.

According to Wikipedia:
http://en.wikipedia.org/wiki/Gapless_playback#Format_support
"Since lossless data compression excludes the possibility of the introduction of padding, all lossless audio file formats are inherently gapless."

filler56789
2nd September 2013, 11:53
According to Wikipedia:
http://en.wikipedia.org/wiki/Gapless_playback#Format_support
"Since lossless data compression excludes the possibility of the introduction of padding, all lossless audio file formats are inherently gapless."

That's not entirely true. Even the lossless audio compression may add null samples at the beginning or/and at the end of the encodes, in order to fit the defined frame sizes,
so, if/when the decoder doesn't discard the padding samples, then the playback cannot be gapless anymore;

http://forum.doom9.org/showthread.php?t=168133

Ghitulescu
2nd September 2013, 12:31
However, should a CD be gap-less (like most electronic music and live concerts) there is a good chance that a short (and nasty) gap would appear at track boundaries. If one wants FLAC, nothing prevents him from compressing the whole CD as one file.
If you rip an entire CD as a single flac file + cue, why shouldn't it be gapless?
What's the technical explanation as to why it won't work, if there is one, because it certainly works for me.
For those caring to read what I said before ....

hello_hello
2nd September 2013, 13:06
For those caring to read what I said before ....

I did.
For those caring to avoid answering questions:

Can't figure out why I said it won't always work for gapless albums? :):)
Because I tried and there is also a nice *technical* explanation why it won't work, except in particular cases.

Quoting yourself didn't seem to provide an explanation very technical in nature. I've ripped gapless albums as individual flac files which play back gaplessly and I've ripped them as single flac files which play back gaplessly, so when you've decided which won't work, except in particular cases, maybe you could offer the technical explanation as to why?

hello_hello
2nd September 2013, 13:16
That's not entirely true. Even the lossless audio compression may add null samples at the beginning or/and at the end of the encodes, in order to fit the defined frame sizes,
so, if/when the decoder doesn't discard the padding samples, then the playback cannot be gapless anymore;

http://forum.doom9.org/showthread.php?t=168133

Yeah but you were testing using a DST-MA encoder weren't you? Isn't DTS-MA a lossy core with a layer of extra data so it can also be decoded losslessly?
If that's the case I'd assume the lossy part would need to support gapless playback just as any lossy encoder would.

I've tested it using both FLAC and LAME encoded MP3s, and whether they're encoded as individual tracks or as a single multitrack files they play back gaplessly using foobar2000. In the case of MP3 at least, I'd assume it requires a player which supports gapless playback, but even so, if I encode a wave file with foobar2000 it'll report the wave file as consisting of "X" number of samples, it'll report the encoded MP3 as having the same number of samples and after converting back to wave the sample count still doesn't change. FLAC works the same way, but probably because it's inherently gapless rather than relying on metadata as MP3's do.

filler56789
2nd September 2013, 15:36
^ A couple of months ago, I decoded a MLP file with ffmpeg, and indeed, the resulting WAV file also had some "additional silence" at the end. I haven't studied the source-code of the DVD-Audio plugin for foobar2000, so I can only hope/assume its author has done the job well. :)

But back to the Master Audio example --- the fact is, if you use the DTS StreamPlayer for decoding, you always get a bit-exact output. BTW, one of the reasons for the "non-existence" of an open-source Master Audio decoder is, it would require a bit-exact decompressor for the lossy "core", in the first place.

Ghitulescu
2nd September 2013, 16:07
Quoting yourself didn't seem to provide an explanation very technical in nature. I've ripped gapless albums as individual flac files which play back gaplessly and I've ripped them as single flac files which play back gaplessly, so when you've decided which won't work, except in particular cases, maybe you could offer the technical explanation as to why?
The quote from wiki is taken out of context, which context refers strictly to playback on computers and/or encapsulation into containers AKA files again on computers.

For one claiming to have read the thread it seems quite a mischance to miss the explanation given therein. Anyway, there are no files on CDs, just structures.

To further quote wiki,
Hardware

Android devices (see Google Play Music in Software)
Apple:
iPhone[8]
iPod classic supports gapless playback of MP3s and AACs from the fifth generation onward[8]
iPod nano second generation and later[8]
iPod Touch[8]
Archos Gmini XS202S
Cowon S9 supports gapless playback without software dependency since 2.31b firmware. Most newer Cowon players support gapless playback right out of the box (J3, X7, iAudio 9)
Linn Products DS network players
All players in the Logitech/Slim Devices Squeezebox range support gapless playback for all gapless formats (lame MP3, FLAC, Vorbis, etc.). Crossfading is also optionally available.
Microsoft Zune supports gapless playback with Zune 2.5 or later firmware, though some bugs remain and occasionally small pops or skips can be heard.[9]
Olive Media Products Opus and Melody players
Raumfeld multi-room audio system supports gapless playback since firmware version 1.2
Rio Karma and TrekStor Vibez gapless hardware players with no software dependency
Rockbox for various digital audio players.
Victor Alneo V Series and C Series[10][11]
I see no CD player there, again a strong hint that gapless playback and its conditions refers strictly to something else than a CD. An eagle eye would immediately notice that all HW solutions above have a common concept the file access.

hello_hello
3rd September 2013, 08:14
The quote from wiki is taken out of context, which context refers strictly to playback on computers and/or encapsulation into containers AKA files again on computers.

How do you play your CD tracks ripped as FLAC/WAVE/Lossless files? With a CD player? What else would it be referring to?
The quote isn't taken out of context. The part I quoted stated all lossless formats are inherently gapless. Which part of that statement are you disputing?

For one claiming to have read the thread it seems quite a mischance to miss the explanation given therein. Anyway, there are no files on CDs, just structures.

I've read the whole thread. Unless ripping a CD to wave+cue as you suggested somehow copies the CD structure, as opposed to ripping to FLAC+cue or multi-track FLAC, what's your point?

To further quote wiki,
I see no CD player there, again a strong hint that gapless playback and its conditions refers strictly to something else than a CD. An eagle eye would immediately notice that all HW solutions above have a common concept the file access.

I don't think it'd take an eagle anything to understand the ripped files won't be played with a CD player. The question originally asked was what would be a good method of ripping a CD in order to be able to burn the ripped files to make an identical copy. You said in relation to FLAC+cue:
"should a CD be gap-less (like most electronic music and live concerts) there is a good chance that a short (and nasty) gap would appear at track boundaries" then you claimed:
"Because I tried and there is also a nice *technical* explanation why it won't work, except in particular cases. "

Sometimes it seems the simpler the question, the harder you try to avoid answering it. When will this nasty gap you refer to appear when using FLAC+cue, or individual FLAC files, or a multi-channel FLAC file, or whenever you believe using FLAC will cause it to happen? When you re-burn the FLAC files as a new CD? Once I know, I'll happily test it for myself. And once again, what's the technical explanation for it happening to which you referred?

hello_hello
3rd September 2013, 08:23
^ A couple of months ago, I decoded a MLP file with ffmpeg, and indeed, the resulting WAV file also had some "additional silence" at the end. I haven't studied the source-code of the DVD-Audio plugin for foobar2000, so I can only hope/assume its author has done the job well. :)

I can't say I've paid much attention to DVD-Audio files, so I couldn't really comment on them being in inherently gapless (I'd assume they would be), or whether "additional silence" at the end after decoding would be a decoder issue etc. Maybe MLP is the exception which makes the rule. ;)
Do you happen to have a small sample?

Ghitulescu
3rd September 2013, 10:21
My answer tothe OP has already been given.
If he wants to preserve the structure of the original CD, he must use a single file approach with a cue file if the album is gapless. Depending on the reader and writer, he can enrich this cue file with ISRC and other useful codes (including CD TEXT, so often missing from the originals).
If he wants to play them, he could rip each track individually, with or without a cue file, as most burning software allow one to construct a CD from single audio files (CUE on the fly :) ). There are no restrictions for playback on the PC, standalones might require special codecs (like MP3 and the like).

If he wants to follow my advice, fine. If he decides to follow others, again fine. I am not founding a church and my word is not God's one. I also do not intend to teach other people on my own time.

hello_hello
3rd September 2013, 11:48
My answer tothe OP has already been given.

Well I'll give you one thing, you're still finding slightly new variations on classic topic avoidance techniques. What happens is, in a discussion forum, when answers are given posters also tend to discuss them. I've done it while conversing with another poster. You've been doing just that until the questions no longer suited you.

If he wants to preserve the structure of the original CD, he must use a single file approach with a cue file if the album is gapless.

So FLAC+cue is included in that now?
It's nonsense anyway, unless you can demonstrate why a gapless multi-track approach, or a single multi-track FLAC file without cue etc, can't produce exactly the same result.

Depending on the reader and writer, he can enrich this cue file with ISRC and other useful codes (including CD TEXT, so often missing from the originals).
If he wants to play them, he could rip each track individually, with or without a cue file, as most burning software allow one to construct a CD from single audio files (CUE on the fly :) ). There are no restrictions for playback on the PC, standalones might require special codecs (like MP3 and the like).

Change of topic, topic avoidance?

If he wants to follow my advice, fine. If he decides to follow others, again fine. I am not founding a church and my word is not God's one. I also do not intend to teach other people on my own time.

I think the value of your word is fairly well appreciated. Just out of curiosity, if your intention isn't to teach other people on your own time (don't you post from work anyway, on someone else's time?) for what purpose do you post? Why did you post in this thread?

Why is it so hard? You claimed under some circumstance (you might have to clear up exactly when) using FLAC+cue would produce a nasty gap in what should be gapless album/CD? In the context of this discussion, when exactly? Burning them to CD again? Is it a secret similar to the technical explanation to which you referred but won't offer because that'd be teaching in a way explaining how to enrich cue files or how to add text to burned CDs isn't?

rlu
4th September 2013, 15:31
Hi Folks,

I wanted to thank everyone for their contributions. I've begun examining the various linux tools people have mentioned. When I've found a configuration that suits my needs I'll post a description.

thanks again!

RLU