Welcome Guest ( Log In | Register )

Flac Doesn't Let Me Embed This Cuesheet, What's wrong with it?
post Feb 6 2005, 13:43
Post #1

Group: Members
Posts: 602
Joined: 15-February 04
From: Venezia, Italia
Member No.: 12025

Flac (1.1.2) doesn't let me embed the follwing cuesheet

PERFORMER "Performer Name"
TITLE "Album Title"
FILE "mytestfile.wav" WAVE
   TITLE "Track01 Title"
   PERFORMER "Performer Name"
   INDEX 01 00:00:00


with this error:

ERROR initializing encoder

Is this a bug or there is something wrong with my cuesheet that I can't spot?



Edit: spelling. If also a mod could fix the topic title... thanks! (Done, thanks to the mod!)

Edit2: removed great part of the cuesheet as the problem was not with it (see subsequent posts), to make the thread more readable.

Edit3: Modified cuesheet example so that RIAA doesn't sue me, in case I die...

This post has been edited by smz: Feb 9 2005, 02:34

Revox B150 + (JBL 4301B | Sennheiser HD430)
Go to the top of the page
+Quote Post
Start new topic
Synthetic Soul
post Feb 11 2005, 15:23
Post #2

Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217

Actually, on re-reading, I think you said it just fine. I got a little confused by your post correcting yourself, that's all.

I see now that you are suggesting the "cuesheet-last-index test" as the only relevant test to make, and not suggesting that it is already in place.

And there was me thinking I'd come up with a good idea, when I'd actually just stolen yours. unsure.gif

Of course, if it turns out to be a bad idea, I will be quick to lay the blame squarely on your shoulders.

I'm on a horse.
Go to the top of the page
+Quote Post
post Feb 12 2005, 01:23
Post #3

Group: Members
Posts: 602
Joined: 15-February 04
From: Venezia, Italia
Member No.: 12025

I would like to make with you all a sanity check of my ideas about this issue.

To briefly recall what the problem is let me state it in these terms:

"flac.exe refuses to embed a cuesheet when the number of samples of a WAV file to be encoded (PCM at 44.1Khz, 16bits/sample, dual channel) is not a multiple of 588, i.e. not a full CD sector".

The rationale behind this is that a cuesheet will mostly come from the ripping of a CD or an image prepared to be burned on a CD.

It also comes from the fact the when you embed a cuesheet in a flac file an extra virtual track is added to the CUESHEET metadata block. The offset of this track correspond to end of the file i.e. exactly to the "total samples" of that file. An information that BTW is already present in the STREAMINFO metadata block.

It must be noted that this virtual leadout track is by definition of 0 length and it is not present in the cuesheet format, the one we are used to from CDRWin and other applications that have adopted it to describe the content of CD and that we feed to flac to be embedded.

My feeling is that this last virtual leadout track is just a "hint" to help the decoding application to determine the length of the last (real) track.

Anyway we are talking about a "cuesheet" (although "not standard") and it will be embarrassing to have that offset specified at a point where it will be illegal (impossible) for a real CD.

My personal opinion is that this is not a big problem at all, because all burning application I know of can deal with a last track of the "wrong" length by appending the needed number of 0 samples to stuff the last sector.

A player, on the other hand, will have no problem stopping to decode at whatever sample number.

I think that one can pose itself the question of what to do at decoding time in case this special offset, the last sample, is not a multiple of a CD sector: stop decoding at that sample or stuff with 0 samples so that the decoding library will return a sector aligned stream? My personal opinion is that being FLAC a lossless decoder it should return a bit-identical stream to the input, so it should stop decoding where the original stream ended.

Beside that I really don't see any problem at all in the fact that this last (virtual, introduced by FLAC) track "starts" at a "wrong" boundary. (Maybe when you "pipe" multiple FLACs with cuesheet to a single burning session?? Is this possible with any application? Will it be screwed up by this situation??)

Does all that I said make sense? Have I missed some point? Am I too ignorant of the internals and thus ignoring something that shouldn't be?

About the fact that flac.exe (and metaflac as well) should check that the input cuesheet offsets falls inside the span of the file (a totally different issue), I can't agree more: that should be checked.



Edit: Spelling, comme d'habitude

This post has been edited by smz: Feb 12 2005, 01:35

Revox B150 + (JBL 4301B | Sennheiser HD430)
Go to the top of the page
+Quote Post

Posts in this topic
- smz   Flac Doesn't Let Me Embed This Cuesheet   Feb 6 2005, 13:43
- - BruRob   Your third line reads: FILE "Nearness of You-...   Feb 6 2005, 14:56
|- - smz   QUOTE (BruRob @ Feb 6 2005, 03:56 PM)Your thi...   Feb 6 2005, 15:23
|- - smz   Sorry to bump this post, but I think I have some (...   Feb 6 2005, 20:11
|- - jcoalson   I probably cannot tell anything without having the...   Feb 7 2005, 05:28
|- - smz   QUOTE (jcoalson @ Feb 7 2005, 06:28 AM)I prob...   Feb 7 2005, 12:32
|- - lexor   QUOTE (smz @ Feb 7 2005, 03:32 AM)QUOTE (jcoa...   Feb 7 2005, 13:44
|- - smz   QUOTE (lexor @ Feb 7 2005, 02:44 PM)try and s...   Feb 7 2005, 14:16
|- - smz   Does anybody knows a tool to validate the structur...   Feb 8 2005, 12:04
|- - rjamorim   QUOTE (smz @ Feb 8 2005, 09:04 AM)Does anybod...   Feb 8 2005, 13:21
- - Synthetic Soul   I just tested your WAVE and CUE and got the same r...   Feb 8 2005, 13:21
- - Synthetic Soul   QUOTE (rjamorim @ Feb 8 2005, 12:21 PM)QUOTE ...   Feb 8 2005, 13:33
- - jcoalson   I see the problem, but I'm not sure what to do...   Feb 8 2005, 19:04
|- - smz   Josh, thank-you for analyzing the problem. Here a...   Feb 9 2005, 02:26
- - Synthetic Soul   QUOTE (smz @ Feb 9 2005, 01:26 AM)QUOTE (jcoa...   Feb 9 2005, 11:23
- - kjoonlee   IMHO the assumption(s) that flac and metaflac make...   Feb 9 2005, 15:22
|- - smz   QUOTE (kjoonlee @ Feb 9 2005, 03:22 PM)... Th...   Feb 9 2005, 15:41
|- - rjamorim   QUOTE (kjoonlee @ Feb 9 2005, 12:22 PM)One vo...   Feb 9 2005, 18:04
- - jcoalson   the majority of cuesheet use is via cuesheets ripp...   Feb 9 2005, 18:56
|- - rjamorim   QUOTE (jcoalson @ Feb 9 2005, 03:56 PM)the ma...   Feb 9 2005, 19:01
- - kjoonlee   The cuesheet format screams out "CD-DA"....   Feb 10 2005, 12:51
|- - smz   QUOTE (kjoonlee @ Feb 10 2005, 12:51 PM)The c...   Feb 10 2005, 13:17
|- - rjamorim   QUOTE (smz @ Feb 10 2005, 10:17 AM)Correct. W...   Feb 12 2005, 03:24
|- - smz   QUOTE (rjamorim @ Feb 12 2005, 03:24 AM)QUOTE...   Feb 12 2005, 03:38
|- - rjamorim   QUOTE (smz @ Feb 12 2005, 12:38 AM)I didn...   Feb 12 2005, 17:11
- - m0rbidini   I agree with rjamorim and smz. FLAC is making assu...   Feb 10 2005, 13:18
- - m0rbidini   Er, correction. I wrote: QUOTE Cue sheets don...   Feb 10 2005, 13:25
- - Synthetic Soul   QUOTE (m0rbidini @ Feb 10 2005, 12:25 PM)...   Feb 10 2005, 13:46
- - jcoalson   how is the cuesheet duration specified if there is...   Feb 10 2005, 16:24
- - Synthetic Soul   Point taken. You could ascertain whether the last...   Feb 10 2005, 16:30
- - m0rbidini   Meh, I had it "more or less right" the f...   Feb 11 2005, 15:09
- - Synthetic Soul   Actually, on re-reading, I think you said it just ...   Feb 11 2005, 15:23
|- - smz   I would like to make with you all a sanity check o...   Feb 12 2005, 01:23
|- - smz   One more consideration: If foobar2000 easly accep...   Feb 12 2005, 02:16
|- - rjamorim   ...   Feb 12 2005, 03:28
- - jcoalson   following up, this is changed in CVS, output now l...   Aug 24 2005, 01:27
- - Synthetic Soul   Thanks Josh. As you say, it's up to the user ...   Aug 24 2005, 09:40

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 29th November 2015 - 09:24