I have been reencoding some old mp4 files and using ffmpeg to copy the metadata from the old files to the new ones using:
ffmpeg -i YDXJ0100.mp4 -i YDXJ0100_1.mp4 -map 1 -map_metadata 0 -c copy YDXJ0100_.mp4
Where the first file is the old version, _1 is the new one, and _.mp4 is the fixed one.
However, it is very time consuming to do it file by file. How could I write it in a way that it does it for every old file (but not all files)?
Update: This code works, except for the Modify data and other file timestamps:
for %%f in (*.mp4) do ffmpeg -i "%%f" -i "%%~nf_1.mp4" -map 1 -c copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a "%%~nf_.mp4"