Might be over-thinking this or missing a better method.
ffmpeg does not let you overwrite metadata within a file without a creating a temporary file first and then using mv (Linux) or move (Windows). Currently the solution to adding metadata/overwriting/updating would be to strip all metadata via temporary codec copy, mv or move the original file to the temporary, then use stored tags within the metadata function to assign the proper filename and tags. Either way, it seems like there's a requirement to replace the file with a new instance, not just rewriting the file from ffmpeg.
Wessie asked for a function for this, I gave it some thought and have a general outline. Unlikely to be done yet but it's a start.
a copy and then a move is more preferable anyway for if something goes wrong in the writing. All of that can be handled on the Go side so if we can just get the metadata into a file it should be good
Might be over-thinking this or missing a better method. ffmpeg does not let you overwrite metadata within a file without a creating a temporary file first and then using
mv
(Linux) ormove
(Windows). Currently the solution to adding metadata/overwriting/updating would be to strip all metadata via temporary codec copy,mv
ormove
the original file to the temporary, then use stored tags within the metadata function to assign the proper filename and tags. Either way, it seems like there's a requirement to replace the file with a new instance, not just rewriting the file from ffmpeg. Wessie asked for a function for this, I gave it some thought and have a general outline. Unlikely to be done yet but it's a start.