I would like to convert .mts files to .mp4 and retain the 'creation date' and 'modified date' metadata. I found the following post How to make Handbrake preserve capture time / creation time? that explains how to do it in one step with ffmpeg. The suggested code is
ffmpeg -i in.mp4 -i out.mp4 -map 1 -map_metadata 0 -c copy fixed.mp4
I modified the code to indicate that my input file is .mts (not .mp4).
However, this code is not working for me. The metadata of the output file contains the current date, not the date of the original file. Is this because my input file is .mts instead of .mp4? If so, what can I do to make this code work in my situation?