HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: Dirge on 2007-01-30 22:26:19

Title: FLAC encoding and Tagging
Post by: Dirge on 2007-01-30 22:26:19
I have ripped my music to CD images with cue sheets, but none of the cue or title information was embedded in the FLACs when they were encoded.

I followed the guide to the FLAC frontend but wonder if I am doing something wrong. What do I need to enter in the Tag configuration screen to add track titles etc.
Title: FLAC encoding and Tagging
Post by: SamHain86 on 2007-01-30 23:56:03
I was just tinkering with FLAC. While unsuccessful in actually storing the CUE sheet data, it did add tracks to the FLAC album. You have probably done this: check the Cuesheet check box in the Frontend and put the path to the CUE sheet of your album. Make sure you check add tags and in the config put the relavent information for the album. I opened the FLAC in FooBar2000 to get the information then. You will probably have to look at the actual FLAC encoder EXE in a CMD window. Wish I could be more help.

Edit: If you are willing to use FB2K to rip your album, it will properly embed the CUE into your FLAC album.
Title: FLAC encoding and Tagging
Post by: Martin H on 2007-01-31 00:29:20
Hi Dirge

The FLAC format supports embedded cuesheet's natively, in contrary to all other lossless codecs. This method involves parsing the cuesheet and storing the relevant info into the CUESHEET metadata block. The FLAC format also supports storing the content of the cuesheet into a CUESHEET tag field in the VORBIS_COMMENT metadata block, which is the method the other lossless codecs use for "embedding" the cuesheet(except they don't use the VORBIS_COMMENT metadata block, but instead their own native tagging format). When you use the native way of embedding the cuesheet, then the metadata of the cuesheet is not stored in the CUESHEET metadata block, as this info dosen't really belong there, but rather into the metadata block which is meant for that purpose i.e. the VORBIS_COMMENT metadata block. If you want to have the metadata from the cuesheet stored also, then besides embedding the cuesheet into the CUESHEET metadata block, then you can also(or only, you decide that ) store the content of the cuesheet into a CUESHEET tag field in the VORBIS_COMMENT metadata block, which then apps like foobar2000 also will recognice and use for displaying the metadata.

If you want to store the content of the cuesheet into a CUESHEET tag in the VORBIS_COMMENT metadata block, then you can use metaflac.exe with it's "--set-tag-from-file=FIELD" switch :

metaflac.exe --set-tag-from-file="CUESHEET=image.cue" Somefile.flac

(Replace "image.cue" with the name and path of your cuesheet)
Title: FLAC encoding and Tagging
Post by: SamHain86 on 2007-01-31 04:46:40
Martin, I am interested in embedding my CUEs into my albums.

I first used FLAC Frontend and was able to embed the positions of the tracks but not the actual track data (title, artist, year, genre, etc). I then used the actual command line encoder, testing both --cuesheet=FILE and --tag-from-file="CUESHEET=FILE"; neither worked properly (--cuesheet=FILE did produce the same track data as the Frontend with no specific track data).

What am I doing wrong with the command line tool?
Title: FLAC encoding and Tagging
Post by: collector on 2007-01-31 11:04:44
I first used FLAC Frontend and was able to embed the positions of the tracks but not the actual track data (title, artist, year, genre, etc).

You could use the tag config button in the FLAC Frontend to tag the tracks
Title: FLAC encoding and Tagging
Post by: SamHain86 on 2007-01-31 14:24:05
You could use the tag config button in the FLAC Frontend to tag the tracks

Now it's added album artist, album title, genre and year---things already found in the CUE but I had to manually add into the Frontend's tag congif editor. It didn't put the important track name or track artist. The CUE has the track title and track artist information, but I am unable to make FLAC load the data from the CUE.


Edit: I don't like the frustrated smiley as much as I thought.
Title: FLAC encoding and Tagging
Post by: Martin H on 2007-01-31 14:57:41
I then used the actual command line encoder, testing both --cuesheet=FILE and --tag-from-file="CUESHEET=FILE"; neither worked properly (--cuesheet=FILE did produce the same track data as the Frontend with no specific track data).

What am I doing wrong with the command line tool?
Hi SamHain86

Both of the flac.exe switches "--cuesheet" and "--set-tag-from-file" works perfectly, but they are used for different things. If you use foobar2000, then you maybe need to rightclick and select "Tagging/Reload info from files" ?

If you use the "--cuesheet" switch, then the cuesheet is embedded without the metadata. If you use the "--set-tag-from-file" switch, then the metadata is also preserved.

If you have a FLAC file which you want to embed/store a cuesheet into, then you can use metaflac.exe with the switches "--import-cuesheet-from=FILE"(no metadata) and "--set-tag-from-file=FIELD"(with metadata).

Edit: Confused a metaflac.exe switch for being a flac.exe one. Of course it should be "--tag-from-file" instead of "--set-tag-from-file".  Thanks drbeachboy
Title: FLAC encoding and Tagging
Post by: drbeachboy on 2007-01-31 15:24:49
If you are using FLAC.exe to embed the cuesheet, as opposed to Metaflac.exe, then you need to use "--tag-from-file=FIELD".

"--set-tag-from-file=FIELD" is only for Metaflac.exe

I hope this helps!
Title: FLAC encoding and Tagging
Post by: Martin H on 2007-01-31 15:36:26
If you are using FLAC.exe to embed the cuesheet, as opposed to Metaflac.exe, then you need to use "--tag-from-file=FIELD".

"--set-tag-from-file=FIELD" is only for Metaflac.exe

Thank you very much for the correction. I must be some kind of moron

@SamHain86

Please accept my aplogy for posting wrong info to you
Title: FLAC encoding and Tagging
Post by: SamHain86 on 2007-01-31 23:01:32
No apology necessary for trying to help me out Martin H. Thanks a million Martin, DrBeachBoy, & Collector, thanks a million for all your help. I used metaflac and it did SUCCESSFULLY import the CUE into the FLAC file, but it took a considerable amount of time (quite longer than the actual encoding time).

One last question: is there a way to make Flac do it when it encodes from the WAV? Command line programs are not completely alien to me since I got my start using LAME, FLAC, and MAC (Monkey's Audio Codec encoder) last year. I tried all possible combinations of Flac commands that looked like they would import the CUE into the encoding FLAC, and none of them put the track data in, only the track points.
Title: FLAC encoding and Tagging
Post by: Dirge on 2007-02-01 00:18:36
I was just tinkering with FLAC. While unsuccessful in actually storing the CUE sheet data, it did add tracks to the FLAC album. You have probably done this: check the Cuesheet check box in the Frontend and put the path to the CUE sheet of your album. Make sure you check add tags and in the config put the relavent information for the album.


Hi guys thanks for the replies, you will have to bear with me as I am a FLAC newbie.

SamHain86 I have tried the exact prescription you have outlined above. The problem I see with my CD images (I am not ripping individual tracks) is FLAC appends an incorrect Artist Name and Track Title when encoding.

(http://img185.imageshack.us/img185/3566/tagsdk0.png) (http://imageshack.us)

Checking a songs properties in Foobar shows FLAC doesn't seem to be applying the information from my .cue file correctly. Is this because I am using CD images rather than separate tracks?
Title: FLAC encoding and Tagging
Post by: SamHain86 on 2007-02-01 00:56:26
These guys just helped me with it. I was unsuccessful in using flac to add the CUE to my FLAC album (and I understood that you want one FLAC with the CUE). I tried using flac -# --cuesheet=image.cue image.wav and flac -# --tag-from-file="CUESHEET=image.cue" image.wav . Neither worked, however, you can use the metaflac.exe to convert. Here is the format for using metaflac: metaflac --import-cuesheet-from=image.cue image.flac . This assumes that you have used flac to create a FLAC from your WAV. This is the only way I have made it work.
Title: FLAC encoding and Tagging
Post by: Martin H on 2007-02-01 01:50:03
No apology necessary for trying to help me out Martin H. Thanks a million Martin, DrBeachBoy, & Collector, thanks a million for all your help.

Thank's mate
Quote
is there a way to make Flac do it when it encodes from the WAV?

Yes, there is  I don't know if it has changed, but about a year ago i tried embedding a cuesheet into a FLAC file by using both methods i.e. what you will get when using both the "--cuesheet" and "--tag-from-file" switches of flac.exe and when using both of them, then fb2k would only show the content of the CUESHEET metadata block, which means no metadata available(i.e. "--cuesheet"). If that's not the case, then make sure that you've got the path to the cuesheet right and in double quotes if there's spaces in the file name. Also, you maybe need to select "Tagging/Reload-info from files" from the right-click menu(context menu), if you are embedding a cuesheet to a file that's allready loaded into a playlist in fb2k. I personally only use the flac.exe switch "--tag-from-file" to "embed" the cuesheet, as the apps i use supports this method perfectly, and as i need the metadata(i.e. fb2k and Burrrn).

I personally use :
Code: [Select]
flac.exe --tag-from-file="CUESHEET=PathToCue" --tag-from-file="EACLOG=PathToLog" Somefile.wav

If you want both ways of embedding/storing the cuesheet(and EAC log) :
Code: [Select]
flac.exe --cuesheet="PathToCue" --tag-from-file="CUESHEET=PathToCue" --tag-from-file="EACLOG=PathToLog" Somefile.wav


Note: If you use the command-line from within EAC, then you can't embed the EAC log, and so you need to remove that part of the command-line, because it isn't generated before you press OK in the dialog that EAC outputs after the ripping is completed(i use the REACT EAC plugin to overcome this).

To make sure that the cuesheet has been embedded/stored correctly, then use :

metaflac.exe --list Somefile.flac

And check if their is a VORBIS_COMMENT metadata block, with a tag called CUESHEET in it, which holds the content of the cuesheet(if you use "--tag-from-file"), or a CUESHEET metadata block with the info of the cuesheet in it, except the metadata(if you use "--cuesheet"), or both metadata blocks if you use both the flac.exe switches "--cuesheet" and "--tag-from-file".

CU, Martin.