I have the following batch code (I'm on Windows 10) that resize all the videos in a folder. It keeps the origin media created date but it doesn't keep the File attributes Date created and Date modified dates after encoding. How do I add this to the code below?
for %%a in ("*.mp4") do ffmpeg -i "%%a" -map_metadata 0 -vf "scale=iw/4:ih/4" -c:v libx264 -c:a copy "..\%%~na.mp4"
I originally got the answer to your question from this post, which can also serve as a template because it worked for me last year: ffmpeg keep original file date?
Moreover, I created this for you below: