Questions tagged [mutagen]

Mutagen is a Python module to handle audio metadata.

Mutagen is a Python module to handle audio metadata.

It supports ASF, FLAC, M4A, Monkey's Audio, MP3, Musepack, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, WavPack and OptimFROG audio files.

All versions of ID3v2 are supported (for reading), and all standard ID3v2.4 frames are parsed. It can only write ID3v2.4 (and ID3v1.1) so it is not compatible with libid3 nor Windows Media Player (which still require ID3V2.3 as of 2013). It can read Xing headers to accurately calculate the bitrate and length of MP3s. ID3 and APEv2 tags can be edited regardless of audio format. It can also manipulate Ogg streams on an individual packet/page level.

Home Page: http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen

146 questions
2
votes
1 answer

De-mojibaking with Python and mutagen

I'm reading mojibaked ID3 tags with mutagen. My goal is to fix the mojibake while learning about encodings and Python's handling thereof. The file I'm working with has an ID3v2 tag, and I'm looking at its album (TALB) frame, which is, according to…
Dmitry Minkovsky
  • 36,185
  • 26
  • 116
  • 160
2
votes
1 answer

How can I use mutagen.py to clear mp3 metadata?

I'd like to clear all metadata in an MP3 file, and I'm already using Mutagen in my project. Is there a way I could simply clear all the metadata from the file?
JoshWillik
  • 2,624
  • 21
  • 38
1
vote
1 answer

Bootstrap failed: 134: Service cannot load in requested session (macOs Ventura 13.0)

Trying to run this command sudo launchctl bootstrap user/501 ~/Library/LaunchAgents/io.mutagen.mutagen.plist and getting this error /Users/simanta/Library/LaunchAgents/io.mutagen.mutagen.plist: Service cannot load in requested session Bootstrap…
psimanta
  • 46
  • 4
1
vote
0 answers

Using Mutagen ID3 Tags to Update Cover Art in Spotify's Local Files

I was building my first project that edited the metadata of an mp3 file so that the upload process to Spotify's local files can be a lot easier. Using the mutagen python library, my program edits the TIT2 (song name), TPE1 (artist name), and APIC…
Bob Bob
  • 11
  • 2
1
vote
1 answer

How to add SYLT tags to a mp3 file?

I want to add synchronized lyrics to songs in mp3 format. I am using the mutagen module for doing so. While i can add unsynchronized lyrics without any problem, I can't seem to get SYLT working. Here is the code aud =…
Ram
  • 26
  • 3
1
vote
1 answer

A way to edit the metadata of WAV files in Python

Is there a way or library to add/ edit metadata of a WAV file in Python? I have tried to use the Mutagen library but it doesn't seem to work well with WAV files and other libraries (tinytag for exp.) only seem to allow you to access the metadata but…
wroex24
  • 33
  • 7
1
vote
2 answers

mutagen and id3 tags - character encoding confusion

I've run into a problem when reading some id3 tags with Icelandic letters. A quick example from the shell. >>> audio = mutagen.easyid3.EasyID3('./Björk/Albums/1990 - Gling-Gló [mp3-231]/01 - Gling-Gló.mp3') >>> audio['title'] 5:…
Steinthor.palsson
  • 6,286
  • 13
  • 44
  • 51
1
vote
1 answer

Rewrite docker-compose.yml to mutagen-compose usage

I'm really newbie in Docker and Mutagen and it doesn't clear for me how to describe storages properly. So I ask you to give me some help with it. I'm trying to rewrite docker-compose.yml to work with mutagen-compose. This is original docker-compose…
RomanKovalev
  • 852
  • 3
  • 10
  • 29
1
vote
2 answers

get lenght of mp3 in a folder using mutagen

I made this code to get the duration of all the mp3 files in a folder, but it gives me an error: import os from mutagen.mp3 import MP3 path = "D:/FILE/P. F. Ford - A Body on the Beach/" filenames = next(os.walk(path, topdown=True)) for filename in…
Rose
  • 65
  • 1
  • 1
  • 7
1
vote
1 answer

Mutagen: How can I "correctly" embed album art into mp3 file so that I can see the pitcure display as file icon

I am trying to convert flac files to mp3 format, using pydub for conversion and mutagen for tags and album art copy. Convert a flac file to a 320Kbps mp3: from pydub import AudioSegment path_flac = 'mc_test/from/01 Lapislazuli.flac' path_mp3 =…
Chunpin
  • 57
  • 8
1
vote
0 answers

Configure Mutagen to sync host files with a container, inside Kubernetes?

How should Mutagen be configured, to synchronise local-host source code files with a Docker volume, onto a Kubernetes cluster? I used to mount my project directory onto a container, using hostPath: kind: Deployment spec: volumes: - name:…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
1
vote
1 answer

Python-audiodiff installation

trying to install audio diff for python 3.0 in visual studio code but getting an error message stating no matching distribution found for mutagen==1.21. I tried installing mutagen 1.21 got installed but still not able to install audiodiff.
ANOOP MP
  • 11
  • 1
1
vote
1 answer

Python Mutagen tag KeyError, how to pass when tag does not exists

In Mutagen i read tags form an audiofile but when the tag don't exist, i get an error of course. audio = ID3(musicfile) print(audio['TXXX:SERIES'].text[0]) KeyError: 'TXXX:SERIES' how to move on if tag don't exist? i have tried: if…
Cristina
  • 35
  • 6
1
vote
1 answer

Mutagen.io does not sync beta -> alpha on OSX

I'm having a problem when trying to sync beta => alpha using mutagen on OSX When a file is created on beta (Docker container) it won't get synchronized into alpha (host) resulting in error: public/asd.txt: unable to create file: unable to set staged…
Mateusz Wu
  • 23
  • 2
  • 5
1
vote
1 answer

mutagen monitor Status: [Problems] Watching for changes

We've just started using Mutagen with docker for our projects and on the current project I'm working on I get the following error when I run mutagen monitor. Status: [Problems] Watching for changes It's not causing any issues as far as I can…
Holly
  • 7,462
  • 23
  • 86
  • 140