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 Metadata Problems with Foobar2000 (Read 12448 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FLAC Metadata Problems with Foobar2000

Guys, I'm totally stuck here. I am having a lot of problems getting my flac files to work well in terms of playback in foobar. They are cd images. Anyway, I want to have a cuesheet in the CUESHEET metadata block, and also a CUESHEET tag, along with the standard ARTIST, ALBUM, DATE, etc. tags (vorbis comments). Replaygain too. And maybe a picture, I haven't decided yet. But foobar reads the CUESHEET metadata block (which doesn't contain the track names, frustratingly) instead of the CUESHEET vorbis comment, so you can't get the track names in the foobar playlist or in the album list. (Seeking to individual tracks is no problem, though.) It also doesn't always pick up the replaygain tags either. Maybe it has something to do with the order the tags are put into the VORBIS_COMMENTS metadata block. How does everyone else tag their flac cd images; or is there a way to change the way foobar parses the flac metadata?



Thanks...

FLAC Metadata Problems with Foobar2000

Reply #1
How does everyone else tag their flac cd images;

I use
Code: [Select]
%flac% --best --cuesheet="%~d1%~p1%~n1.cue" --tag-from-file=CUESHEET="%~d1%~p1%~n1.cue" %1

to encode wav+cue ripped with EAC, and the resulting files work well in foobar2000.

FLAC Metadata Problems with Foobar2000

Reply #2
I just dealt with this problem here: http://www.hydrogenaudio.org/forums/index....showtopic=52301

Easiest thing to do is use the built in CUE Sheet Editor in FB2K and import the CUE sheet bringing all track data. If you all ready added the CUE into the CUESHEET tag and it has the track points, then just use FB2K to update the album info from FreeDB.

Other highlights from that thread is to use the metaflac.exe to import the CUE properly.

Just taking a stab, I think containing multiple replay gain values in a FLAC image is too difficult for the program. Again, no clue, I think it will just give replay gain values for the entire album.
OP can't edit initial post when a solution is determined  :'-(

FLAC Metadata Problems with Foobar2000

Reply #3
@Cartman_Sr

fb2k dosen't pick up RG tags on images, so you have no use in fb2k of e.g. encoding with the flac.exe "--replay-gain" switch. Of course this would also only make album gain available and not track gain, but fb2k also dosen't pick the album gain/peak tags up either. Unless you need to decode single tracks out of the image directly from a command prompt with flac.exe, or using an app that dosen't support the Vorbis comment "cuesheet" tag, but only the "CUESHEET" block, then i would recommend you to just embed the cuesheet into a Vorbis comment "cuesheet" tag and just skip the "CUESHEET" block completely.

FLAC Metadata Problems with Foobar2000

Reply #4
I just dealt with this problem here: http://www.hydrogenaudio.org/forums/index....showtopic=52301

Easiest thing to do is use the built in CUE Sheet Editor in FB2K and import the CUE sheet bringing all track data. If you all ready added the CUE into the CUESHEET tag and it has the track points, then just use FB2K to update the album info from FreeDB.

Other highlights from that thread is to use the metaflac.exe to import the CUE properly.


Thanks for the responses. I read through that other thread already, but couldn't figure out if it was pertaining to my particular situation. Anyway, the CUESHEET vorbis comments I've been putting in (with metaflac, or in the old days, tag.exe) have the track names and artists, etc. They are the cuesheets you get from EAC. So I wouldn't really need to use foobar's cuesheet editor (I've tried that already too).

Quote
fb2k dosen't pick up RG tags on images, so you have no use in fb2k of e.g. encoding with the flac.exe "--replay-gain" switch. Of course this would also only make album gain available and not track gain, but fb2k also dosen't pick the album gain/peak tags up either. Unless you need to decode single tracks out of the image directly from a command prompt with flac.exe, or using an app that dosen't support the Vorbis comment "cuesheet" tag, but only the "CUESHEET" block, then i would recommend you to just embed the cuesheet into a Vorbis comment "cuesheet" tag and just skip the "CUESHEET" block completely.


I see your point. But I thought it would be a good idea to have the cuesheet metadata block filled up with a flac-style cuesheet in case some future application or something (like you are saying). I do want to have the replaygain tags in the flac files for use in transcoding (to ogg or mp3 or whatever). I guess I'll just use the CUESHEET vorbis comment instead of the metadata block. Man, I wish the CUESHEET block could store track names and things. I mean, it stores catalog numbers and ISRC's, and those are subchannel data on audio cd's, so what's the difference?

FLAC Metadata Problems with Foobar2000

Reply #5
I have done some experimentation and Foobar's support for FLAC metadata seems "less than consistent".

My goal is to have:

1. Complete CUESHEET data in <CUESHEET> block
2. Unfortunately, complete CUESHEET data in VORBIS_COMMENT block (necessitated by lack of track titles, etc in CUESHEET block).
3. Replay-gain information

The inconsistency appears surrounding the replay-gain information.

If I encode the flac with only:
1. replay-gain OR
2. replay-gain AND <CUESHEET> block

then foobar2000 recognizes the ReplayGain and acts accordingly.

As soon as I encode it with:
1. replay-gain AND <VORBIS_COMMENT> block (regardless of CUESHEET block)

foobar2000 no longer finds the ReplayGain.

If I use foobar2000 to add the ReplayGain, then it duplicates the information by:
1. Rewriting the <VORBIS_COMMENT> block (CUESHEET section) to have album gain and track gain there AND
2. Adds separate <VORBIS_COMMENT> comments for the ReplayGain.


I find this inconsistency quite unfortunate, and I would like to avoid the duplication of data.  Since I have FLAC images, I really have no need for the per-track ReplayGain, so I would rather not have foobar2000 mess with the CUESHEET comment within the <VORBIS_COMMENT> block.

Sorry, if the above is confusing, I could post images to clarify if need be.

FLAC Metadata Problems with Foobar2000

Reply #6
I see your point. But I thought it would be a good idea to have the cuesheet metadata block filled up with a flac-style cuesheet in case some future application or something (like you are saying). I do want to have the replaygain tags in the flac files for use in transcoding (to ogg or mp3 or whatever). I guess I'll just use the CUESHEET vorbis comment instead of the metadata block.

Sorry, i think that i propperly was a little to quick to recommend you to just skip the CUESHEET block. I understand that it's nice to have and i would defenetly also preffer to only have had to use the CUESHEET block when i was using FLAC, but since it dosen't support storing the track, album and artist metadata and since you then are forced to also add a "cuesheet" Vorbis comment, then i just skipped the CUESHEET block completely, when i used FLAC. For your RG problem, then you from now on have to instead use fb2k to RG scan your FLAC images, so that the RG info are placed as REM comments into your embedded cuesheet("cuesheet" Vorbis comment) and which then will make album and track gain available for both playback and transcoding. Btw, it takes very long to embed a cuesheet into a "cuesheet" Vorbis comment with metaflac.exe and so if you want to save some time, then you can instead use Synthetic Soul's ammended Tag.exe version with the command-line : "Tag -f "cuesheet=cuesheet.cue" *.flac".
If I encode the flac with only:
[...]
2. replay-gain AND <CUESHEET> block

then foobar2000 recognizes the ReplayGain and acts accordingly.

Oh, i actually didn't new that. Thank's for testing and sharing the info.
Quote
Since I have FLAC images, I really have no need for the per-track ReplayGain, so I would rather not have foobar2000 mess with the CUESHEET comment within the <VORBIS_COMMENT> block.

I just don't like that those "CUE_TRACK_*" tags are added with the RG information also, as the data is allready in the embedded cuesheet("cuesheet" Vorbis comment). All the RG implementations that i know always adds track gain also when scanning for album gain. Even though you mostly use album gain, then if you e.g. play your collection in shuffle mode one day, or decodes tracks to a compilation CD, then track gain could be usefull to have still. I personally don't mind that, since the RG data are added as harmless REM comments which all cuesheet parsers will just ignore and that if you select to remove the RG info, then all those REM comments are removed.

FLAC Metadata Problems with Foobar2000

Reply #7
Empyrean described the exact same problem I have been having. Like, exactly.

Anyway, if your flac files have metadata padding in them, then metaflac operations are generally instantaneous (unless you are scanning for replaygain).

I also would prefer not to have the CUESHEET vorbis comment messed with by any program, even foobar. I know it just adds REM comments, but still...

Quote
My goal is to have:

1. Complete CUESHEET data in <CUESHEET> block
2. Unfortunately, complete CUESHEET data in VORBIS_COMMENT block (necessitated by lack of track titles, etc in CUESHEET block).
3. Replay-gain information

The inconsistency appears surrounding the replay-gain information.

If I encode the flac with only:
1. replay-gain OR
2. replay-gain AND <CUESHEET> block

then foobar2000 recognizes the ReplayGain and acts accordingly.

As soon as I encode it with:
1. replay-gain AND <VORBIS_COMMENT> block (regardless of CUESHEET block)

foobar2000 no longer finds the ReplayGain.

If I use foobar2000 to add the ReplayGain, then it duplicates the information by:
1. Rewriting the <VORBIS_COMMENT> block (CUESHEET section) to have album gain and track gain there AND
2. Adds separate <VORBIS_COMMENT> comments for the ReplayGain.


I find this inconsistency quite unfortunate, and I would like to avoid the duplication of data. Since I have FLAC images, I really have no need for the per-track ReplayGain, so I would rather not have foobar2000 mess with the CUESHEET comment within the <VORBIS_COMMENT> block.


Literally, this is the exact same situation I am in. I wish there was a way to let foobar selectively parse the comments in the VORBIS_COMMENTS metadata block instead of the CUESHEET metadata block. That would solve the problem of track names. There also has to be a way to have foobar parse the replaygain tags put there by the flac encoder. I want to have my cake and eat it too.  I really don't want to run the replaygain scanner on all those flac cd images. Besides, what good is cake if you can't eat it?

FLAC Metadata Problems with Foobar2000

Reply #8
Anyway, if your flac files have metadata padding in them, then metaflac operations are generally instantaneous (unless you are scanning for replaygain).

I'm sorry, mate - you are of course absolutely right. I have just tested it out and it was completely instantaneous like you said. I thought that i remembered that metaflac.exe would take very long time to do this no matter if padding where available or not, but i had obviously remmembered wrong then.

Again, sorry about that, mate.

FLAC Metadata Problems with Foobar2000

Reply #9
Martin,

No biggie. I wasn't trying to be a jacka** or anything 

Anyway, after some more fiddling, I realized that my problem is this: When you scan for replaygain with foobar (for your flac files), not only does foobar add the replaygains as REM comments in the CUESHEET vorbis comment, but it also takes the liberty of adding/modifying some of your other tags too. Like the DISCID, DATE, etc. Then if you have it remove all the replaygain data from the files, it does that, but leaves in the other tags that it modified. I don't like that, really.

Empyrean, am I right on this?

Anyway, I guess I'll just keep doing what I've always done: While encoding flacs, have the encoder perform the replaygains, embed the cuesheet into the CUESHEET metadata block, add vorbis comments for ARTIST, DATE, ALBUM, etc., and also add a CUESHEET vorbis tag as well. Foobar won't read the replaygains, but it will read the CUESHEET vorbis comment so you'll get the track names when you play your files. Unless... if there was an automated way to insert replaygain data into cuesheets before tagging...

I'm in way over my head on this.

FLAC Metadata Problems with Foobar2000

Reply #10
Anyway, after some more fiddling, I realized that my problem is this: When you scan for replaygain with foobar (for your flac files), not only does foobar add the replaygains as REM comments in the CUESHEET vorbis comment, but it also takes the liberty of adding/modifying some of your other tags too. Like the DISCID, DATE, etc. Then if you have it remove all the replaygain data from the files, it does that, but leaves in the other tags that it modified. I don't like that, really.

Empyrean, am I right on this?


You are definitely right that foobar2000 takes the liberty of adding and modifying additional <VORBIS_COMMENT> comments with that information such as DISCID, etc.  I must admit I have not yet tried having foobar2000 remove the ReplayGain data to see the result.  I won't be able to check this until Monday at the earliest.  That said, given the inconsistency of fb2k regarding FLAC metadata that I have seen so far, I am confident that you are correct in fb2k's removal of the data.

[Edit: Verified.  fb2k add's extra data along with the ReplayGain data that is not removed when fb2k removes the ReplayGain data.]

For what it's worth, I don't like that either.  I prefer a clean solution, which does not have redundancy of data (i.e. the repetition of information in various tags, blocks.)

[Edit: Redundancy is only there if *both* methods of RG is added.  Fb2k only actually adds the RG in one location, it just moves the other RG data if it is there already.]

The ideal solution (in my mind) would be to have the <CUESHEET> metadata block also contain the track titles, as this would alleviate the difficulty seen here.  However, I do understand the author's reluctance to include such nontechnical data in that location.  From my perspective, the ISRC is a standardized piece of data (i.e. there is exactly one correct ISRC per song), where the title is not so standardized (capitalization differences, spelling errors, etc.).

Given that I would like to see fb2k have better comment search capabilities for ReplayGain data and/or a sleeker modification of the <VORBIS_COMMENT> data (not taking the liberties it does).

Anyway, I guess I'll just keep doing what I've always done: While encoding flacs, have the encoder perform the replaygains, embed the cuesheet into the CUESHEET metadata block, add vorbis comments for ARTIST, DATE, ALBUM, etc., and also add a CUESHEET vorbis tag as well. Foobar won't read the replaygains, but it will read the CUESHEET vorbis comment so you'll get the track names when you play your files. Unless... if there was an automated way to insert replaygain data into cuesheets before tagging...


I'd agree with this, however, I am not happy with leaving out the ReplayGain capability from foobar2000.  As other solutions go (I need to do some more experimentation to see what the intracacies of these are) you should realize that if you maintain a separate CUE file, you can load that into fb2k and it will pick up the track names, etc.  The CUE file generated by EAC contains this data, you just modify the CUE file to point to the FLAC file you generate instead of the original WAV produced by EAC.  Now if your FLAC file contains ReplayGain data (as per one of 'working' solutions from my above post) fb2k should pick up on this.  I am not entirely positive on that last statement, but I won't be able to check until Monday.

[Edit: *Should* but in fact, does not.]

Now, there are advantages/disadvantages to maintaining a separate CUE file.  Well, the disadvantage is maintaining a separate file.  The advantage is that if you go to reproduce the album, you must load a CUE file, and if you try to reproduce one from the <CUESHEET> block of the FLAC you will be missing that original REM data.  This means you could not write CDTEXT to the disc, for instance.  I believe if you store the entire CUESHEET as a <VORBIS_COMMENT> as we do for the fb2k hack, that you could restore the entire original CUE file via metaflac, but here again you run into that duplication of data that irks me so.

As for adding detailed ReplayGain to a CUESHEET via an automated method, I am unfamiliar with any existing tool to do this.  However, it seems relatively simple and straightforward so I believe such a tool must exist.

FLAC Metadata Problems with Foobar2000

Reply #11
I'd agree with this, however, I am not happy with leaving out the ReplayGain capability from foobar2000.  As other solutions go (I need to do some more experimentation to see what the intracacies of these are) you should realize that if you maintain a separate CUE file, you can load that into fb2k and it will pick up the track names, etc.  The CUE file generated by EAC contains this data, you just modify the CUE file to point to the FLAC file you generate instead of the original WAV produced by EAC.  Now if your FLAC file contains ReplayGain data (as per one of 'working' solutions from my above post) fb2k should pick up on this.  I am not entirely positive on that last statement, but I won't be able to check until Monday.

Now, there are advantages/disadvantages to maintaining a separate CUE file.  Well, the disadvantage is maintaining a separate file.  The advantage is that if you go to reproduce the album, you must load a CUE file, and if you try to reproduce one from the <CUESHEET> block of the FLAC you will be missing that original REM data.  This means you could not write CDTEXT to the disc, for instance.  I believe if you store the entire CUESHEET as a <VORBIS_COMMENT> as we do for the fb2k hack, that you could restore the entire original CUE file via metaflac, but here again you run into that duplication of data that irks me so.

As for adding detailed ReplayGain to a CUESHEET via an automated method, I am unfamiliar with any existing tool to do this.  However, it seems relatively simple and straightforward so I believe such a tool must exist.


I just tried the cuesheet-loading idea with foobar, and no, it doesn't pick up on the replaygain tags in the flac file. So that idea is out. But, again, if you have the REM REPLAYGAIN lines in your cuesheet, foobar will parse those.

I used to keep a seperate cuesheet for all the flac files, but I don't want to do that anymore, except for keeping a big seperate backup directory of your cuesheets. But I think each flac file should be self-contained and not need any other files to make them work.

The thing you said about the ISRC codes makes sense. I'll stop complaining about the lack of track names in the cuesheet metadata block. 

I guess a workaround for inserting replaygains could be this: Decode your flacs into wav files, then drag the accompanying cuesheets into the foobar playlist and run the replaygain scanner. Then it'll add the replaygain comments to the cuesheets but can't modify any metadata because there isn't any. But that will be a pain, and time consuming. I just don't know what to do.

FLAC Metadata Problems with Foobar2000

Reply #12
You could use REACT to get a FLAC image with embedded cuesheet and logfile and with album gain REM comments in the embedded cuesheet + lossy track files of your format of choise(if wanted of course).

Btw, Josh didn't include CD-TEXT because he dosen't feel that this data belongs into the CUESHEET metadata block, since metadata like e.g. PERFORMER and TITLE allready has a specific metadata block declared for those things i.e. the VORBIS_COMMENT metadata block and also because the complete CD-TEXT spec. is very complex and e.g. includes several different character sets and some of them are multi-byte, but not in unicode and can also e.g. contain graphics and that the TITLE/PERFORMER fields are just a small part of that spec.

FLAC Metadata Problems with Foobar2000

Reply #13
Quote from: Cartman_Sr link=msg=0 date=
I just tried the cuesheet-loading idea with foobar, and no, it doesn't pick up on the replaygain tags in the flac file. So that idea is out. But, again, if you have the REM REPLAYGAIN lines in your cuesheet, foobar will parse those.


It was a false hope I had then.  In the verification I did uncover that foobar2000 will not itself add redundant ReplayGain information, meaning, if *no* ReplayGain information is in the file before foobar2000 adds it, then it will only add it in one location.  If ReplayGain data does exist it will move the data and change the keys (uppercase to lowercase) in addition to adding the ReplayGain data in the CUESHEET <VORBIS_COMMENT>.

Quote from: Cartman_Sr link=msg=0 date=
I used to keep a seperate cuesheet for all the flac files, but I don't want to do that anymore, except for keeping a big seperate backup directory of your cuesheets. But I think each flac file should be self-contained and not need any other files to make them work.


I agree that I want the FLAC file ideally to be entirely self-contained for easier management.

Quote from: Cartman_Sr link=msg=0 date=
The thing you said about the ISRC codes makes sense. I'll stop complaining about the lack of track names in the cuesheet metadata block.

You could use REACT to get a FLAC image with embedded cuesheet and logfile and with album gain REM comments in the embedded cuesheet + lossy track files of your format of choise(if wanted of course).

Btw, Josh didn't include CD-TEXT because he dosen't feel that this data belongs into the CUESHEET metadata block, since metadata like e.g. PERFORMER and TITLE allready has a specific metadata block declared for those things i.e. the VORBIS_COMMENT metadata block and also because the complete CD-TEXT spec. is very complex and e.g. includes several different character sets and some of them are multi-byte, but not in unicode and can also e.g. contain graphics and that the TITLE/PERFORMER fields are just a small part of that spec.


That makes sense about the CD-TEXT.  <VORBIS_COMMENT> seems to be the necessary way to achieve the goal at hand.

I'll have to check out REACT if it will add the data directly to the CUESHEET automatically.

FLAC Metadata Problems with Foobar2000

Reply #14
I'll have to check out REACT if it will add the data directly to the CUESHEET automatically.

It will, but only album gain and not track gain(as wavegain.exe is used to calculate the gain and which dosen't support cuesheets and so is just run on the whole image, which then will return the album gain value) - I have used it for a year or so to do that. Btw, It dosen't embed the cuesheet into the CUESHEET metadata block by default, and only uses the VORBIS_COMMENT metadata block for storing the complete content of the cuesheet, but if needed, then that can be changed with a single extra parameter in the .cfg file. Also the lossy files are optionally ReplayGain scanned and MP3's can also optionally have their global gain fields in each MP3 frames header altered with the recommended gain change directly, just like with mp3gain.exe.

Edit: I have just come to think about if you meaned if REACT could place the RG info into the CUESHEET metadata block, and if that was what you meant, then that isn't possible with no app at all, as Josh hasen't implemented that feature into the CUESHEET metadata block spec.

FLAC Metadata Problems with Foobar2000

Reply #15
Edit: I have just come to think about if you meaned if REACT could place the RG info into the CUESHEET metadata block, and if that was what you meant, then that isn't possible with no app at all, as Josh hasen't implemented that feature into the CUESHEET metadata block spec.


You were correct the first time.  I plan to have FLAC add the CUESHEET metadata block, and then additionally store a CUESHEET <VORBIS_COMMENT> block with the ReplayGain data.

Thanks for the tip.

FLAC Metadata Problems with Foobar2000

Reply #16
Yes, I think that's what I'll do too then. Seems like a reasonable compromise and still get all your metadata in such a way that foobar will parse everything. My only problem now is, all my cd's are already ripped, so REACT can't help in terms of inserting those REM REPLAYGAIN lines into the cuesheets. I guess I could do all 700 cd's manually, but that would take forever. I could come up with a batch file or something that would print the replaygain comment lines from the flac files, which already exist, into little text files. That's easy enough. But getting those lines now inserted as comments in the cuesheets is the hard part. I have no clue how to do that.

FLAC Metadata Problems with Foobar2000

Reply #17
Yes, I think that's what I'll do too then. Seems like a reasonable compromise and still get all your metadata in such a way that foobar will parse everything. My only problem now is, all my cd's are already ripped, so REACT can't help in terms of inserting those REM REPLAYGAIN lines into the cuesheets. I guess I could do all 700 cd's manually, but that would take forever. I could come up with a batch file or something that would print the replaygain comment lines from the flac files, which already exist, into little text files. That's easy enough. But getting those lines now inserted as comments in the cuesheets is the hard part. I have no clue how to do that.


Sorry to resurrect this but I wanted to point out that this problem isn't confined to Flac. I recently ran across this problem when using Wavpack encoded files and Foobar ignored the Replaygain values.

Cartman, what did you end up doing?

FLAC Metadata Problems with Foobar2000

Reply #18
BTW the reason 'metaflac --import-cuesheet-from' takes time even with padding is that it also creates seek points for every track and index point, which currently requires the whole file to be decoded.  but now that I think about it, this could be made much faster using the existing seek capability, so I'll fix that.

Josh

FLAC Metadata Problems with Foobar2000

Reply #19
Actually --import-cuesheet-from doesn't take very long at all for me. Wierd.

Anyway I haven't actually gotten around to fully re-tagging and re-encoding all the flac files, but there are two ways for me to do it now. One is to load up all the cuesheet files in foobar then run the RG scanner and  update the file tags. That will update the cuesheets with RG lines that I can then put into the flac files as vorbis tags. Or, and this is probably what I'll do, Tangerine very kindly modified his great cuemod program to allow you to insert RG album data into cuesheets from a secondary text file, using batch files or catwalk. This is a lot faster, and I only use album gains anyway. Thanks for doing that for me Tangerine. 

FLAC Metadata Problems with Foobar2000

Reply #20
Anyway I haven't actually gotten around to fully re-tagging and re-encoding all the flac files, but there are two ways for me to do it now. One is to load up all the cuesheet files in foobar then run the RG scanner and  update the file tags. That will update the cuesheets with RG lines that I can then put into the flac files as vorbis tags. Or, and this is probably what I'll do, Tangerine very kindly modified his great cuemod program to allow you to insert RG album data into cuesheets from a secondary text file, using batch files or catwalk. This is a lot faster, and I only use album gains anyway. Thanks for doing that for me Tangerine. 


Thanks Cartman.

I don't know that I would want Foobar to write to my .cue sheets, as I have read some posts that indicate that Foobar modifies the whole cuesheet, even if just writing one little piece of data like RG values. I actually keep my .cue files read only to prevent it.

What is Catwalk? Google doesn't seem very helpful in finding anything about it.

EDIT: Nevermind; the forum search answered my question!