title: FFMPEG batchfile to compress images JPG JPEGs and keep EXIF (metadata)
body: <p>I tried searching everywhere for a possible solution but I really can't find it. Hope someone can help me out here.</p>
  <p>I have written a batch file to use FFMPEG to compress and sharpen JPGs in a folder.</p>
  <pre><code>  FOR %%a in (*.jpg) DO (ffmpeg -i &quot;%%a&quot; -q:v 8 -vf unsharp=5:5:1.0:5:5:0.0 &quot;2022 01 22 %%~na&quot;.jpg)
  PAUSE
  </code></pre>
  <p>The new file comes out smaller in size, but is missing all the EXIF information that the original photo has.</p>
  <p>I tried to add in the command &quot;-metadata&quot; 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?</p>
  <p>Thank you and I really appreciate any help here.</p>