FLAC Conversion Fails

Ask questions and get answers on how to make Max behave.
Post Reply
bkburns
Posts: 16
Joined: Tue Jan 31, 2006 6:25 am
Location: Memphis, TN

FLAC Conversion Fails

Post by bkburns » Fri Feb 03, 2006 10:50 pm

For me, some files transcoded from FLAC lose tag information.

If I rip a CD to a FLAC using Max, and then transcode the FLAC to any other format, the tag information (Artist, Title, Year, Disk Title, Genre) is passed to the new files by Max, as expected.

However, I tried transcoding some of my existing FLAC files using Max and tag information is not always passed to the output file.

As a test, I used FLAC.EXE on a Windows sytem and transcoded a WAV to flac, and used Foobar2000 to edit the tags. I then used Max to transcode and it worked perfectly.

However, I found if I use EAC on Windows to rip a FLAC and then use Max to transcode to any other format, no tag information is put in the file. I checked the original file in Foobar2000 on the PC, and in Media Rage on my Powerbook, and the tags appear to be OK. It plays fine in Winamp with Flac support as well.

Is this happening for anyone else? If anyone wants to look at the flac that is not working, let me know and I will post it for download.

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Post by sbooth » Fri Feb 03, 2006 11:34 pm

I've realized over the past few weeks that there is no real standardization of FLAC or Vorbis tags as there is for id3. There is a little bit of information on this at http://sbooth.org/mantis/view.php?id=41.

Version 0.5.5 should be out soon which will have better support for FLAC and Vorbis metadata, as well as support for Intel Macs.

Can you provide the specific tag names from your files (using metaflac --list) for which data was lost?

bkburns
Posts: 16
Joined: Tue Jan 31, 2006 6:25 am
Location: Memphis, TN

Post by bkburns » Sat Feb 04, 2006 5:28 am

sbooth wrote:Can you provide the specific tag names from your files (using metaflac --list) for which data was lost?
I think I have found the issue: the case of the key name in the vorbis tags.

Below is metaflac output for a file where only the Artist tag carries over:
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 196
vendor string: reference libFLAC 1.1.2 20050205
comments: 7
comment[0]: ARTIST=Building 429
comment[1]: title=Glory Defined
comment[2]: album=Space in Between Us
comment[3]: date=2004
comment[4]: tracknumber=01
comment[5]: genre=Christian
comment[6]: TOTALTRACKS=12
Below is Metaflac output where everything carries over:
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 170
vendor string: reference libFLAC 1.1.2 20050205
comments: 6
comment[0]: ARTIST=Chris Rice
comment[1]: ALBUM=Short Term Memories
comment[2]: TITLE=Deep Enough to Dream
comment[3]: TRACKNUMBER=01
comment[4]: DATE=2004
comment[5]: GENRE=Christian
Below is one where nothing carries over:
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 159
vendor string: reference libFLAC 1.1.2 20050205
comments: 6
comment[0]: artist=Natalie Imbruglia
comment[1]: title=That Day
comment[2]: album=White Lilies Island
comment[3]: date=2001
comment[4]: tracknumber=01
comment[5]: genre=Pop
It appears to me that if the tag is lowercase, then it is ignored my Max or the underlying libraries. I think that uppercase is the standard, but flac.exe on Windows apparently does not convert case passed in command line parameters.

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Post by sbooth » Sat Feb 04, 2006 6:16 am

I did some digging at http://www.xiph.org/vorbis/doc/v-comment.html and discovered the following:
Content vector format

The comment vectors are structured similarly to a UNIX environment variable. That is, comment fields consist of a field name and a corresponding value and look like:

comment[0]="ARTIST=me";
comment[1]="TITLE=the sound of Vorbis";

- A case-insensitive field name that may consist of ASCII 0x20 through 0x7D, 0x3D ('=') excluded. ASCII 0x41 through 0x5A inclusive (A-Z) is to be considered equivalent to ASCII 0x61 through 0x7A inclusive (a-z).

- The field name is immediately followed by ASCII 0x3D ('='); this equals sign is used to terminate the field name.

- 0x3D is followed by the 8 bit clean UTF-8 encoded value of the field contents to the end of the field.
So Max needs to ignore case in comments. I will fix this for the next version.

bkburns
Posts: 16
Joined: Tue Jan 31, 2006 6:25 am
Location: Memphis, TN

Post by bkburns » Mon Feb 06, 2006 8:01 pm

So Max needs to ignore case in comments. I will fix this for the next version.
0.5.5 works. Thanks for the quick turnaround!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests