Write metadata to unsupported files

Started by sebastianbarria, June 22, 2021, 09:52:07 PM

Previous topic - Next topic

sebastianbarria

I have a web site where we need to upload mp4+srt files (or sometimes other files).
For that, we create the zip manually in our computer, but I'm making a tool to automate that process.
So, I take a few files, create a zip programatically, and then I need to add some custom metadata to it (for example, a GPS position or a custom number so our website would recognize that information once uploaded).

I've tried writing it to the zip file created, but exiftool says it's not possible to write on that unsupported file formats.

I've already tried to embed the additional information directly on the mp4: it works, but I need to embed large files too, like a zip file containing screen catpures of the video (for example a 5MB of information), and that's not possible because the metadata supports only 64kb each key/value.

Do you know if exists a workaround for it?
Thanks a lot!

StarGeek

You can't just write any data to any file you would like.  Each file format has its own limitations.  For example, you can't write any metadata to BMP files.  See the Supported File Types table and Tag Names pages for what files can have data and what kinds of data that can be writting.

If you look at the Zip tags page, you'll see that exiftool doesn't write any of the tags and most of them are not really things that could be written to anyway.

If you're not going to write data to the files before zipping, your best bet would be to use the Comment field of a zip file.  Exiftool can't write it but it can be added while creating the zip file or afterwards.  If you're using the zip or rar command line program, then you would use the -c or -z options (see this StackOverflow question).  7zip doesn't have the ability to add "real" comments but using the 7z file manager, you can add a pseudo comment.  7zip does this by adding a new file to the archive called descript.ion.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype