https://github.com/thebigmunch/audio-metadata
A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
https://github.com/thebigmunch/audio-metadata
audio audio-metadata flac id3 id3v1 id3v2 m4a metadata mp3 mp4 ogg ogg-opus ogg-vorbis opus python vorbis vorbis-comment vorbis-comments wav wave
Last synced: 5 months ago
JSON representation
A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
- Host: GitHub
- URL: https://github.com/thebigmunch/audio-metadata
- Owner: thebigmunch
- License: mit
- Created: 2018-10-19T15:59:00.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2022-12-29T01:32:25.000Z (over 3 years ago)
- Last Synced: 2025-09-27T06:17:04.297Z (9 months ago)
- Topics: audio, audio-metadata, flac, id3, id3v1, id3v2, m4a, metadata, mp3, mp4, ogg, ogg-opus, ogg-vorbis, opus, python, vorbis, vorbis-comment, vorbis-comments, wav, wave
- Language: Python
- Homepage: https://forum.thebigmunch.me
- Size: 715 KB
- Stars: 59
- Watchers: 5
- Forks: 11
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# audio-metadata
[](https://pypi.org/project/audio-metadata/)

[](https://github.com/thebigmunch/audio-metadata/actions?query=workflow%3ACI)
[](https://codecov.io/gh/thebigmunch/audio-metadata)
[](https://audio-metadata.readthedocs.io/en/stable/)
[](https://audio-metadata.readthedocs.io/en/latest/)
[audio-metadata](https://github.com/thebigmunch/audio-metadata) is a library for reading and, in the future, writing audio metadata.
### Why another audio metadata library? / Why not just use mutagen et al?
Clean and understandable code, nice API, and good UX (user experience) are the focal points of audio-metadata.
One or more of these things I feel are lacking from already existing alternatives
enough to want to write something from scratch with them in mind.
Also, there are certain features not present in other solutions that would be prohibitively painful to add.
### So, why should I use it?
Features and functionality that set it apart:
* Uses the Python standard load(s)/dump(s) API.
* Can load filepaths, os.PathLike objects, file-like objects, and bytes-like objects.
* Metadata objects look like a dict **and** act like a dict.
* Some common libraries shadow the representation of a dict
and/or dict methods but do not behave like a dict.
* Supports attribute-style access that can be mixed with dict key-subscription.
* All metadata objects have user-friendly representations.
* This includes *humanized* representations of certain values
like filesize, bitrate, duration, and sample rate.
```
>>> import audio_metadata
>>> metadata = audio_metadata.load('05 - Heart of Hearts.flac')
>>> metadata
,
'streaminfo': ,
'tags': ,
})>
>>> metadata['streaminfo']
>>> metadata.streaminfo.bitrate
1022134.0362995076
>>> metadata.streaminfo['duration']
362.9066666666667
>>> metadata['streaminfo'].sample_rate
44100
```
## Installation
``pip install -U audio-metadata``
## Usage
For the release version, see the [stable docs](https://audio-metadata.readthedocs.io/en/stable/).
For the development version, see the [latest docs](https://audio-metadata.readthedocs.io/en/latest/).
The high-level API and basic usage are covered, but more advanced features/functionality need documentation.
## TODO
If you're willing to [contribute](https://github.com/thebigmunch/audio-metadata/blob/main/.github/CONTRIBUTING.md)
your time to work on [audio-metadata](https://github.com/thebigmunch/audio-metadata/), you can:
* Post in the [Development](https://forum.thebigmunch.me/c/dev/) category on the [Discourse forum](https://forum.thebigmunch.me/).
* Browse and comment on [issues](https://github.com/thebigmunch/audio-metadata/issues) or [pull requests](https://github.com/thebigmunch/audio-metadata/pulls).
* [Open an issue](https://github.com/thebigmunch/audio-metadata/issues/new) with a bug report or feature request.
* See current [projects](https://github.com/thebigmunch/audio-metadata/projects).
* Contact me by email at mail@thebigmunch.me.
## Appreciation
Showing appreciation is always welcome.
#### Thank
[](https://saythanks.io/to/thebigmunch)
Get your own thanks inbox at [SayThanks.io](https://saythanks.io/).
#### Contribute
[Contribute](https://github.com/thebigmunch/audio-metadata/blob/main/.github/CONTRIBUTING.md) by submitting bug reports, feature requests, or code.
#### Help Others/Stay Informed
[Discourse forum](https://forum.thebigmunch.me/)
#### Referrals/Donations
[](https://bit.ly/DigitalOcean-tbm-referral) [](http://bit.ly/Namecheap-tbm-referral) [](https://bit.ly/PayPal-thebigmunch)