[gst-devel] write ogg tags

Andreas Volz lists at brachttal.net
Mon Jan 1 22:14:13 CET 2007


Am Mon, 01 Jan 2007 18:39:57 +0000 schrieb Tim Müller:

> On Mon, 2007-01-01 at 19:13 +0100, Andreas Volz wrote:
> 
> Hi Andreas,
> 
> > > how could I write tags (date,album,genre,...) into a ogg file. I
> > > found the chapter in the docs about this topic, but that doesn't
> > > help much. Could you give me some more hints or a small example?
> > 
> > Ok, this is working now. The vorbistag plugin did it. But I'm not
> > sure since which gstreamer version vorbistag is available. Does
> > someone know for which gstreamer(plugins-base) version I need to
> > scan in configure?
> 
> The vorbistag element was added in the latest gst-plugins-base
> release, 0.10.11.
> 
> The element is primarily meant to re-tag existing Ogg/Vorbis files
> without re-encoding though.
> 
> If you want to set tags at the same time as encoding an Ogg/Vorbis
> file, you can just set them on the vorbisenc element directly using
> the GstTagSetter interface, which vorbisenc implements.
> 
> For example, you can do something like:
> 
>   GDate *date;
> 
>   date = g_date_new_dmy (15, 10, 2006);
>   gst_tag_setter_add_tags (GST_TAG_SETTER (vorbisenc),
>       GST_TAG_MERGE_APPEND,
>       GST_TAG_TITLE, "A Song About Love",
>       GST_TAG_ARTIST, "T. Singer & The Unbreakables",
>       GST_TAG_ALBUM, "A Whole Album With Songs About Love",
>       GST_TAG_COMMENT, "How awesome is this!!!!",
>       GST_TAG_DATE, date,
>       GST_TAG_TRACK_NUMBER, 1,
>       GST_TAG_TRACK_COUNT, 10,
>       NULL);
>   g_date_free (date);
> 
> where vorbisenc is a GstElement from your pipeline.
> 
> Hope this helps.

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?

regards
Andreas




More information about the gstreamer-devel mailing list