[gst-devel] write ogg tags
Tim Müller
t.i.m at zen.co.uk
Mon Jan 1 19:39:57 CET 2007
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.
Cheers
-Tim
More information about the gstreamer-devel
mailing list