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: Converting FLAC to multitrack in another lossless format generates dif (Read 5236 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converting FLAC to multitrack in another lossless format generates dif

HI!!
Strangely after converting album in FLAC tracks to multitrack file in another format generates different tracks. Comparing the first track foobar complains about different length:

Differences found in 1 out of 1 track pairs.

Comparing:
"E:\xfer\download\Television - Marquee Moon (PBTHAL Vinyl Rip 2012)(Hi-Rez)\01 - See No Evil.flac"
"G:\music\Television - Marquee Moon [LP] {pbthal @ March 16th, 2012} (1977)\Side A.tak" / index: 1
Length mismatch : 3:58.517937 vs 3:58.520000, 22897722 vs 22897920 samples

Why is that and is it bug or limitation of internal tracks indexing?
Can I achieve same tracks lengths using temporary cuesheet somehow?

Converting FLAC to multitrack in another lossless format generates dif

Reply #1
Strangely after converting album in FLAC tracks to multitrack file in another format generates different tracks. Comparing the first track foobar complains about different length:

How was the ‘conversion’ done?

Converting FLAC to multitrack in another lossless format generates dif

Reply #2
Yes this was made using the middle option (Generate multi-tracks files)

Converting FLAC to multitrack in another lossless format generates dif

Reply #3
That's a CUE sheet limitation.

Converting FLAC to multitrack in another lossless format generates dif

Reply #4
So there's no way how to convert files to multitrack exactly indexed?
I think CUEtools provide this functionality (not too sure) but sadly it only works for CDA.

Converting FLAC to multitrack in another lossless format generates dif

Reply #5
Cuesheet format stores timestamps with precision down to 1/75th of a second. You cannot have more accurate track split marks when using cuesheets, hence strange results you've noticed.
Microsoft Windows: We can't script here, this is bat country.

Converting FLAC to multitrack in another lossless format generates dif

Reply #6
I don't understand. He's got an album side in a .tak file w/cue sheet. The cue sheet says track 01 index 01 starts at whatever point in the .tak (00:00:00 probably) and track 02 index 01 starts at some later point. The difference will be a multiple of 1/75th of a second, which for a presumably 96 KHz "hi-res" vinyl rip is going to be 1280 samples. 22897920 is indeed a multiple of 1280. Assuming the sample rate wasn't changed in the conversion to FLAC, why would the FLAC come up 198 samples short? foobar2000 says index 1 in the .tak is 22897920 samples, so why shouldn't it feed that many samples to the converter and why shouldn't he expect the same number of samples to show up in the resulting FLAC?

Converting FLAC to multitrack in another lossless format generates dif

Reply #7
so why shouldn't it feed that many samples to the converter and why shouldn't he expect the same number of samples to show up in the resulting FLAC?


Not exactly....FLACs were cut exactly (non-CUE normalized) whích probably lead to CUEsheet rounding in resulting multitrack file.
The question is if multitrack file could use different indexing than by embeded CUEsheet, sample accurate. This however probably would be a foobar specific hack incompatible with anything other...

Converting FLAC to multitrack in another lossless format generates dif

Reply #8
The difference will be a multiple of 1/75th of a second, which for a presumably 96 KHz "hi-res" vinyl rip is going to be 1280 samples. 22897920 is indeed a multiple of 1280.
CUEs are meant to represent CDs, not provide chapter support for arbitrary media. Try using a real chapter format for anything non-CD.
It's only audiophile if it's inconvenient.

 


Converting FLAC to multitrack in another lossless format generates dif

Reply #11
CUEs are meant to represent CDs, not provide chapter support for arbitrary media.

In a lossless-to-lossless conversion, foobar2000 should not have any trouble producing a file with the same sample count as appears for that item in the playlist. Everyone is getting hung up on the idea of it being a cue sheet, but it shouldn't matter. And my testing below shows that foobar2000 works fine in this regard; when the cue sheet is loaded into the playlist, the track duration  estimates take the sample rate into account, and when the converter generates per-track files, they have the same durations, as expected.

FLACs were cut exactly (non-CUE normalized) whích probably lead to CUEsheet rounding in resulting multitrack file.


I still don't get it. Your original file is an album side, one long audio file. It has no track structure other than what is defined by the cue sheet, right? The cue sheet must be something like this:

TRACK 01 AUDIO
INDEX 01 00:00:00
TRACK 02 AUDIO
INDEX 01 03:58:39
...

03:58:39 = 238.52 seconds. At 96000 samples/second, that's 22897920 samples. It is totally reasonable to expect foobar2000 to put that many samples into the file it creates for track 01. There's no rounding, no reason it should come up 198 samples short.

Example:
1. create a 15-minute "album side":
Code: [Select]
sox -n -b 24 -r 96000 -c 2 triangle_24_96_15m.flac synth 900 triangle 200

2. create a cue sheet to split it into 2 tracks:
Code: [Select]
PERFORMER "test"
TITLE "pink noise"
FILE "pink_24_96_15m.flac" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00
PERFORMER "test"
TITLE "first track"
TRACK 02 AUDIO
INDEX 01 03:58:39
PERFORMER "test"
TITLE "second track"

3. load the cue sheet into foobar2000:


If you select just the first track, you'll see it has duration 3:58.520 (22 897 920 samples), as expected:


4. convert the tracks to separate files:


If you then load the created files into foobar2000, you'll see they are exactly the right length...22897920 samples in [01] test - first track.flac ...


It works the same even if I use an embedded cue sheet.

So unless there's a bug in the TAK reader (I only tested with the source file being FLAC), there's something you're not telling us here. What exactly are you doing to produce a track with fewer samples? Is it exactly this same process, but with a TAK file as the source? I would consider it a bug if the converter isn't getting the right number of samples out of foo_input_tak.

Converting FLAC to multitrack in another lossless format generates dif

Reply #12
I still don't get it. Your original file is an album side, one long audio file.

No, original files are several FLACs and they were converted into single TAK + cuesheet.

Converting FLAC to multitrack in another lossless format generates dif

Reply #13
Ah OK, never mind then. Sorry for not getting that out of the original post.