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 81744 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Single file audio CD backup Howto

Reply #25
mbackup no longuer exists... it's now called mka encoder and has more options!

go here for more informations.

Single file audio CD backup Howto

Reply #26
Hi,

Very sorry for my english, I think there are many mistakes in this post...

I aldready made flac muxed in mka, but not with cuesheet, because the precision is only 1/100s (or 1/1000)...
A sample is 1/44100s, so less than cue precision...
When you extract all tracks separately, the number of sample of each track is exactly like the original CD, but when you extract all in one, with cue, it doesn't...

So, we have to use xml chapters (precision 10^-9), rounding correctly the timestamp...
(else, why make a lossless, if timestamp are not correct!?)

We have to extract separated tracks, get timestamps (I made a little program in java to generate xml from an m3u playlist), and indicate to mkvtoolnix the xml file to chapter...

But Foobar2000 (0.82 special) has some problems with FLAC muxed in mka...
read here: http://www.hydrogenaudio.org/forums/index....howtopic=22426&

To answer some questions, it's possible to apply tags per tracks (definated by chapters) and replaygain, etc...

Single file audio CD backup Howto

Reply #27
Quote
Hi,

Very sorry for my english, I think there are many mistakes in this post...

I aldready made flac muxed in mka, but not with cuesheet, because the precision is only 1/100s (or 1/1000)...
A sample is 1/44100s, so less than cue precision...
When you extract all tracks separately, the number of sample of each track is exactly like the original CD, but when you extract all in one, with cue, it doesn't...

[a href="index.php?act=findpost&pid=226599"][{POST_SNAPBACK}][/a]


I don't understand what you mean...
An audio CD image is a wav file (for the audio data) and a cue file for the tracks, indexes and pre gaps information. With these two files you can make an exact copy of the original CD (if the ripping had been made correctly (offset)).

To make a mka file you first encode the wav file with a lossless codec (unless you want to keep audio in the wav form and waste some space...) . the lossless file can be uncompress back to wav and so will give you the same wav data than before compression.
This compressed audio file (audio data of the whole CD) will then be muxed to a mka file. the chapters and chapter tags will be created from the cue sheet and the cuesheet itself will be added to the mka file as an attachment.

So if you need to reburn a copy of your orignal CD you have just to use mkvextract to get back your compressed audio file and the corresponding cue file. so if you decode your compressed audio file to wav you will have a wav file identical to the extraded one and the original cue sheet: you can then burn your exact copy of your original CD. I don't know why you care about 1/44100s precision? ;-)

So mka is really a good way to make single file backup of an audio CD as it permits you to reburn an exact copy if you need it.

To correctly generate the chatper tags from the cue/chapters file, you have to use the latest version of mkvmerge.
My new mkaenc tool also make the things easier if you want to directly rip to CD to mka from EAC, try it :-D

About Flac issue with replay gain, I don't know why it doesn't work properly... I guess something has to be fixed. As I use the mka file for backup only, I don't use replain gain on them. For my listening library I use flac to encode each chapter of a mka album to multiple lossy (ogg vorbis) encoded files. So I can replaygain these ogg files... :-)

Single file audio CD backup Howto

Reply #28
Quote
I aldready made flac muxed in mka, but not with cuesheet, because the precision is only 1/100s (or 1/1000)...
A sample is 1/44100s, so less than cue precision...
When you extract all tracks separately, the number of sample of each track is exactly like the original CD, but when you extract all in one, with cue, it doesn't...


Thanks for this precious input. We understand the problem with sample precision in MKA, and hopefully Mosu will have the time to look into this sooner or later.

However, there is one thing to add :

While the max. precision of the WAV source file is indeed 1/44100 s, this is not correct after the compression ( even lossless ), as ANY kind of compression will always put a number of samples into a single block. For MP3 this is typically 1152 samples in one block, so you best time resolution for a 44100 KHz samples file is 1152/44100 s .

I dont know about FLAC or Wavpack, but i am pretty sure they will also pack a similar number of samples into a single block. For Vorbis IIRC the number can even vary, being the main reason why there is no proper way to handle Vorbis in WAV/AVI/RIFF. Hope this helped a bit ....

Single file audio CD backup Howto

Reply #29
But the cue position does not have to point to the start of a block, does it?

FLAC's internal cue representation uses sample numbers, converting to and from hh:mm:ss.ff when needed.  when you seek to a cue point, it decodes from the containing block and then discards any samples up to the cue point.

Josh

Single file audio CD backup Howto

Reply #30
Quote
Quote
I aldready made flac muxed in mka, but not with cuesheet, because the precision is only 1/100s (or 1/1000)...
A sample is 1/44100s, so less than cue precision...
When you extract all tracks separately, the number of sample of each track is exactly like the original CD, but when you extract all in one, with cue, it doesn't...


Thanks for this precious input. We understand the problem with sample precision in MKA, and hopefully Mosu will have the time to look into this sooner or later.[{POST_SNAPBACK}][/a]

I think Mosu would also be interested in this topic: [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=23617]http://www.hydrogenaudio.org/forums/index....showtopic=23617[/url]

Single file audio CD backup Howto

Reply #31
I think that I remember someone else making a perl script for eac -> mka....if I remember correctly, it included automated cd cover downloading....perhaps this could be included

Single file audio CD backup Howto

Reply #32
Quote
I think that I remember someone else making a perl script for eac -> mka....if I remember correctly, it included automated cd cover downloading....perhaps this could be included
[a href="index.php?act=findpost&pid=226754"][{POST_SNAPBACK}][/a]


The author of the script contacts me a few years ago. He's now in vacation and he will be back soon. It may be interresting to use his automatic cover download routine to create a new tool do directly downaload and add the corresponding cover to an existing mka file. That's one of the reasons why I have included the possibility to run a script at the end of mkaenc  Nevertheless I think that scanning yourself to cover of your CD is a better way to go since I don't think you can easily find high enough resolution of the cover on the internet; indeed, if you want to print it 300dpi is not too much.

Single file audio CD backup Howto

Reply #33
Yeah I wasn't thinking as much for printing as for mere identification

Single file audio CD backup Howto

Reply #34
I my mind, if you make a backup copy of a CD means that you want to be able to reburn an exact copy of it... in this case, being able to print the original cover isn't too much! ;-) Idealy you should also scan the back and the booklet of your CD... but the cover is a minimum. :-)

Single file audio CD backup Howto

Reply #35
IIRC the position of the track/index points on a CD cannot be on any sample but with a multiple of X (that I don't remember). So when you want to make audio CD copies you should use the same frame length. So the cue points can be on the same block start (otherwise you need to decode the file to edit it).

For sample precision inside of Matroska, this has been discussed many times and we can achieve it already...

Single file audio CD backup Howto

Reply #36
Quote
IIRC the position of the track/index points on a CD cannot be on any sample but with a multiple of X (that I don't remember). So when you want to make audio CD copies you should use the same frame length. So the cue points can be on the same block start (otherwise you need to decode the file to edit it).[a href="index.php?act=findpost&pid=226828"][{POST_SNAPBACK}][/a]

for CDs, yes, it has to be on a frame boundary, 1/75th of a second, or 588 samples.  in cue sheets the ff of mm:ss.ff is the frame number (0-74).

Josh

Single file audio CD backup Howto

Reply #37
Quote
I think that I remember someone else making a perl script for eac -> mka....if I remember correctly, it included automated cd cover downloading....perhaps this could be included
[a href="index.php?act=findpost&pid=226754"][{POST_SNAPBACK}][/a]


(sorry this is a bit long!)

Yeah, that was me.  The script I've written is geared more toward batch mode, as opposed to goldenear's script.  It's also probably not nearly as stable!  I use EAC to do a batch of cd's to WAV/CUE then kick off my script to process them all to flac/jpg/log/cue.  I tend to do the flac/jpg/log/cue -> mka process in a second step since I want to make sure the album cover that gets downloaded is the right one before I mux into the .mka file.  The success rate for that is about 85% on non-Various Artists cds.  I download those manually.

With mosu's changes to mkvmerge it makes it much easier to tag those .mka files!  However, I haven't started using .mka yet since playback is still crashing after the last track.  Also, I don't believe there is a way yet for fb2k to reach into the .mka file to retrieve and display the .jpg (or for that matter, the EAC log file)?  Is that still true?

Also, regarding metadata .. I am struggling with the usefulness of the attached cue sheet since any metadata information changed with fb2k will update the .mka tags, not the attached cue sheet.  So, an extracted cue sheet may not be up-to-date.  Has anyone thought of how to handle this?  Or am I the only one losing sleep over it? 

I was thinking of importing the cue sheet into the flac file (which, with metaflac, strips the metadata), then discarding the cue sheet after building the properly tagged .mka file.  I use fb2k for everything and since it handles all of this seamlessly I don't really need to worry about it.  All this only becomes a problem when I start doing things outside of fb2k!

I am away for a few more weeks but when I get back I will update my script with the newest mkvmerge and post it up if anyone is interested.

Single file audio CD backup Howto

Reply #38
All the CUE data are converted into native Matroska features (chapters and tags) so fb2k will modify those. IMO an attached CUE sheet has no use. You can drop it (unless you want to keep the CD ID, maybe).

Single file audio CD backup Howto

Reply #39
The question to drop the cue file is if it's possible to retrieve all the cue sheet informations (incuding pre-gaps) from the matroaka file. I mean if a cue file can be regenrated from the mka file so an attached cue file will become useless... but I guess this is not possible for the moment, so we have to keep the attached cue sheet until regenerating an identical cue file from mka is possible. :-)

I just spoak to mosu. Matroska will soon keep all the cue sheet information. It will manage pregap in the way that INDEX 00 will become a hidden subchapter in the mka file. So it will effectively be possible to recreate the original cue sheet from the mka file. Then, we can drop the attached cuefile and we won't have to matter about keeping it in sync

Single file audio CD backup Howto

Reply #40
Quote
@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
[{POST_SNAPBACK}][/a]


foo_matroska has been updated. You can download release 0.6.0 [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=24096]HERE !!![/url]

You should not have problems anymore with replaygain or playing the last track

Single file audio CD backup Howto

Reply #41
Finally! Now we can restart from scratch. I had given up hope on an updated foo_matroska already.

tiki4

Single file audio CD backup Howto

Reply #42
A quick question. What happens to the ReplayGain data? Does Foobar2000 store it in a database? Or does it add the information to the file?

Single file audio CD backup Howto

Reply #43
It add replaygain as a matroska tag

The problem of crash is resolved, but there's always the bug of number of samples of the last track

And when you look the number of samples of any tracks, when you transcode it in flac file (in flac contenair), the number of sample is decreased by 1... (only for chapters timestamp rounded)

Single file audio CD backup Howto

Reply #44
Quote
A quick question. What happens to the ReplayGain data? Does Foobar2000 store it in a database? Or does it add the information to the file?
[a href="index.php?act=findpost&pid=228036"][{POST_SNAPBACK}][/a]


The replaygain information is stored directly in the mka file :-)

Single file audio CD backup Howto

Reply #45
Quote
I just spoak to mosu. Matroska will soon keep all the cue sheet information. It will manage pregap in the way that INDEX 00 will become a hidden subchapter in the mka file. So it will effectively be possible to recreate the original cue sheet from the mka file. Then, we can drop the attached cuefile and we won't have to matter about keeping it in sync


Ex-cell-ent. My thanks to the matroska developers, your work is greatly appreciated.

Single file audio CD backup Howto

Reply #46
I have a 4 cd set, and I'd like to have only one copy of the cover art and the booklet that came with it (all the scans together are about 30MB).  I was thinking that just having one mka file would be the best way to accomplish this.

I was thinking of instead of using the new eac command line mka outputter, to just rip to cue/flac on all the cds, combine the flacs, and adjust the times in the cue files (and merge the cues).  And then just mux all that together.  However, it won't have accurate timings for beyond the first disc.  Is there an easy way to adjust the timings in the cues, or another recommended way of doing this?

Single file audio CD backup Howto

Reply #47
Quote
I have a 4 cd set, and I'd like to have only one copy of the cover art and the booklet that came with it (all the scans together are about 30MB).  I was thinking that just having one mka file would be the best way to accomplish this.

I was thinking of instead of using the new eac command line mka outputter, to just rip to cue/flac on all the cds, combine the flacs, and adjust the times in the cue files (and merge the cues).  And then just mux all that together.  However, it won't have accurate timings for beyond the first disc.  Is there an easy way to adjust the timings in the cues, or another recommended way of doing this?
[{POST_SNAPBACK}][/a]


I don't recommend you to to this as it will be as mess if you want to reburn your CDs...
In a backup purpose, a 4 CDs set should become a 4 mka files set; the cover and the booklet shoud be attached to the first mka file (disc 1), and the cover ONLY to the other mka files. If you want to play all the 4 CD together, just add the in a playlist 

If your REALLY want to go your way, I guess the most simple way to do it is to use an audio editor such as SoundForge to append the 4 wav images of yours CDs and make a cue sheet by hand as I don't know any tool to automaticaly do it ;-)
I don't even know if it works: I wonder if a cuesheet max duration is not 99 minutes 59 second and 74 frames 

First methode is really easier and safer 

And don't forget: I recommend you to wait for mkaenc 1.0.0 and mkvmerge 0.9.4 ([a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=23617&st=25]please read here[/url])

Single file audio CD backup Howto

Reply #48
You could technically do the 4 CDs into a single MKA file.  The 'proper' way to do it though would be to have an audio track for each CD, and break up songs by chapters as chapters can be applied to individual tracks instead of the whole file.  However, I am not really sure if the fb2k plugin would like this at all.

Single file audio CD backup Howto

Reply #49
Quote
You could technically do the 4 CDs into a single MKA file.  The 'proper' way to do it though would be to have an audio track for each CD, and break up songs by chapters as chapters can be applied to individual tracks instead of the whole file.  However, I am not really sure if the fb2k plugin would like this at all.


I fully agree with Pamel here, the proper way to get a 4 CD album into a single MKA file would be to create 4 separate audio tracks in the MKA file ( similar to the video files with separate tracks for each language ).

Only the fb2k plugin must be updated, so that it will allow to select the right audio track.