[gst-devel] write ogg tags

Andreas Volz lists at brachttal.net
Tue Jan 2 20:22:50 CET 2007


Am Tue, 02 Jan 2007 19:40:15 +0100 schrieb René Stadler:

> >   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).

Ok, this works.

> > 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?

I read the vorbis spec and see only that vorbis defines UTF-8 for all
tags. I couldn't even see that date is formated in a special way. Is
this a gstreamer enhancement?

>  Are there programs that do it?

No, not yet. But my app will do it. Isn't that enough. :-P

> 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.

I think that key=value pairs are perfect for my needs. But I read
something else in the vorbis spec:

http://xiph.org/vorbis/doc/Vorbis_I_spec.html#vorbis-spec-comment

> 5.1. Overview
> 
> The Vorbis text comment header is the second (of three) header packets
> that begin a Vorbis bitstream. It is meant for short text comments,
> not arbitrary metadata; arbitrary metadata belongs in a separate
> logical bitstream (usually an XML stream type) that provides greater
> structure and machine parseability.

Perhaps it's an idea to store the data as XML file. The idea isn't that
stupid, because I'm able to get the geo data as XML structured data. Is
this possible with gstreamer?

This takes me to the next question:

Is it posssible (with gstreamer) to store an image in the ogg/vorbis
file as in MP3?

regards
Andreas




More information about the gstreamer-devel mailing list