Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Single file audio CD backup Howto (Read 81515 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Single file audio CD backup Howto

This guide is outdated
I have to rewrite it partially... until then, please READ THIS

---------------------------------------------------------------------------------------------------

Like many people here, I want to backup my CD collection so that I will be able to burn a copy of one of my audio CD in case of lost or degradation. If you have enough diskspace on your harddrives, you'll also be able to listen your whole music collection without using your original CDs. 
As many people are asking questions about how to do this in the most simple way, I decided to write here this howto and I hope it will be helpfull. 

The aim of the game is to produce a single backup file for each CD. This file must be an exact copy of the original audio CD (with tracks/cue points, ISRC,  cdtext or ISO/Data track if needed) and it must be directly playable on a computer (as easily as you play an audio CD). It will include all the tags (artist, title, genre, date, ...) needed for each track of the CD, so these informations can be displayed when the file is played or can be used when the file is "splitted" and encoded to multiple ogg/mp3/aac/... . The backup file should also be able to "embed" some usefull files like lyrics or .jpg files of the cover and/or the art/booklet.
All that is possible and it's named "Matroska"! 

Here is how to do it in Windows:

This methode may not be the best, but it is the most simple I found. I use it and it works very well.

1) You have to get some tools:
- Matroska -> the Matroska Pack Full
- Tools for making Matroska files -> mkvtoolnix
- a lossless encoder -> Flac
- a good audio CD ripper -> EAC
- a powerfull player/tagger -> Foobar2000 Special

Download an install this tools. Be carefull to always download the full version (note the lite one).

2) Configure eac :
- after installing EAC you have to configure it for your CD drive (very important)
- don't forget to check the boxes "Retrieve UPC/ISRC codes in CUE sheet generation" and "Use CD-Text information in CUE sheet generation" in the "EAC/EAC options/tools tab" menu (F9)
- in the "EAC/compression options" menu (F11), go to the "external compression" tab
- check the "Use external program compression" box
- select "User defined encoder"
- set "Use file extension" to .flac
- set your flac.exe path
- set the "Additional command line options" to :
  --best -V %s -T Artist="%a" -T Album="%g" -T Date="%Y" -T Genre="%m"
- bitrate / quality parmeters had no effects
- uncheck all the other checkboxes exept (unless you really need it) " Delete WAV after compression"

Now EAC should be configured and ready for ripping. If you need more help on EAC configuration, you should find some good topics about that on the HA forums.

3) Rip your audio CD

With EAC:
- Put your audio CD in the extracting CD drive
- Get CD information on remote freedb (Alt+G)
- Verify that all the tags (titles/artist(s)/date/genre) are correct (fix them if necessary)
- go to "Action/Copy Image & Create CUE Sheet/Compressed
- select the emplacement where you want to save your .flac and .cue files (for me it's c:\riptmp\)
- give a good file name to the .flac file (album_artist - album_title.flac) and launch the rip! 

After some time, you should have two file in the selected emplacement:
c:\tmprip\album_artist - album_title.flac.flac
c:\tmprip\album_artist - album_title.fllac.cue

You can notice the .flac.flac extension; this is a bug (.flac.cue is normal). just rename the file so that you have:
c:\tmprip\album_artist - album_title.flac
c:\tmprip\album_artist - album_title.fllac.cue

4) Prepare the "embeded" documents (optional but recommended)

--- recommended ---
- scan the cover of the CD (scan at 300 dpi is nice for printing) and save it as:
c:\tmprip\cover.jpg

if your audio CD contain a data track (CD extra) just save it as:
c:\tmprip\track#.iso

--- optional ---

you can add anything you find usefull:
.jpg files of the art/booklet/back
.html (recommended) or plain text files of the lyrics
text files for notice, comments, etc ...

5) Merge everything into a single file

In the mkvtoonix directory (previously installed) launch mmg.exe

- "Input" tab :
  - "Input file" add c:\tmprip\album_artist - album_title.flac

- "Attachements" tab :
  - "Attachements" add c:\tmprip\album_artist - album_title.flac.cue
  - set "MIME type:" to text/plain
  --- recommended ---
  - "Attachements" add c:\tmprip\cover.jpg
  - "Attachements" add c:\tmprip\track#.iso
  --- optional ---
  - "Attachements" add c:\tmprip\lyrics.html
  - "Attachements" add what you find usefull ... (book01.jpg/book02.jpg/back.jpg/...)
  --- ! don't forget to set the correct MIME type each time you add a file ! ---

- "Global" tab:
  - "Chapters" : set "Chapter file" to c:\tmprip\album_artist - album_title.flac.cue

- set "Output filename" to d:\backup\album_artist - album_title.mka (d:\backup\ is for me, choose what you want  extension .mkv is for audio/video .mka for audio only)

"Start muxing" !!!

After some time you should have a new file:
d:\backup\album_artist - album_title.mka

This is your audio CD backup file... Everything into a single file! That what we want. 

Unfortunatly, the tags (artist/title/genre/date/etc ...) for each track is not retrieved from the cuesheet so we have to use an other tool to fix this...

6) Add the tags
We can now test the .mka file opening it with Foobar2000.
Normaly, it works fine... all the tracks are displayed and you can skip from one to an other. But, if you right click on a track and go to its properties, you'll find that the tags are not well set. To fix this, we have to set the tags from freedb: Select all tracks, rightclick "freedb/get Tags", select the right disk in the database "preview", verify if all the informations are correct (cf section 3 - Rip), "Tag files" !!!
Now all the tags are correctly set and saved to the mka file.

You can delete all the files in "c:\tmprip\" and start over at section 3 with another CD.

If you don't want to play your .mka file in foobar, you can use Media Player Classic that works also very well.

Another usefull tool is The Matroska Shell Extension wich enable you to browse your .mka files and show tags/attachements/informations.

That's all folks! 


Here is how to do it in Linux:

Sections 1 to 5 are alsmost the same as in Windows expect that you must use cdparanoia instead of EAC (and cdrdao + toc2cue to get the cuesheet) and everything have to be done on the command line (AFAIK). There may be some scripts to do all automagically... If you have any information, it's welcome 
The issue is that Foobar doesn't exist in Linux ... So to set the correct flags in the .mka file chapters, we would need some cue2xml tool.
A simple software with a nice (GTK) GUI to do all this would be great, unfortunatly I'm not skilled enough in coding to do it myself (If anybody wants to do it, I can help).


I hope all this will be usefull. Questions and comments are welcome.


-------------------------------------------------------------------------------------------------

This guide is outdated
I have to rewrite it partially... until then, please READ THIS

Single file audio CD backup Howto

Reply #1
Thank you! The album-in-one-FLAC file doesn't work to well for me, I'll try this and report back

Single file audio CD backup Howto

Reply #2
Great Guide !  Keep up the good work ....

Single file audio CD backup Howto

Reply #3
goldenear -

I have a compiled perl script that will do all of what you're doing above in the windows environment after it's ripped by EAC (including downloading the cover art from the internet).  I have not 'released it to the wild' since I have to rely on fb2k for the tagging.  I am following your other thread quite closely to see of mosu can hook us up with mkvmerge and remove the dependency on fb2k.  If you would like to try it just PM me.  I would welcome some feedback!

Thanks !

Single file audio CD backup Howto

Reply #4
I'm also very impatient to see mosu's work

I PM you for your script. It might be very usefull and I guess it should aslo work under linux. I hope to find soon a solution to make (retrieve from freedb) a full (with all tags) .cue file under linux.

Single file audio CD backup Howto

Reply #5
I'd just like to say thanks for this great guide! But, what are the main advantages of this method over the one in the sticky? I ask because I will be doing a lossless archive soon and I want everything as if it was from the CD (which is why I'm annoyed I don't have key CD for AccurateRip, the loss of some data ) incase something ever happened to the CD. There are lots of formats to choose from and even more ways of doing things, please help .

BTW I think I've decided that a single file is the best way to go over lots of smaller files, like this guide shows.

Single file audio CD backup Howto

Reply #6
Quote
I'd just like to say thanks for this great guide! But, what are the main advantages of this method over the one in the sticky?


Thanks.   

The methode in the sticky only uses a flac file... and FLAC doesn't  support tags for each track/chapter. Unlike matroska, it only gets the cue points from the CUE sheet, not the tags (or CD-text informations).

AFAIK, Matroska is the only methode to have flac + cue + cover + all the tags in a single file 

Single file audio CD backup Howto

Reply #7
I just tried this method, it looks great as I can add lots of things to the file. But, every time I play the file I tested in Foobar2000 at the end of the last song it crashes. I have no idea why.

EDIT: It all plays fine in Media Player Classic though.

Single file audio CD backup Howto

Reply #8
That's a very useful guide, goldenear. Thank you.
Over thinking, over analyzing separates the body from the mind.

Single file audio CD backup Howto

Reply #9
Great idea to make to this guide. Good work.

To me it makes more sense anyway to store a whole CD backup with all the extra stuff in a playable container rather than zipping it or keep it in a seperate folder.

I hope Matroska gets popular for doing things like CD backup. 

Single file audio CD backup Howto

Reply #10
Hello,

Is there a plugin for foobar2000 that is able to display the cover attached in .mka file?

-ec

Single file audio CD backup Howto

Reply #11
Beautiful work goldenear.

I've been wanting to do exactly this, but it's been such a daunting task that I haven't taken it on yet.  I want to write a script to completely automate this (the only user interaction would be correcting the tags).  You'd just drop the CD in the drive, run the script and go grab some coffee.  I'd also like to make scripts to automatically split out, encode and tag tracks for my portable.  Hmmm, maybe scripts to ease editing of tags or adding cover art or meta-stuff at a later date too...

A couple questions:
1) Is CD-TEXT preserved?
2) Are hidden tracks before track 1 preserved properly?
3) Does the process reverse nicely, i.e. do we have a procedure get back a perfect copy of the CD from our matroska file?  Audio CDs with data tracks can make this process messy.

If music were sold online like this (big lossless matroska file with cover art), I could stop buying CDs.
I am *expanding!*  It is so much *squishy* to *smell* you!  *Campers* are the best!  I have *anticipation* and then what?  Better parties in *the middle* for sure.
http://www.phong.org/

Single file audio CD backup Howto

Reply #12
Thanks for all your comments

Quote
I've been wanting to do exactly this, but it's been such a daunting task that I haven't taken it on yet.  I want to write a script to completely automate this (the only user interaction would be correcting the tags).  You'd just drop the CD in the drive, run the script and go grab some coffee.  I'd also like to make scripts to automatically split out, encode and tag tracks for my portable.  Hmmm, maybe scripts to ease editing of tags or adding cover art or meta-stuff at a later date too...


Mosu is making a new version of mkvmerge so that all the tags can be directly got from the .cue file (we soon won't need Foobar2000 anymore to set the tags)

In this occasion, I've made a commande-line encoder (usable as an external encoder in EAC).  It uses FLAC to compress the cdimage .wav file and merge the .flac file + the cue sheet to a single Matroska file with all the chapter tags set! Everything is done automaticaly, so that you can directly create a .mka file from EAC.

So, under Windows you will only need tu use EAC to make the single .mka file backup :
1 - put the CD in the drive
2 - use EAC to get the tags from freedb (and correct them if necessary)
3 - run "create crompressed CD image  with cue sheet) and go to drink a coffee!
a few minutes later, you will get a .mka file backup of your CD!

The same thing will be also nice under Linux... I guess a hack (or new version) of Grip would be a nice tool to do it.

The split the .mka file to several lossy encoded files, you can use Foobar2000 (and it's wonderfull diskwriter). It's works very well and will set all the tags for each individual file. But a comand-line tool to do it would be nice to do some batch convertion... only one line to type to reencode all your CD collection during the night... 

Quote
A couple questions:
1) Is CD-TEXT preserved?
2) Are hidden tracks before track 1 preserved properly?
3) Does the process reverse nicely, i.e. do we have a procedure get back a perfect copy of the CD from our matroska file?  Audio CDs with data tracks can make this process messy.


1) Yes, AFAIF CD-TEXT informations are storred in the CUE sheet, and the CUE sheet is "attached" to the .mka file, so you'll be able to "detache" it when you need it!

2) I guess, but I'm not sure. IMHO, if all the audio data (including the hiddens tracks) are in the extracted wav/flac file (with EAC) and the hidden tracks are well positionned in the CUE sheet, it should work.

3) yep, it's very simple... simply use the mkvextract command :
mkvextract tracks  1:filename.flac

For audio CD with data tracks, I guess it depends on the cd burner software to do it properly. But if you have the wav/flac image file + the .cue + the .iso of the data track, it should not be a problem. 

Single file audio CD backup Howto

Reply #13
Quote
In this occasion, I've made a commande-line encoder (usable as an external encoder in EAC).  It uses FLAC to compress the cdimage .wav file and merge the .flac file + the cue sheet to a single Matroska file with all the chapter tags set! Everything is done automaticaly, so that you can directly create a .mka file from EAC.

So, under Windows you will only need tu use EAC to make the single .mka file backup :
1 - put the CD in the drive
2 - use EAC to get the tags from freedb (and correct them if necessary)
3 - run "create crompressed CD image  with cue sheet) and go to drink a coffee!
a few minutes later, you will get a .mka file backup of your CD!
<sic>

Hrmm
Is a public beta available? (I had thought about hacking up some kind of program for doing this, but there already is one )

And (sorry about being a tad of topic): is there a workaround in EAC, for the problem where the 'Copy Image & Create Cuesheet' function (Alt-F7), always has the default filename "CDImage.wav"....having this constructed from FreeDB data would be much more useful for batch backups. (like m:\audio\%a\%g.mka, or something). Considering that you are using an external program, perhaps the renaming could be done externally (ie let EAC save the file as CDImage.wav, and the mka's filename would be constructed in the manner which has been laid out in a config file somewhere).

This is one of the more interesting areas of development

Single file audio CD backup Howto

Reply #14
My EAC to mka backup tool will be available in the next 24 hours
It yet can do all what you want (automaticaly renaming files from "CDimage" to "album_artist - album_title").

I'll give here to link to dowload it when last small bugs are fixed... The first public release will be here soon, stay tuned !

Single file audio CD backup Howto

Reply #15
Quote
if your audio CD contain a data track (CD extra) just save it as:
c:\tmprip\track#.iso


Can you go into more detail on this?  What tools do you need?  I've just been saving the files to a "data" folder, the above sounds like it would be much easier to recreate the CD.

Single file audio CD backup Howto

Reply #16
Quote
Quote
if your audio CD contain a data track (CD extra) just save it as:
c:\tmprip\track#.iso


Can you go into more detail on this?  What tools do you need?  I've just been saving the files to a "data" folder, the above sounds like it would be much easier to recreate the CD.


I would suggest using ISOBuster. It works well 
Only problem: they actually want you to pay for it (30 day "pro" trial, and i think unlimited usage in "free" mode, which has less buttons to press ).

The free version would probably work sufficiently anyways.

ISOBuster
Direct Download of ISOBuster v1.6, with all languages

 

Single file audio CD backup Howto

Reply #17
I hope we'll have enough time/resource to add support for such files in the 4 most popular players : Windows Media Player, Winamp, RealPlayer, Quicktime.

Single file audio CD backup Howto

Reply #18
Quote
I hope we'll have enough time/resource to add support for such files in the 4 most popular players : Windows Media Player, Winamp, RealPlayer, Quicktime.
[a href="index.php?act=findpost&pid=225196"][{POST_SNAPBACK}][/a]


I'd like it! 

Single file audio CD backup Howto

Reply #19
Now it's time to make things more simple! 

1) Install & configure EAC

2) Install FLAC

3) Download the updated version of mkvtoolnix and unpack/install it. (It's very important to use this version because it handles the tags)

4) Download my new backup tool: mbackup (copy it in your mkvtoolnix directory)

5) Configure external encoder in EAC:
      -> Use file extension ".mka"
      -> Program: Path to mbackup.exe
      -> Additional command line options : "-i %s -s "%o" -a "%a" -t "%g" -y "%Y" -g "%m" -m -f"

6) In EAC, put a CD in the ripper drive, tag it with freedb. (don't forget to verify the tags)

7) Run "Action/Copy Image & Create CUE Sheet/Compressed"

8) Go and drink something

9) You get a wonderfull .mka file of your CD 

10) You can play it in Foobar2000, you will notice that all the flags are set for each chapter!  You can even save separated tracks to a lossy format such as ogg vorbis.

So isn't life beautifull? 

Bug report, comments or questions are welcome!

have fun!

Single file audio CD backup Howto

Reply #20
firstly, thanks goldenear for writing this howto !

but your update caused by the support of tags makes me wonder how to use this under linux. what are the steps equivalent to the use of your "mbackup.exe" ?
if i use mkvmerge with one single album flac file, and chapters resulting from the .cue file, playing it with vlc (VideoLan) doesn't read chapters...

So, what would you use to tag a .mka made from a single .flac file ? :°)
- global tags ?
- track tag ?
- chapters title from the .cue ?

these parts are still unclear to me...

Single file audio CD backup Howto

Reply #21
@goldenear:

First, I tried your nice little proggie and it works like a charm, but:

A word of warning:
Any MKA file containing FLAC audio muxed with mkvmerge > 0.8.6 will make foobar2000 crash during replaygaining or when the end of the file is reached during playback. The only solution for the moment is to mux the files with mkvmerge 0.8.6. Other players are not affected by this problem.

For more information look e.g. here.

Regards,

tiki4

Single file audio CD backup Howto

Reply #22
I guess we need an updated version of foo_mka ...

Single file audio CD backup Howto

Reply #23
Quote
firstly, thanks goldenear for writing this howto !

but your update caused by the support of tags makes me wonder how to use this under linux. what are the steps equivalent to the use of your "mbackup.exe" ?
if i use mkvmerge with one single album flac file, and chapters resulting from the .cue file, playing it with vlc (VideoLan) doesn't read chapters...

So, what would you use to tag a .mka made from a single .flac file ? :°)
- global tags ?
- track tag ?
- chapters title from the .cue ?

these parts are still unclear to me...
[a href="index.php?act=findpost&pid=225852"][{POST_SNAPBACK}][/a]


Here is how mbackup works :
1 - it gets the date, genre and comment from the command line (parameters -y -g -c) and also albumartist and albumtile (-a -t) used only for naming the files, not to tag.

2 - it regenerates (with -m) a new cue sheet from the one generated by EAC adding missing flags to it (REM DATE 1999 or REM GENRE Jazz)

3 - it encodes the wav file generated by EAC using FLAC. The generated flac file is not tagged at all, all the tags are only in the cue file

4 - it merges the .cue and .flac file to a . mka file. The .mka file will be chaptered and
each chapter tagged from the .cue file during merging

I will make an help file explaining all the command line parameters. I should be ready with the upcoming new release of mbackup.

To do all this under Linux, I guess we'll need a new tool (or a modified grip version).
Right now you can rip with CD paranoia, generate a .cue file with cdrdao+cuetools and then merge with mkvmerge. You can eazily make a shell script to do all that automatically ... the issue is that the tags from CDDB can't be checked during the automatic operation; that's why I think that going from grip would be more easy (grip would replace EAC). I should work on the Linux part soon and I guess that at the end, CD backup will be easier under Linux: I want to create a software to do all the operation (CD ripping, freedb tagging, cue file generation, cover scaning, data track extracted to .iso if needed, and meging all this stuffs to a wonderful .mka file). I just need to find time... and may be help cause I'm not a very skilled programmer. 

Single file audio CD backup Howto

Reply #24
Quote
the issue is that the tags from CDDB can't be checked during the automatic operation; that's why I think that going from grip would be more easy

The freedb library I've been using in my ripping scripts is excellent.  You can find it here.  I think the most unixy way to handle correcting the tags would be to dump them to a text file and fire up $EDITOR.
I am *expanding!*  It is so much *squishy* to *smell* you!  *Campers* are the best!  I have *anticipation* and then what?  Better parties in *the middle* for sure.
http://www.phong.org/