Commit Graph
7 Commits
Author SHA1 Message Date
ergosteurandClaude Sonnet 5 cdf33fd777 Extend set_mtime_from_metadata.py to photos, AVI, and recursive batch mode
Generalizes the tool beyond QuickTime video containers, based on what
we found fixing a Synology Photos mass-wrong-date bug: the indexer
only reads photo-EXIF fields and never video container metadata, even
though most cameras embed a real timestamp there.

- .avi via exiftool's RIFF DateTimeOriginal (local time, no offset)
- .jpg/.jpeg/.png/.tif/.tiff/.heic/.heif via exiftool's EXIF DateTimeOriginal
- exiftool fallback for .mp4/.mov when ffprobe finds neither QuickTime tag
- placeholder "clock never set" timestamps (e.g. 0000:00:00 00:00:00)
  are treated as no metadata, not a real date
- --dir for recursive directory batch mode
- interactive y/N confirmation by default; --yes for unattended runs

Verified against real files: a 2007 camcorder AVI, a synthetic UTC-tagged
MP4, and an EXIF-tagged JPEG all round-trip correctly, including DST
handling.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 15:47:33 -04:00
ergosteur e1cd699b79 Add CLAUDE.md with context not covered by README or code comments
Documents things a future session would otherwise have to rediscover:
no test suite/fixtures exist (verification requires real sample clips
and ffprobe checks), the libvmaf stderr spam is a dev-machine quirk
not a bug, detection thresholds were empirically tuned on one real
dataset, the -r 30 normalization is load-bearing for bitrate targeting
and shouldn't be removed casually, and a cross-platform GUI was
considered and deliberately deferred.
2026-07-26 13:07:33 -04:00
ergosteur 5fa68dac76 Add standalone set_mtime_from_metadata.py utility
Extracted the mtime-stamping logic added to concat_live_clips.py into
its own dependency-free script (just needs ffprobe), so it can be run
against any video file -- not just Live Photo clips -- to fix a
mismatched filesystem mtime for tools like Synology Photos that sort
videos by mtime instead of parsing embedded metadata.
2026-07-26 13:01:50 -04:00
ergosteur 20c5216afc 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.
2026-07-26 12:58:34 -04:00
ergosteur ffafb46d78 Add continuity report with per-junction gaps and copy-pasteable runs
When a clip boundary's audio doesn't match, print a full table of every
junction (capture-time gap, confidence, verdict) plus the input clips
grouped into continuous runs, each formatted as a ready-to-paste clip
list -- so a discontinuous batch can be immediately re-run on just the
subset that's actually one sequence, without manually diffing timestamps.
2026-07-26 12:53:54 -04:00
ergosteur ac3bdbcfe9 Add continuity check: abort if clip audio doesn't actually overlap
Distinguishes a genuine audio mismatch at a clip boundary (evidence
the inputs aren't really a continuous sequence) from a boundary that's
simply too quiet to judge either way, using an RMS floor alongside the
existing cross-correlation confidence score. A confident mismatch now
aborts before encoding instead of silently splicing unrelated clips
together; --allow-discontinuous opts back into the old behavior.
2026-07-26 12:49:18 -04:00
ergosteur 302afee062 Initial commit: iPhone Live Photo clip concatenator
Detects genuine audio/video overlap between consecutive Live Photo
clips via audio cross-correlation, trims the duplicated footage, and
re-encodes a seamless, metadata-preserving output.
2026-07-26 12:41:19 -04:00