Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Python - Get Id3 From MP3 File

DZone's Guide to

Python - Get Id3 From MP3 File

·
Free Resource
// Cattura i tag id3 da un file MP3


def getID3(filename):
    fp = open(filename, 'r')
    fp.seek(-128, 2)

    fp.read(3) # TAG iniziale
    title   = fp.read(30)
    artist  = fp.read(30)
    album   = fp.read(30)
    anno    = fp.read(4)
    comment = fp.read(28)

    fp.close()

    return {'title':title, 'artist':artist, 'album':album, 'anno':anno}
Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}