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: flac --cuesheet (track numbers sequential) (Read 7649 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

flac --cuesheet (track numbers sequential)

My sample cuesheet look like this
Code: [Select]
REM GENRE Soundtrack
REM DATE 2009
PERFORMER "Christian Marcussen"
TITLE "Operation Flashpoint: Dragon Rising"
FILE "Christian Marcussen - Operation Flashpoint - Dragon Rising.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Menu Theme"
    PERFORMER "Christian Marcussen"
    INDEX 01 00:00:00
  TRACK 10 AUDIO
    TITLE "End Credits"
    PERFORMER "Christian Marcussen"
    INDEX 01 05:57:39
So only first and last track.

And this is my cmd line
Code: [Select]
flac.exe --force --no-utf8-convert --compression-level-0 --tag "ALBUMARTIST=!albumartist!" --tag "DISCNUMBER=!discnumber!" --tag "TOTALDISCS=!totaldiscs!" --cuesheet="Christian Marcussen - Operation Flashpoint - Dragon Rising.cue" --picture="Christian Marcussen - Operation Flashpoint - Dragon Rising" "Christian Marcussen - Operation Flashpoint - Dragon Rising.wav"


Error msg
Code: [Select]
Error parsing cuesheet on line 10: CD-DA TRACK numbers must be sequential
Encoding won't start. Why? What's the point? How to ignore this ridiculous restriction?

If "TRACK 10 AUDIO" set to "TRACK 02 AUDIO" in the cuesheet - warning:
Code: [Select]
WARNING cuesheet is not audio compliant: CD-DA cue sheet lead-out offset must be evenly divisible by 588 samples

Encoding starts and finishes. The output flac in foobar2k doesn't look good


What is happening?

flac --cuesheet (track numbers sequential)

Reply #1
Encoding won't start. Why? What's the point? How to ignore this ridiculous restriction?

Don't (ab)use CUE sheets: they describe audio layout on CD disks, not some arbitrary data.

Encoding starts and finishes. The output flac in foobar2k doesn't look good [...] What is happening?

FLAC and foobar2000 use CUE sheets in 2 different incompatible ways. And IMHO FLAC --cuesheet option is pretty much obsolete.

flac --cuesheet (track numbers sequential)

Reply #2
I have tons of albums and singles from them ripped with EAC to WAV+CUE, want to use FLAC format for archiving that collection and playing it with foobar2k. What method of encoding and embedding track information and cover art would You recommend?

flac --cuesheet (track numbers sequential)

Reply #3
Try using CUETools, it can handle most types of cuesheets (unlike foobar2000 which can't handle non-compliant cuesheets). It can convert from and to most formats as well.

flac --cuesheet (track numbers sequential)

Reply #4
Try --tag-from-file="CUESHEET=image.cue" instead of --cuesheet="image.cue"
foobar2k can read the CUESHEET tag.

edit: The file extension in the CUESHEET tag doesn't change. This shouldn't matter in foobar2k but it might in other programs. You can use foobar2k to edit the FILE line in the embedded CUESHEET tag from .wav to .flac.

Error msg
Code: [Select]
Error parsing cuesheet on line 10: CD-DA TRACK numbers must be sequential
Encoding won't start. Why? What's the point? How to ignore this ridiculous restriction?

http://digitalx.org/cue-sheet/syntax/#track
Quote
Rules:

All track numbers must be between 1 and 99 inclusive. The first track number can be greater than one, but all track numbers after the first must be sequential. You must specify at least one track per file.
korth


flac --cuesheet (track numbers sequential)

Reply #6
That's probably because foobar2000 treats this cuesheet as invalid (track 10 immediately after track 01).

flac --cuesheet (track numbers sequential)

Reply #7
Nope. Changed the TRACK 10 to TRACK 02 in the cuesheet - same results.

flac --cuesheet (track numbers sequential)

Reply #8
I took a wav file and encoded it to flac:
Code: [Select]
flac test.wav --tag-from-file CUESHEET=test.cue -o out.flac

(the cuesheet was copied to a file from the 1st post).
foobar2000 is able to see the embedded cuesheet and shows two tracks: 01 - Menu Theme and 10 - Credits (so I was wrong when I assumed that to be a problem).

It seems that your CUE file is in UTF-8 format with BOM, and FLAC copies BOM from the file to the tag. And foobar2000 doesn't like BOM in the beginning of the cuesheet tag.

flac --cuesheet (track numbers sequential)

Reply #9
From operations_shorthand_vorbiscomment.c in metaflac source:
Code: [Select]
    case OP__SET_VC_FIELD:
#ifdef _WIN32 /* do not convert anything or things will break */
        ok = set_vc_field(filename, block, &operation->argument.vc_field, needs_write, true);
#else
        ok = set_vc_field(filename, block, &operation->argument.vc_field, needs_write, raw);
#endif

So, in Windows, metaflac --set-tag-from-file always copies raw data in the file as if --no-utf8-convert was specified.
I guess it's because command line arguments are always unicode in Windows, so it's reasonable and fine for --set-tag=FIELD.
As for --set-tag-from-file, it may not be so good.

flac --cuesheet (track numbers sequential)

Reply #10
Do flac/metaflac know what to do with BOM bytes?


flac --cuesheet (track numbers sequential)

Reply #12
It seems that your CUE file is in UTF-8 format with BOM, and FLAC copies BOM from the file to the tag. And foobar2000 doesn't like BOM in the beginning of the cuesheet tag.

Yeah... In the meantime I've done some testing and the results pointed to cuesheet encoding (UTF-8 with BOM). Got some cuesheets with non-ANSI characters. Any suggestions how to encode them for f2k to displays those characters correctly?

flac --cuesheet (track numbers sequential)

Reply #13
Any suggestions how to encode them for f2k to displays those characters correctly?


Try this: create a CUE file in UTF-8 encoding, but without BOM mark. Then encode it as:

flac --no-utf8-convert --tag-from-file CUESHEET=file.cue -5 test.wav -o out.flac

flac --cuesheet (track numbers sequential)

Reply #14
Yes! It worked. This concludes the battle... Thanks for all the help