Created a Python module for ID3 MP3 tag manipulation 
Author Message
 Created a Python module for ID3 MP3 tag manipulation

    Ben> A simple example of using the module:

    Ben> id3info = ID3('/some/file/moxy.mp3');

Of course I have to make a typo in my example. *BONK* No semicolon
there of course. I blame Perl-fingers. :)

Ben

--
Brought to you by the letters V and T and the number 19.
"I choose YOU! Pikachu!"
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.*-*-*.com/



Mon, 26 Nov 2001 03:00:00 GMT  
 Created a Python module for ID3 MP3 tag manipulation
Hey, Pythoners! Just a quick announcement that I've created a python
module for easy manipulation of ID3 tags on MP3 files.  These tags
generally involve the title, artist, and other information about the

Freshmeat, so I hope it can be of use to you all.

The home-page for the ID3.py module is at:

http://csl.cse.ucsc.edu/~ben/python/

A simple example of using the module:

from ID3 import *

try:
  id3info = ID3('/some/file/moxy.mp3');
  print id3info
  id3info.title = "Green Eggs and Ham"
  id3info.artist = "Moxy Fruvous"

except InvalidTagError, message:
  print "Invalid MP3 tag:', message

More documentation is available in the source code to the module.

Enjoy!

Ben Gertzfield

--
Brought to you by the letters K and S and the number 2.
"I don't want the world.. I just want your half."
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/



Mon, 26 Nov 2001 03:00:00 GMT  
 Created a Python module for ID3 MP3 tag manipulation

Quote:
> === from the `id3' manpage
> BUGS
>        The ID3 format has some shortcomings.  There  is  a  1  in
>        16777216  chance of your mp3 having a certain bit-pattern,
>        causing id3 to write over the last 128 bytes of  your  mp3
>        upon  tag  creation.
> This is more of a problem with the id3 `standard' than with anything
> else.  There is a small chnace that your mp3 file will contain the
> data "TAG" at just the wrong place.

The fix for this is to treat your data as an MPEG stream, not a simple
file.  If the marker appears inside the bounds of a frame, then it's
not a tag.  This does imply walking through the whole file to parse
headers, but that's a much faster operation than one might think.


Thu, 29 Nov 2001 03:00:00 GMT  
 Created a Python module for ID3 MP3 tag manipulation

Quote:

> Hey, Pythoners! Just a quick announcement that I've created a Python
> module for easy manipulation of ID3 tags on MP3 files.  These tags
> generally involve the title, artist, and other information about the

> Freshmeat, so I hope it can be of use to you all.

> The home-page for the ID3.py module is at:

> http://csl.cse.ucsc.edu/~ben/python/

A quick pendantic note here:

Just out of interest this code apperas to do the same thing as the C
program `id3' by Robert Woodcock, so his warning also applies here.

=== from the `id3' manpage
BUGS
       The ID3 format has some shortcomings.  There  is  a  1  in
       16777216  chance of your mp3 having a certain bit-pattern,
       causing id3 to write over the last 128 bytes of  your  mp3
       upon  tag  creation. Also because the ID3 format is space-
       padded, not null-padded, trailing spaces will  be  ignored
       by most players. Any bugs found in id3 should be forwarded

===

This is more of a problem with the id3 `standard' than with anything
else.  There is a small chnace that your mp3 file will contain the
data "TAG" at just the wrong place.

--
Tim Evans



Fri, 30 Nov 2001 03:00:00 GMT  
 Created a Python module for ID3 MP3 tag manipulation

    greg> The fix for this is to treat your data as an MPEG stream,
    greg> not a simple file.  If the marker appears inside the bounds
    greg> of a frame, then it's not a tag.  This does imply walking
    greg> through the whole file to parse headers, but that's a much
    greg> faster operation than one might think.

Is there a simple way to do this? What kind of scanning does it
involve?

--
Brought to you by the letters Y and P and the number 2.
"Porcoga daisuki!"
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/



Fri, 30 Nov 2001 03:00:00 GMT  
 Created a Python module for ID3 MP3 tag manipulation

{parsing MPEG audio}

Quote:
> Is there a simple way to do this? What kind of scanning does it
> involve?

Well, it's in that other P language, but here's an example:

<URL:http://members.xoom.com/meowing/programs/mpd.zip>  (About 3K)



Fri, 30 Nov 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. MP3/ID3 tags

2. Calrion and MP3 ID3 tag

3. How to modify ID3 tags in MP3 files?

4. Extension for reading mp3 ID3 tags?

5. mp3 id3 and genre

6. mp3 id3

7. Python script to rename MP3 file using it's ID3 tag.

8. ID3 Tags

9. ID3 Tags and realbasic

10. grabbing id3 tags

11. MP3 MP3 MP3

12. RB & MP3 ID3v2 Tags

 

 
Powered by phpBB® Forum Software