[gst-devel] Writing tags with gst-python

Rod Begbie rodbegbie at gmail.com
Sun May 29 23:13:03 CEST 2005

Hi there.

I'm in the middle of my first stab at using gst-python for an app I'm
trying to build for myself (a homebrew CD->Flac ripper).  However,
I've hit a bit of a brick wall with regards to setting metadata tags
on the FLAC files I'm creating.

Can someone point me in the direction of the correct way to do it? 
I've spent roughly 3 hours Googling away and prodding at the python
command line, but have come-up empty handed.  Any suggestions?

Snip of my source below.



    cdp = gst.element_factory_make("cdparanoia", "ripper")
    cdp.set_property("device", "/dev/cdroms/cdrom0")
    cdp.set_property("paranoia-mode", 255)
    track_format = gst.format_get_by_nick("track")
    src_pad = cdp.get_pad("src")

#    tags = gst.TagList()
#    tags["title"] = "Kill Yr Boyfriend"
#    tags["artist"] = "Bis"
#    tags["track-number"] = "16"
#    tags["track-count"] = "19"
#    tags["album"] = "Radio One yadadadada"
    flac = gst.element_factory_make("flacenc", "encoder")
    sink = gst.element_factory_make("filesink", "sink")
#    sink = gst.element_factory_make("osssink", "sink")
    sink.set_property("location", "/home/rod/test.flac")

    bin = gst.Pipeline()
    bin.add_many(cdp, flac, sink)
    gst.element_link_many(cdp, flac, sink)

:: Rod Begbie :: http://groovymother.com/ ::

More information about the gstreamer-devel mailing list