quodlibet / mutagen

Python module for handling audio metadata

Home Page:https://mutagen.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mid3v2 produces file that mutagen can't read again

xeals opened this issue · comments

Encountered with at least opus and aac (m4a container) audio. Reproducible with:

$ yt-dlp --extract-audio --audio-format opus --output file.opus <any YouTube URL>
$ mid3v2 -a art -A alb -T 1 file.opus
$ mutagen-inspect file.opus
-- file.opus
can't sync to MPEG frame
$ mid3v2 -l file.opus
IDv2 tag into for file.opus
TALB=alb
TPE1=art
TRCK=1

mutagen-inspect is used as an example of other programs that use Mutagen as a library, which this also affects.

Please see #604

That's because mid3v2 is a utility to work with ID3 tags and is adding ID3 tags to the files. It should not be used on non-ID3 formats like opus.

Ideally the command should refuse to modify the Opus file, but currently it just adds the tags.