Created
August 11, 2013 04:09
-
-
Save yPhil-gh/6203346 to your computer and use it in GitHub Desktop.
Use GST discoverer to expose audio file tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygtk | |
import gobject | |
gobject.threads_init() | |
import pygst | |
import gst | |
from gst.extend import discoverer | |
import gst.pbutils | |
f = "/home/px/.kituu/scripts/beatnitpycker/Azer0-400-01-Flying_Dutchman.ogg" | |
newitem = gst.pbutils.Discoverer(50000000000) | |
info = newitem.discover_uri("file://" + f) | |
tags = info.get_tags() | |
for tag_name in tags.keys(): | |
print tag_name, ' = ', tags[tag_name] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment