mutagen
mutagen copied to clipboard
Saving to another file, than reading from
I'm reading files from read-only location and need to save them locally/in memory. ATM as far as I understood from error messages, when saving file it assumes the file contents are in output file. I theoretically could copy the file, but I'd like mutagen to do this so I can stream the output file without seeking and buffering whole.
To be precise: Now metagen is moving data in file to make place for metadata. I'd like it to save/yield whole new file/bin data with tags applied.
What I finally want to achieve is giving mutagen readable filelike (lets call it input) with audio data and creating (lets call it output) stream with contents of input file with tags applied.
Nothing like this exists atm, you have to copy first and then change it.
I can see the benefit for your use case though, so I'll leave this open.
Tbh this function is suggesting it's working like that (what else could possibly filething
arg in save function mean?)
https://mutagen.readthedocs.io/en/latest/api/base.html#mutagen.FileType.save
But it's not ;/
yeah, that could be communicated better. In this case you could read the tags from one MP3 for example and then save them to another MP3, but both files needs to exist already.