video – How to properly set timestamps of a target file in ffmpeg?

I’m using ffmpeg to concat multiple files into one consolidated file, but the resulting timestamp of the file created naturally falls on the time of this operation. I’m instead trying to set the timestamp of the new file to have the same matching created timestamp as the first file concatenated, and for that I’m using the following command:

ffmpeg.input('merge_list.txt', format="concat", safe=False).output(i, c="copy", **{'metadata:s:v:0': 'rotate=0'}, metadata=f'creation_time={creation_time}').run()

there are also a couple other modified metadata things, but most importantly I’ve modified the creation time here. the issue with this approach is that all this does is modify the video metadata, and not the actual file metadata, as shown here:

enter image description here

and here, through exiftool:

enter image description here

what is the best way to mirror the original file’s timestamp data as close as possible (in the original file, both the video metadata and file metadata are accurate) to make the target file effectively look “correct” like the original file would?

Read more here: Source link