Mutagen header only with FLAC and ID3

43 views
Skip to first unread message

Drew Abbott

unread,
Jun 10, 2021, 5:27:12 PM6/10/21
to Quod Libet Development
I am trying to save only the metadata blocks of a file generated with mutagen using something like this:

from mutagen.flac import FLAC
from io import BytesIO

foo = FLAC()
foo.add_tags() # AttributeError: 'FLAC' object has no attribute 'metadata_blocks'
foo.add_tags() # mutagen.flac.FLACVorbisError: a Vorbis comment already exists
foo['artist'] = 'test'
bio = BytesIO()
foo.save(bio) # AttributeError: 'FLAC' object has no attribute 'metadata_blocks'

is it possible to write FLAC metadata blocks without audio frame data or otherwise frame data of negligible size? If so, is it also possible to do this with ID3 data?
Reply all
Reply to author
Forward
0 new messages