Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: lewashby on July 25, 2014, 03:10:37 PM

Title: .flac metadata
Post by: lewashby on July 25, 2014, 03:10:37 PM
I don't know if this is a good forum for this or not but it looked kinda close. I'm writing a program to return the artist and album of .mp3, .ogg, .flac, & maybe .wav. I finished the mp3 portion of the program but I'm stuck on .flac files because I can't seem to find a file standard for ending metadata tags in .flac files.

Here are the different strings I get returned to me using different .flac files.

b'artist=dashboard confessional*\x00\x00\x00ge'

b'artist=mad season#\x00\x00\x00album=above (d'

b'artist=weezer\x16\x00\x00\x00title=my name is j'

There doesn't seem to be a consistent way of ending a tag string. The fist example ends with an * followed by hexadecimal zeros. The second example ends with a # sign and hexadecimal zeros. The last example ends with \x16. Any idea what is going on with the standard way of ending a metadata tags in .flac files and what I could do about it? Thanks.
Title: Re: .flac metadata
Post by: saratoga on July 25, 2014, 06:04:58 PM
Do not parse the tags directly, rather you should use a library to handle this.  Either use the reference flac tag implementation, or if you want multiple formats, something like ffmpeg or this:  http://taglib.github.io/