Improve location metadata

This commit is contained in:
hbrain 2026-05-25 01:08:57 +00:00
parent 298394d69d
commit bc935d2e0a
2 changed files with 4 additions and 2 deletions

View file

@ -158,7 +158,7 @@ python3 movmaker.py input --preview
- adds persistent bottom-left title/date/place and bottom-right `@bubulescu` stamps
- preserves special characters in rendered overlays and metadata
- uses safe ASCII only for generated filenames, so special letters become readable equivalents like `Č` -> `C`, `å` -> `a`, `ø` -> `o`
- embeds MP4 metadata: title, date, location, artist, comment, and creation_time
- embeds MP4 metadata: title, date, location/place, QuickTime location name, artist, comment, and creation_time
- writes an MP4 file named like `YYYYMMDD_title.mp4` in the current directory by default; use `--out-dir DIR` to choose another output directory
- takes `YYYYMMDD` from the first picture/video metadata, falling back to file modification date
- uses local `ffmpeg/ffmpeg` and `ffmpeg/ffprobe` when present, otherwise system tools

View file

@ -544,6 +544,8 @@ def build_video(
"title": data.title,
"date": data.date,
"location": data.place,
"place": data.place,
"com.apple.quicktime.location.name": data.place,
"artist": "@bubulescu",
"comment": "Created with movmaker",
"creation_time": creation_date.isoformat(),
@ -560,7 +562,7 @@ def build_video(
else:
cmd += ["-an"]
cmd += ["-c:v", "libx264", "-preset", preset, "-crf", str(crf), "-r", str(fps), "-pix_fmt", "yuv420p", str(output)]
cmd += ["-c:v", "libx264", "-preset", preset, "-crf", str(crf), "-r", str(fps), "-pix_fmt", "yuv420p", "-movflags", "+faststart+use_metadata_tags", str(output)]
run(cmd)