Discussion:
[Flac] Flac] Where Cover Art?
Martin Leese
2011-01-20 20:44:14 UTC
Permalink
Flac files, as us knows, follows the Vorbis Tags system included in block 4
Recently Vorbis has established the possibility to include picture files by
means of 2 Tags: COVERARTMIME AND COVERART.
To work therewith is quite easy.
No. this in incorrect. The VorbisComment
"COVERART" was only ever unofficial, and
has been deprecated in favour of
"METADATA_BLOCK_PICTURE". (I have
never heard of "COVERARTMIME".) Please
see:
https://wiki.xiph.org/VorbisComment#Unofficial_COVERART_field_.28deprecated.29
However Flac stores picture files in block 6. The edition (to add and to
modify Tags and pictures simultaneously in two separate blocks) becomes a
difficult and tedious task in comparison with the easiness of Vorbis
handling .
The intention was never for the same picture
file to be included twice (once in a
VorbisComment and again in a FLAC
METADATA_BLOCK, confusingly also called
"METADATA_BLOCK_PICTURE").
I think the current situation is an error. No Tags type acts this way,
except Matroska.
Would not it be better for Flac to follow Vorbis approach, including covert
art in block 4 and to abandon the insertion of pictures in block 6?
The current situation is not in error, as such,
but is ambiguious. There clearly needs to be
some official guidance on the preferred
location for picture files in FLAC streams.
Another question. Where a Tag should be included with song lyrics?
Regards,
Martin
--
Martin J Leese
E-mail: martin.leese stanfordalumni.org
Web: http://members.tripod.com/martin_leese/
Santiago Jimeno
2011-01-21 11:04:18 UTC
Permalink
Thank you Martin for your answer.

Regarding the COVERARTMIME name, I found this entry in ExifTool:
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Vorbis.html#Comments
I suppose that it would be useful to enlarge the information of which
COVERART lacked.

To change the code to use METADATA_BLOCK_PICTURE is simple, since COVERART
also wrote in Base64. The result continues being the same handling easiness
of Vorbis Comments.

But in the FLAC case the problem continues existing. When I spoke of error,
I referred to try editing (adding or removing comments or pictures, writing
besides reading) in two different blocks at the same time. We can call it
error, ambiguous or otherwise. But, have you tried to write code to maintain
this double localization in a simultaneous way?

My code for editing Comments in Ogg has 50 lines around. In FLAC case 200
more lines are added, 5 times more. A similar situation, or maybe worse,
happens with Matroska that has separated Tags on one hand and Pictures on
the other. Pictures are in a Attachments block that is a bag for everything
that also includes fonts, text and subtitles and located in any place of the
file. The result in this case is that, in spite of its initial advantages,
it doesn't exist a program for editing Tags and I think it's for its extreme
difficulty that implies to almost modify the whole file. Only FLAC and
Matroska act this way among all Tags types existent.

Now I should add code to convert COVERTART to METADATA_BLOCK_PICTURE. For
the same work I also have code to edit Pictures in FLAC, converting the
whole content of the block 6 to the block 4. I think that to correct this
problem is simple, declaring obsolete the block 6 of FLAC in the same way
that Vorbis has made with COVERART. But as you say: "There clearly needs to
be some official guidance".

In LYRICS case, also "needs to be some official guidance." It's possibly not
very utilized, but it's used. But I cannot invent a Comment name, although
this you suggest could be the most appropriate. If somebody that works in
Vorbis Proposal reads this that takes note of the suggestion.

In any event, if we want Vorbis comments have the same success in FLAC like
in OGG, we need clear, simple and mainly effective official norms.

Regards. Santiago

----- Original Message -----
From: "Martin Leese" <martin.leese at stanfordalumni.org>
To: <flac at xiph.org>
Sent: Thursday, January 20, 2011 9:44 PM
Subject: Re: [Flac] Flac] Where Cover Art?
Post by Martin Leese
Flac files, as us knows, follows the Vorbis Tags system included in block 4
Recently Vorbis has established the possibility to include picture files by
means of 2 Tags: COVERARTMIME AND COVERART.
To work therewith is quite easy.
No. this in incorrect. The VorbisComment
"COVERART" was only ever unofficial, and
has been deprecated in favour of
"METADATA_BLOCK_PICTURE". (I have
never heard of "COVERARTMIME".) Please
https://wiki.xiph.org/VorbisComment#Unofficial_COVERART_field_.28deprecated.29
However Flac stores picture files in block 6. The edition (to add and to
modify Tags and pictures simultaneously in two separate blocks) becomes a
difficult and tedious task in comparison with the easiness of Vorbis
handling .
The intention was never for the same picture
file to be included twice (once in a
VorbisComment and again in a FLAC
METADATA_BLOCK, confusingly also called
"METADATA_BLOCK_PICTURE").
I think the current situation is an error. No Tags type acts this way,
except Matroska.
Would not it be better for Flac to follow Vorbis approach, including covert
art in block 4 and to abandon the insertion of pictures in block 6?
The current situation is not in error, as such,
but is ambiguious. There clearly needs to be
some official guidance on the preferred
location for picture files in FLAC streams.
Another question. Where a Tag should be included with song lyrics?
Regards,
Martin
--
Martin J Leese
E-mail: martin.leese stanfordalumni.org
Web: http://members.tripod.com/martin_leese/
_______________________________________________
Flac mailing list
Flac at xiph.org
http://lists.xiph.org/mailman/listinfo/flac
Santiago Jimeno
2011-01-22 14:46:17 UTC
Permalink
You said "With the exception of where to put a picture file, VorbisComments
in a Vorbis stream are the same as VorbisComments in a FLAC stream."

In METADATA_BLOCK_PICTURE case they would not be the same. Up to now we
could exchange the complete block of VorbisComments. But with the addiction
of METADATA_BLOCK_PICTURE doesn't happen this way.

In Ogg files the METADATA_BLOCK_PICTURE data are split in numerous pieces,
each one of them with a Oggs header (44 up to 282 bytes of non Base64 data
among each piece). Just as they are written would be impossible to put them
in the block 4 of Flac Metadata.

But the specifications are only for Ogg files. For Flac is not specified if
the data, after METADATA_BLOCK_PICTURE=, would be a long string of Base64
format (without split) or otherwise. It seems that the decision is of Ogg
team and Flac team has not said anything on this matter.

I thought I could choose among both forms of inserting a picture. But
thinking it well, the decision is made because of the silence of Flac. Flac
will continue using the block 6. And in METADATA_BLOCK_PICTURE case,
VorbisComments are not compatible. I continue thinking that to have two
different blocks for this is very bad design.

Regards. Santiago

----- Original Message -----
From: "Martin Leese" <martin.leese at stanfordalumni.org>
To: "Santiago Jimeno" <sjimeno at ya.com>
Sent: Friday, January 21, 2011 7:01 PM
Subject: Re: [Flac] Flac] Where Cover Art?
Post by Santiago Jimeno
Thank you Martin for your answer.
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Vorbis.html#Comments
I suppose that it would be useful to enlarge the information of which
COVERART lacked.
Hi Santiago,
As the webpage you cite states, "The tags [on
the page] are only some common tags found
in the Vorbis comments of Ogg Vorbis and
Ogg FLAC audio files". This list is not official.
I have never seen COVERARTMIME used
anywhere else and, as COVERART is going
away, I would not recommend its use.
The official list of tag names is in the Vorbis
documentation, and consists of only 15 tags.
There are also several lists of suggestions for
https://wiki.xiph.org/VorbisComment#Proposed_field_names
Post by Santiago Jimeno
To change the code to use METADATA_BLOCK_PICTURE is simple, since
COVERART
also wrote in Base64. The result continues being the same handling
easiness
of Vorbis Comments.
But in the FLAC case the problem continues existing. When I spoke of
error,
I referred to try editing (adding or removing comments or pictures,
writing
besides reading) in two different blocks at the same time. We can call it
error, ambiguous or otherwise. But, have you tried to write code to
maintain
this double localization in a simultaneous way?
As I explained, you don't put the same picture
file in two places. You put it in only one place.
You get to choose where you put it, either in
a VorbisComment or in a FLAC
METADATA_BLOCK. What is needed is some
official advice on which of these two locations
is the preferred place to put a picture.
...
Post by Santiago Jimeno
In LYRICS case, also "needs to be some official guidance." It's possibly
not
very utilized, but it's used. But I cannot invent a Comment name,
although
this you suggest could be the most appropriate. If somebody that works in
Vorbis Proposal reads this that takes note of the suggestion.
Many, many tags are used. People invent new
tag names all the time. The Xiph community
will never produce an exhaustive list. The
official list will always be a short list of
commonly used tag names. It will always be
permitted for others to invent new tag names.
Post by Santiago Jimeno
In any event, if we want Vorbis comments have the same success in FLAC
like
in OGG, we need clear, simple and mainly effective official norms.
With the exception of where to put a picture
file, VorbisComments in a Vorbis stream are
the same as VorbisComments in a FLAC
stream. They are not as widely supported by
software applications, but there isn't much the
Xiph community can do about that.
Regards,
Martin
--
Martin J Leese
E-mail: martin.leese stanfordalumni.org
Web: http://members.tripod.com/martin_leese/
Santiago Jimeno
2011-01-23 10:21:57 UTC
Permalink
OK Martin. Thank you for the explanations and for your time.

I am writing a program that reads and writes all existent Tags types. It
lacks only to end the edition (rewriting) of "Native" Flac and Matroska.
Both cases for the same problem: the separation of Tags and Picture in
different blocks. In Flac I resolved it, but now I have to add
METADATA_BLOCK_PICTURE. Reading Vorbis Comments of different file types as
binary I found they were not compatible.

I don't use in any case the libraries provided. All code is own Visual C #.
For that reason I have these problems. In Vorbis Comments case is maybe
already solved in the libraries provided, but I have to write it with my own
code and I have not found documentation until you have explained to me it.
In Matroska case, libraries doesn't exist for editing Tags.

Another question: which is the maximum size of an oggs stream? In the
sample files with covers, one has 4335 bytes (17 page_segments) and the
other one 65025 (255 page_segments). Is the size decision free? And if it's
this way, why not to put the whole comments in a stream without split?

Lastly I inform you, revising other programs, Easytag 2.1.6 (last revision
using libraries provided) uses COVERART and COVERTARTMIME tag names for
pictures, and also adds (mentioning them as not official) COVERARTTYPE and
COVERARTDESCRIPTION.

Regards. Santiago

----- Original Message -----
From: "Martin Leese" <martin.leese at stanfordalumni.org>
To: "Santiago Jimeno" <sjimeno at ya.com>
Sent: Sunday, January 23, 2011 2:25 AM
Subject: Re: [Flac] Flac] Where Cover Art?
Post by Santiago Jimeno
You said "With the exception of where to put a picture file,
VorbisComments
in a Vorbis stream are the same as VorbisComments in a FLAC stream."
In METADATA_BLOCK_PICTURE case they would not be the same. Up to now we
could exchange the complete block of VorbisComments. But with the
addiction
of METADATA_BLOCK_PICTURE doesn't happen this way.
In Ogg files the METADATA_BLOCK_PICTURE data are split in numerous
pieces,
each one of them with a Oggs header (44 up to 282 bytes of non Base64
data
among each piece). Just as they are written would be impossible to put
them
in the block 4 of Flac Metadata.
You seem to be confusing the Ogg container
with the Vorbis stream. An Ogg container can
contain many streams. When it contains a
single Vorbis stream the result is called Ogg
Vorbis. When it contains a single FLAC
stream the result is called Ogg FLAC. A FLAC
stream can also be placed in its own container,
the result being called Native FLAC.
The Ogg container chops up the streams it
contains; that is part of what it does. When
VorbisComments are part of a Vorbis stream
and placed in an Ogg container (Ogg Vorbis),
the stream is chopped up. When
VorbisComments are part of a FLAC stream
and placed in an Ogg container (Ogg FLAC),
the stream will also be chopped up. When
VorbisComments are part of a FLAC stream
and placed within its own container (Native
FLAC), the stream is not chopped up.
If you wish to extract VorbisComments from an
Ogg Vorbis file then you should use the
libraries provided. (I don't do this so cannot
give you details.)
Post by Santiago Jimeno
But the specifications are only for Ogg files. For Flac is not specified
if
the data, after METADATA_BLOCK_PICTURE=, would be a long string of Base64
format (without split) or otherwise. It seems that the decision is of Ogg
team and Flac team has not said anything on this matter.
This in incorrect. When a Vorbis stream is
extracted from the Ogg container then any
VorbisComments it contains are no longer
split.
Post by Santiago Jimeno
I thought I could choose among both forms of inserting a picture. But
thinking it well, the decision is made because of the silence of Flac.
Flac
will continue using the block 6. And in METADATA_BLOCK_PICTURE case,
VorbisComments are not compatible. I continue thinking that to have two
different blocks for this is very bad design.
As I have already explained, you can choose
to include a picture file in a FLAC stream in
either a VorbisComment or in a FLAC
METADATA_BLOCK.
Regards,
Martin
--
Martin J Leese
E-mail: martin.leese stanfordalumni.org
Web: http://members.tripod.com/martin_leese/
Loading...