diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00f2d38 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +*.pyc +.venv/ diff --git a/test_media/README.md b/test_media/README.md new file mode 100644 index 0000000..b1c3caf --- /dev/null +++ b/test_media/README.md @@ -0,0 +1,23 @@ +# Synthetic test clips + +Generated with ffmpeg (see git history / commit for exact commands). Ground truth for +validating marker capture, offset math, and lossless export. + +- `sync_test_INSYNC.mp4` — 10s, 640x480 @30fps, black video with a 33ms white flash + at t=5.000s; near-silent 1kHz tone that jumps to full volume for the same 33ms + window at t=5.000s. Video and audio events are aligned (offset = 0ms). + +- `sync_test_OUTOFSYNC_audio+350ms.mp4` — same content, but the audio track has + been shifted +350ms later relative to video (via `-itsoffset 0.350` on the audio + input, stream-copied). The flash event stays at video t=5.000s; the beep event + now appears at t=5.350s. + +**Ground truth for the app's marker/offset workflow:** +- Mark Video at the flash → ~5.000s +- Mark Audio at the beep → ~5.350s +- Expected computed `delay_ms` = +350 (audio needs to be delayed to match video) +- Exporting `sync_test_OUTOFSYNC_audio+350ms.mp4` with delay_ms = +350 should + reproduce (bit-for-bit, modulo container overhead) `sync_test_INSYNC.mp4`'s sync. + +Frame at exactly t=5.000s is frame index 150 (30fps) — useful for checking +frame-step precision lands exactly on it. diff --git a/test_media/sync_test_INSYNC.mp4 b/test_media/sync_test_INSYNC.mp4 new file mode 100644 index 0000000..158ecaf Binary files /dev/null and b/test_media/sync_test_INSYNC.mp4 differ diff --git a/test_media/sync_test_OUTOFSYNC_audio+350ms.mp4 b/test_media/sync_test_OUTOFSYNC_audio+350ms.mp4 new file mode 100644 index 0000000..e683e1d Binary files /dev/null and b/test_media/sync_test_OUTOFSYNC_audio+350ms.mp4 differ