I tried searching everywhere for a possible solution but I really can't find it. Hope someone can help me out here.
I have written a batch file to use FFMPEG to compress and sharpen JPGs in a folder.
FOR %%a in (*.jpg) DO (ffmpeg -i "%%a" -q:v 8 -vf unsharp=5:5:1.0:5:5:0.0 "2022 01 22 %%~na".jpg)
PAUSE
The new file comes out smaller in size, but is missing all the EXIF information that the original photo has.
I tried to add in the command "-metadata" but apparently it works for MP4 only. I have an existing solution with imageMagick but I'm hoping to solve this via FFMPEG. or is there a way to integrate exiftool into the batch file?
Thank you and I really appreciate any help here.
exiftool...exiftool -overwrite_Original -TagsFromFile "%d2022 01 22 %F" -All:All /path/to/files/You do not want to run exiftool in your loop, as exiftool's biggest performance hit is the start up time. See Exiftool Common Mistake #3@ECHO ON FOR %%a in (*.jpg) DO (ffmpeg -i "%%a" -q:v 8 -vf unsharp=5:5:1.0:5:5:0.0 "2022 01 22 %%~na".jpg exiftool -overwrite_Original -TagsFromFile "%%f.pef" -All:All ) PAUSEeditunder your question and add your code in there where it can be formatted and read more easily... comments are not ideal for code. Thanks.