GithubHelp home page GithubHelp logo

pushkardakle / id3reader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teragonaudio/id3reader

0.0 2.0 0.0 131 KB

Id3reader.py is a Python module that reads ID3 metadata tags in MP3 files. It can read ID3v1, ID3v2.2, ID3v2.3, or ID3v2.4 tags. It does not write tags at all.

License: Other

Python 100.00%

id3reader's Introduction

About Id3reader

Id3reader.py is a Python module that reads ID3 metadata tags in MP3 files. It can read ID3v1, ID3v2.2, ID3v2.3, or ID3v2.4 tags. It does not write tags at all.

Id3reader.py was originally written by Ned Batchelder. In November 2010, Nik Reiman took over maintainence of the codebase and ported it to Python 3. The original code (and last Python 2.x compatible version) can be found in the 1.53.20070415 tag. All changes after this point cannot be guaranteed to be compatible with Python 2.x.

Installation

To install Id3reader, just copy id3reader.py to your Python path.

License

Id3reader is made available under the Simplified BSD License, and offered without warranty. See the "LICENSE.txt" file for more information.

Usage

Using id3reader couldn't be simpler:

import id3reader

# Construct a reader from a file or filename.
id3r = id3reader.Reader('my_favorite.mp3')

# Ask the reader for ID3 values:
print id3r.getValue('TT2')

In addition to whatever literal ID3 tag ids are found in the file (TP1, TIT2, etc), id3reader defines five pseudo-ids for convenience:

id3r.getValue('album')
id3r.getValue('performer')
id3r.getValue('title')
id3r.getValue('track')
id3r.getValue('year')

These ids find the appropriate ID3 id for the ID3 version read from the file, so you can get at this basic data without having to consider the different versions of the ID3 spec.

If you run id3reader from the console, it will dump the ID3 information for the MP3 file named as its argument.

Coverage

The ID3 spec is quite extensive, and specifies functionality that I have never encountered in actual MP3 files. Id3reader implements as much of the spec as I have seen used. If you have files that id3reader does not properly interpret, please mail them to me. I'll extend id3reader to read them.

History

  • 5 January 2004: It wasn't reading ID3v1 tags properly, and had problems with empty string values.
  • 9 January 2004: Now it reads ID3v2.3 properly, and reads unsyncronized tags.
  • 13 January 2004: Fix unsynchronized reading, reads compressed frames, improved detection of end of frames, extended headers are read (but not interpreted), multi-string frames are interpreted, and the file is closed if we opened it.
  • 3 August 2004: Add support for genres (although they're stupid), and the command-line mode will print strings regardless of their encoding.
  • 13 September 2004: Better protection against non-character data when showing the data on the command line.
  • 6 November 2010: Now compiles under Python 3
  • 13 November 2010: Project moved to github under new maintainer; all changes after this point are listed on the project's github page.

id3reader's People

Contributors

nikreiman avatar

Watchers

James Cloos avatar Pushkar Dakle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.