skillfed

mutagen

read and write audio tags for many formats

mutagen v1.48.1 15.0M downloads/30d#1,201 on PyPI1,946
Copyleft license GPL-2.0-or-later Active released

What it is and what it does

Mutagen is a Python library for reading and writing metadata tags in audio files. It abstracts the complexity of different audio formats—MP3, FLAC, Ogg Vorbis, MP4, WavPack, and many others—behind a unified interface, so you can edit ID3v2 and APEv2 tags without needing to understand each format's internal structure. It also supports lower-level operations like reading Xing headers for accurate MP3 bitrate calculation and manipulating Ogg streams at the packet level.

The library has no external dependencies beyond Python's standard library and requires Python 3.10+. It runs on CPython and PyPy across Linux, Windows, and macOS. With active maintenance, it is a mature, widely-used choice for audio metadata tasks in both standalone scripts and larger applications.

Use it for:

  • Batch-update ID3 tags across an MP3 collection (artist, album, genre).
  • Extract and organize metadata from FLAC or Ogg files for music library management.
  • Build a music tagger or metadata editor GUI that supports multiple audio formats.
  • Programmatically read MP3 bitrate and length from Xing headers for audio analysis.
  • Migrate or standardize tags between different audio formats in a conversion pipeline.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Mutagen reads and writes audio metadata (tags) across many audio formats including MP3, FLAC, OGG, MP4, WavPack, and others, supporting ID3v2 and APEv2 tag editing.

Yes. Mutagen is a mature, actively maintained library with no external dependencies, low install friction, and broad format support. The GPL-2.0-or-later license is a clear constraint for proprietary use, but poses no barrier for open-source projects. Install it if you need to read or edit audio tags programmatically.

Install

mutagen on PyPI

pip

pip install mutagen

uv

uv add mutagen

poetry

poetry add mutagen

Installing mutagen

Before you install

Low friction: pure Python wheel with no runtime dependencies outside the standard library. Active maintenance with a recent release 50 days ago.

License in practice

GPL-2.0-or-later (copyleft): any derivative work or distribution must be licensed under GPL v2 or later. Suitable for open-source projects; proprietary software must either avoid linking or obtain a commercial license.

Quickstart

pip install mutagen

from mutagen.id3 import ID3
tags = ID3('song.mp3')
tags['TIT2'].text = ['New Title']
tags.save()

Requires Python 3.10 or later (CPython or PyPy).

Verify before relying

  • Whether the package's Xing header bitrate calculation is accurate enough for production audio analysis workflows.
  • Performance characteristics when handling large batches of audio files or very large metadata structures.

Package facts

License GPL-2.0-or-later (copyleft)
Python support supports the current Python release (<4,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 50 days since the last release
Last repo commit
First released
Downloads 15,032,857/month — #1,201 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mutagen-1.48.1-py3-none-any.whl

Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Multimedia :: Sound/Audio

Tags

audio metadata tagsmp3 id3 tag editorread write audio tagsflac ogg metadataaudio file tagging library
audio-metadataid3-tagsmusic-library

More Sound/Audio packages