[FFmpeg-user] How to keep the original creation date?
Michael Koch
astroelectronic at t-online.de
Thu Jun 22 19:06:23 EEST 2023
Am 22.06.2023 um 16:36 schrieb Kevin Willard via ffmpeg-user:
> I've got 3000 family videos from 2009-2014 that played perfect back then on Windows 7 but have the wrong aspect ratio today (all stretched even though it says it is 1920X1080). The code belowfixes the problem, but changes all the dates to current. It would be nice to have the original time/date stamp for sorting and looking at the family timeline.Google search brings me to Stackoverflow (ffmpeg keep original file date?) They us PowerShell, I don't know how to use it and I don't think it will work because in the example the PS operation is done after the FFmpeg conversion is done. FFmpeg in the copy sets the creation time, last modified, and last access to the time/date the FFmpeg was run.
> The code below is in a .bat file located in the directory that contains the 3000 *.MP4 files. When run
> it puts the corrected files in the subdirectory Fixed_Directory.
> for %%a in ("*.mp4") do ffmpeg -i "%%a" -aspect 1920:1080 -c copy "Fixed_Directory\%%~na.mp4"
>
> With all the switches I would think there would be one to keep the original dates, any ideas?
Which FFmpeg version are you using? In my test the creation time is
almost kept as it was, it's only changed by a few minutes. I don'*t know
why.
Michael
More information about the ffmpeg-user
mailing list