Set output file mtime to match embedded capture time

Some tools (Synology Photos, for videos) key off filesystem mtime
rather than parsing QuickTime metadata for the capture date, so an
otherwise-correct output file would sort/date wrong there. Stamp the
output's mtime from the same clip whose metadata got embedded
(--metadata-from) after encoding.
This commit is contained in:
2026-07-26 12:58:34 -04:00
parent ffafb46d78
commit 20c5216afc
2 changed files with 15 additions and 0 deletions
+3
View File
@@ -31,6 +31,9 @@ This script:
with a plain stream copy) and concatenates everything into one file.
5. Carries over the original container metadata (GPS, device info, creation
time, Live Photo identifiers) from one of the source clips.
6. Sets the output file's filesystem modification time to match that same
capture time — some tools (e.g. Synology Photos, for videos) sort/date
by file mtime instead of parsing embedded metadata.
Audio stays uncompressed PCM throughout, so it never loses quality. Video
quality defaults to a bitrate slightly above the source clips' own bitrate