Hello everybody! I'am just leaning Python and wanted to write something useful for me, an recursive masstagger for ogg-vorbis files. My script uses pyvorbis 1.3 from the Debian testing tree. so far here is my Problem: The pyvorbis bindings aren't documented. As i understand the pyvorbis package, this is a simpe 1:1 mapping to libvorbis. dir(pyvorbins-oject) gives me an refernece to an C Object. If this is correct, the only thing i need is the libvorbis documentation, but i could'nt find this eighter. Can someone provide an URL for the libvorbis docs? with best regards Christian Edelmann
On Fri, Nov 10, 2006 at 01:29:36PM +0100, Christian Edelmann wrote:> The pyvorbis bindings aren't documented. As i understand the pyvorbis > package, this is a simpe 1:1 mapping to libvorbis. > dir(pyvorbins-oject) gives me an refernece to an C Object. > If this is correct, the only thing i need is the libvorbis > documentation, but i could'nt find this eighter. > Can someone provide an URL for the libvorbis docs?There aren't any, unfortunately. You can infer the general outline by looking at the example C code included with libvorbis, or the pyvorbis examples. However, for a mass tagger you shouldn't need to use libvorbis. And unfortunately ogg.vorbis.VorbisComment doesn't provide methods to read/write packet data. You'd be better off, I think, just using pyogg and writing your own comment rewriter in pure python. The format is easy to parse, and documented here: http://www.xiph.org/vorbis/doc/v-comment.html The harder part is learning enough about Ogg to parse, edit, and rewrite a stream. http://www.xiph.org/ogg/doc/oggstream.html http://xiph.org/vorbis/doc/Vorbis_I_spec.html#vorbis-over-ogg If you want less of a challenge, you might consider using os.popen() to drive the command line vorbiscomment utility from the vorbis-tools package which will do tag rewriting for you. HTH, -r
On Friday 10 November 2006 13:29, Christian Edelmann wrote:> I'am just leaning Python and wanted to write something useful for me, an > recursive masstagger for ogg-vorbis files. > My script uses pyvorbis 1.3 from the Debian testing tree. so far here is > my Problem: > > The pyvorbis bindings aren't documented. As i understand the pyvorbis > package, this is a simpe 1:1 mapping to libvorbis. > dir(pyvorbins-oject) gives me an refernece to an C Object.Using the pyvorbis package that used to be available at http://www.andrewchatham.com/pyogg/, this works for me: import ogg.vorbis dir(ogg.vorbis) and also help(ogg.vorbis) Read the README contained in the pyvorbis package or look at the attached very simple Python script. Both should tell you how to read, change, and write comment tags. If you want to do only that, then you won't need libvorbis documentation. Marcel -------------- next part -------------- A non-text attachment was scrubbed... Name: oggtag Type: application/x-python Size: 1283 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis/attachments/20061111/88fe134a/oggtag.bin