Help - Search - Members - Calendar
Full Version: fLaC tag question
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
sn0wman
does it always appear as firsth field after flac id ? if not, should it be definetly reported as error or should i search for it through the rest of blocks ?

[EDIT]
end, how about the other blocks ? is VORBIS_COMMENT always after STREAMINFO ? SEEKTABLE ?
another thing i would love to know is, if blocks APPLICATION and CUESHEET are editable.
thanks in advance for reply smile.gif
soiaf
QUOTE(sn0wman @ Sep 4 2005, 12:21 PM)
does it always appear as firsth field after flac id ? if not, should it be definetly reported as error or should i search for it through the rest of blocks ?

[EDIT]
end, how about the other blocks ? is VORBIS_COMMENT always after STREAMINFO ? SEEKTABLE ?
another thing i would love to know is, if blocks APPLICATION and CUESHEET are editable.
thanks in advance for reply smile.gif
*



The STREAMINFO block is the (mandatory) first block after the flac id, so yes it would be an error if it wasn't the first.
I think after the STREAMINFO block the other blocks could appear in any order.
sn0wman
i have just checked it with foobar, and it plays the track as well, no errors, no problem. but is that just foobar 'protection', or this comes from the top - fLaC developers ?
jcoalson
for file storage, each native FLAC stream must contain exactly one STREAMINFO block and it must be the first. the rest can come in any order.

in Ogg FLAC the VORBIS_COMMENT is also required and must be second. see http://flac.sourceforge.net/ogg_mapping.html

all metadata blocks are editable via the metadata API. metaflac currently can remove/add whole blocks and also edit STREAMINFO, SEEKTABLE, and VORBIS_COMMENT contents.

Josh

p.s. your app can be as lenient as it wants for reading FLAC files, but to be compliant it should write only legal files.
sn0wman
thanks for the details about the blocks order. however, i meant something different when i asked about editing some of them. i need to divide the metadata blocks into two groups. one of them can be edited without any loss and damage to the file (something that can be compared to the tags), and the second that is crucial, unmovable and/or uneditable. at the moment i see this as following:

uneditable:
STREAMINFO
(SEEKTABLE - only if file can be played without it, and more, if it can be recomputed (restored) after deleting, which makes such deletion lossless, still dunno that)
VORBIS_COMMENT vendor string (can be removed only with whole block)

editable:
PADDING (after each VORBIS_COMMENT change, changes)
APPLICATION (?)
VORBIS_COMMENT
CUESHEET (?)
(SEEKTABLE ?)

(of course, i am talking about corect editing, full block removing or changing its content and declared size)

can you help me, jcoalson, and say if the lists above are corect ?



jcoalson
correct except SEEKTABLE. files can be played/seeked without it, and it can be regenerated later, e.g. with metaflac --add-seekpoint

Josh
sn0wman
QUOTE(jcoalson @ Sep 6 2005, 06:34 PM)
correct except SEEKTABLE.  files can be played/seeked without it, and it can be regenerated later, e.g. with metaflac --add-seekpoint

Josh
*



great, thank you smile.gif !
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.