Comments (4)
If there are no ID3v2.x tags yet mutagen does not automatically add them. You need to do some check like:
if audio.tags is None:
audio.add_tags()
from mutagen.
Thanks, but the file already has ID3v2 tags (as shown in the example output). Adding a print(mutagen.File(filename).tags.pprint())
just before audio = ID3(filename)
produces this:
COMM==eng=This is a comment
COMM=ID3v1 Comment=eng=This is a comment
TALB=Programme Name - Series 01
TCON=Comedy
TDRC=1922
TIT2=Programme Name
TPE1=Programme Name
TPE2=Programme Name
TRCK=1
In any case, audio.tags
doesn't seem to be the right thing:
Traceback (most recent call last):
File "/Users/me/bin/retag.py", line 18, in <module>
if audio.tags is None:
AttributeError: 'ID3' object has no attribute 'tags'
from mutagen.
@unikitty37 The issue seems to be not writing the file, but the verification with the id3v2
utility, which does not support ID3v2.4. Either verify with e.g. mutagen-inspect
or another tool actually supporting v2.4 tags, or save v2.3 tags by passing v2_version=3
to the save call.
from mutagen.
I am closing this. I tried your script directly and it does save the ID3v2.4 tags. The old id3v2
utility does not support that. Saving with v2_version=3
makes it visible in that utility as well.
(BTW, shouldn't that
v2
parameter in the list bev2_version
? :)
Docs are fixed with 3cbcc1b
from mutagen.
Related Issues (20)
- Can't open wav ripped from DVD audio: Invalid Chunk - ordinal not in range(128) HOT 6
- OGG Vorbis: wrong (playback) duration / length reported on opus audio HOT 1
- "Universal" audio metadata class HOT 3
- Extensible wave format support HOT 2
- FLAC objects that compare equal do not have the same hash value
- mid3v2 not working with .opus files. HOT 4
- Unable to add artwork to `.ogg` [vorbis] file HOT 9
- Add support for Audiobooks (.m4b) tags to EasyMP4
- Help with implementing ID3v3.2 spec in dart
- Name of tag is cut off when displaying (.m4a file) HOT 1
- album metadata is not being written to when using EasyID3 HOT 4
- ffmpeg + ogg vorbis: header remain warning HOT 1
- Duration not displayed for some MPEG-4 audio files.
- Writing new ID3 tags to .aiff files HOT 5
- Can I sort by track number? HOT 1
- IOError (not enough bytes) in read_full() on WAV file with extended ID3 header HOT 4
- EasyID3 is not used for wav files
- mid3v2 produces file that mutagen can't read again HOT 1
- AcoustID Fingerprint HOT 2
- mutagen - 1.47.0 - Error with reading FLAC tags and values HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mutagen.