cifonauta icon indicating copy to clipboard operation
cifonauta copied to clipboard

Metadata reading/saving needs to handle images and videos

Open bruvellu opened this issue 1 year ago • 0 comments

Metadata reading and saving is only working for images. If the media is a video, an InvalidImageDataError error occurs when trying to write the metadata. I have a few suggestions regarding metadata handling:

  • Don't write metadata to the original file: Because uploaded files can be a PNG or GIF which don't handle metadata as JPG, or they can be MP4 videos, I propose we do not write the metadata to the original uploaded file. Just read the metadata during upload and never modify it again.
  • Write metadata to every file size: After the file fields were standardized in #276, the metadata should be written to all of them.
  • Handle video metadata reading and writing: I know that FFmpeg can pass -metadata arguments when processing. This can be a way to write the metadata to the file (although it'll be time-consuming). I took a brief look and found an IPTC standard for video metadata. Not sure if there's any library to read/write.

bruvellu avatar Jan 20 '24 17:01 bruvellu