[gst-devel] write ogg tags
René Stadler
mail at renestadler.de
Tue Jan 2 19:40:15 CET 2007
Am Dienstag, den 02.01.2007, 18:08 +0100 schrieb Andreas Volz:
> Am Mon, 01 Jan 2007 23:52:43 +0000 schrieb Tim Müller:
>
> > On Mon, 2007-01-01 at 22:14 +0100, Andreas Volz wrote:
> >
> > > Yes, this really helps. I write the tags only while encoding. Do you
> > > know a player that shows really *all* Vorbis tags? Most player show
> > > only some tags. But I need to display some uncommon tags like e.g.
> > > location. Is my only choose to write my own little player?
> >
> > Not sure I understand what you're really after, but
> >
> > gst-launch-0.10 -t playbin uri=file:///home/andreas/foo.ogg
> >
> > should show _all_ vorbis tags in one way or another (at least with the
> > latest released gstreamer + gst-plugins-base versions). Tags for which
> > there are no explicit GStreamer tags should then show up as
> > GST_TAG_EXTENDED_COMMENT (which is basically a key=value string tag).
> > There's a utility function in libgsttag (part of the gst-plugins-base
> > libs) to parse those as well.
>
> Yes, this is good enough. I don't need a complete player. It was only
> to control that all tags are correct written. But not all tags are
> printed. GST_TAG_LOCATION wasn't printed by the above command. See here
> the source:
>
> gst_tag_setter_add_tags (tagsetter,
> GST_TAG_MERGE_REPLACE_ALL,
> GST_TAG_TITLE, "Geo Tagged Voice",
> GST_TAG_ARTIST, "GPSTrigger",
> GST_TAG_LOCATION, "GPS 123456790",
> GST_TAG_VERSION, "0.1",
> GST_TAG_LICENSE, "Creative Commons
> Attribution-ShareAlike 2.5", NULL);
Try changing GST_TAG_LOCATION to GST_TAG_EXTENDED_COMMENT and "GPS
123456790" to "location=GPS 123456790" (see below).
> result:
> > gst-launch-0.10 -t playbin uri=file://sound.ogg
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> KENNZEICHEN GEFUNDEN: Von Element »vorbisdec1« gefunden.
> Titel: Geo Tagged Voice
> Künstler: GPSTrigger
> Version: 0.1
> Lizenz: Creative Commons Attribution-ShareAlike 2.5
> Codierer: Xiph.Org libVorbis I 20050304
> Version des Codierers: 0
> Audio-Codec: Vorbis
> Normale Bitrate: 80000
> Bitrate: 80000
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: audioclock1
> Got EOS from element "playbin0".
> Execution ended after 1322854000 ns.
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> FREEING pipeline ...
>
> So there's GST_TAG_LOCATION. Where is it?
>
> BTW: I need this to tag voices with geographic information.
A quick peek at gst-plugins-base/gst-libs/gst/tag/gstvorbistag.c shows
that GST_TAG_LOCATION is not supported. Does the vorbis spec dictate
how geo locations are to be stored? Are there programs that do it? If
not, what you try to do is a non-standard extension. You need to store
your data with GST_TAG_EXTENDED_COMMENT in this case, which works nicely
since vorbis allows for arbitrary key=value pairs.
The real problem is that since vorbisenc does not know how to store
GST_TAG_LOCATION tags, it silently discards them. This is how all gst
tag writers handle unknown meta data, and it sucks because there is no
way to detect what a tag setter supports and what not. I opened a bug
about that a while ago, you can add yourself to CC there to be notified
when there is any progress in that direction:
http://bugzilla.gnome.org/show_bug.cgi?id=345352
> Another question:
>
> All string fields are gchar. But what's about other languages like
> chinese or cyrillic? I assume this field is unicode. But UTF8? UTF16?
> Little Endian? Big Endian? I know the situation for MP3 because I read
> the spec some time ago. But how is it for vorbis?
It should be UTF-8, by default glib convention.
> regards
> Andreas
--
Regards,
René Stadler
More information about the gstreamer-devel
mailing list