You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i use mutagen to modify the tags
i get files with ID3v1 and ID3v2.3 and ID3v2.4 tags
with updated ID3v1 and ID3v2.4 tags
with the original ID3v2.3 tags
i want to keep only ID3v2.4 tags
$ tageditor --no-color get -f 01.mp3.fixed.mp3 2>&1 | grep -e ID3 -e Title
- ID3v1 tag
Title new title
- ID3v2 tag (version 2.4.0)
Title new title
- ID3v2 tag (version 2.3.0)
Title old title
Warning 09:36:42 parsing file header: There is more than just one ID3v2 header at the beginning of the file.
with file.save(buf, v2_version=3) i get duplicate ID3v2.3 tags
$ tageditor --no-color get -f 01.mp3.fixed.mp3 2>&1 | grep -e ID3 -e Title
- ID3v1 tag
Title new title
- ID3v2 tag (version 2.3.0)
Title new title
- ID3v2 tag (version 2.3.0)
Title old title
Warning 09:44:08 parsing file header: There is more than just one ID3v2 header at the beginning of the file.
Warning 09:44:08 parsing TDRC frame: The frame is only supported in ID3v2.4 and newer but the tag's version is ID3v2.3.
import io
import mutagen
name = "01.mp3"
file = mutagen.File(name)
file.tags.add(mutagen.id3.TIT2(
text=f"new title",
encoding=mutagen.id3.Encoding.UTF8
))
buf = io.BytesIO()
with open(name, "rb") as f:
buf.write(f.read()) # todo chunks
name2 = name + ".fixed.mp3"
#file.save(name2) # error: no such file
file.save(buf)
# write ID3v1 and ID3v2.3 tags
# dont write ID3v2.4 tags for better compatibility
#file.save(buf, v2_version=3)
with open(name2, "wb") as f:
f.write(buf.getvalue())
print("TODO check", name2)
The text was updated successfully, but these errors were encountered:
i have mp3 files with ID3v1 and ID3v2.3 tags
when i use mutagen to modify the tags
i get files with ID3v1 and ID3v2.3 and ID3v2.4 tags
with updated ID3v1 and ID3v2.4 tags
with the original ID3v2.3 tags
i want to keep only ID3v2.4 tags
with
file.save(buf, v2_version=3)
i get duplicate ID3v2.3 tagsThe text was updated successfully, but these errors were encountered: