mediafile
A simple, cross-format library for reading and writing media file metadata.
Decision gist · record as of 2026-08-14
Yes. MediaFile is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real problem—unified audio metadata handling—with a clean API and proven track record as part of the beets project. Install it if you need to read or write audio tags programmatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel, only two runtime dependencies (filetype and mutagen), and actively maintained with a recent release.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
last release 2026-04-24 (112 days) · last repo commit 2026-06-29 · 118 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 134,358 downloads/mo, #11,478 on PyPI
Alternatives
Verify before relying
pip install mediafile
from mediafile import MediaFile
f = MediaFile("Lucy.mp3")
f.title
f.artist = "The Beatles"
f.save()- Which specific audio formats are supported beyond mp3 mentioned in the example.
- Whether plural fields (artists, composers, etc.) are available for all supported formats or only a subset.
- Performance characteristics when handling large audio files or batch operations.
What it is and what it does
MediaFile is a Python library that simplifies reading and writing metadata tags in audio files. It sits on top of Mutagen, a mature low-level tag manipulation library, and presents a unified, format-agnostic interface so you can work with tags the same way across different audio formats. Instead of learning format-specific tag APIs, you load an audio file into a MediaFile object, read or modify standard fields like title and artist, and call save() to write changes back.
The library is part of the beets project and supports Python 3.10 or later, including PyPy. It exposes both singular fields and plural fields for repeated metadata values, making it practical for music library tools, batch tagging scripts, and metadata workflows.
Use it for
- Batch update or normalize metadata across a music collection without learning format-specific tag APIs.
- Build a music library management tool that reads and modifies tags consistently across multiple audio formats.
- Extract and display audio metadata in a music player or cataloging application.
- Programmatically fix or populate missing tags in audio files.
- Migrate or convert metadata between different audio formats by reading from one and writing to another.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
MediaFile is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real problem—unified audio metadata handling—with a clean API and proven track record as part of the beets project. Install it if you need to read or write audio tags programmatically.
Install
mediafile on PyPI
Before you install
Low friction: pure Python wheel, only two runtime dependencies (filetype and mutagen), and actively maintained with a recent release.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install mediafile
from mediafile import MediaFile
f = MediaFile("Lucy.mp3")
f.title
f.artist = "The Beatles"
f.save()
Verify before relying
- Which specific audio formats are supported beyond mp3 mentioned in the example.
- Whether plural fields (artists, composers, etc.) are available for all supported formats or only a subset.
- Performance characteristics when handling large audio files or batch operations.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesfiletypemutagen |
| Maintenance | Actively maintained 112 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 134,358 / month, #11,478 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: PyPyTopic :: Multimedia :: Sound/Audio |
Evidence: mediafile-0.17.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “audio file metadata library”
- mediafileMediaFile reads and writes metadata tags across many audio file…
- tinytagReads metadata (artist, title, duration, bitrate, and more) from…
- mutagenMutagen reads and writes audio metadata (tags) across many audio…
Give your agent the search over MCP, or paste the wish link into any chat.
More Sound/Audio packages
Reads and writes audio files in formats like WAV, FLAC, OGG, and MAT through libsndfile, exposing audio data as NumPy arrays.
Pydub provides a high-level Python interface for loading, manipulating, and exporting audio files with simple operations like slicing, concatenation, and format conversion.
However, the abandoned status since 2021-03-10 means no future fixes or compatibility updates—use it only if you can tolerate potential issues with newer Python…
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.
Install it if you need to read or edit audio tags programmatically.
Provides PyTorch-based audio processing, transforms, and dataloaders for machine learning tasks, with GPU acceleration and autograd support for trainable audio features.
MoviePy is a Python library for video editing that reads, processes, and writes video and audio files by converting them to numpy arrays for frame-level manipulation and effect application.
Reads metadata (artist, title, duration, bitrate, and more) from audio files in formats including MP3, MP4, FLAC, OGG, WAV, and others, without writing or modifying tags.
Install it if you need to extract metadata from audio files without the overhead of a heavier library.
See also audiofile · eyeD3 · musicbrainzngs · aubio · playsound · miniaudio