feat: add video xcorr lab with gray proxy support

This commit is contained in:
Honney OC committed 2026-09-16 15:51:34 +00:00
1 parent 068f059cc1
commit 87a7e9347b
4 files changed
+1199 -1

No files matched your search

+23 -1
View File
@@ -14,7 +14,7 @@ else
PIP_INSTALL = $(PIP) install
endif
.PHONY: default install install-cpu install-rocm install-cuda extract extract-loud picker ast sync verify clean help
.PHONY: default install install-cpu install-rocm install-cuda extract extract-loud proxy picker ast vst sync verify clean help
default: ast
@@ -26,8 +26,10 @@ help:
@echo " make install-cuda # force CUDA torch"
@echo " make extract # run extract.py (uses config.toml if present)"
@echo " make extract-loud # extract with loud-only gating (keep explosions/transients)"
@echo " make proxy # build gray analysis proxies from extracted masters (local only)"
@echo " make picker # visual picker: select start/duration before extraction"
@echo " make ast # run sync_audio_test.py (audio_sync_test, PyQtGraph GUI)"
@echo " make vst # run sync_video_test.py (video xcorr lab, PyQtGraph GUI)"
@echo " make sync LAG=0.042 # run apply_sync.py to mux synced output (LAG in seconds)"
@echo " make verify LAG=0.042 # verify sync: video + dual waveform player"
@echo " make clean"
@@ -87,6 +89,9 @@ extract:
extract-loud:
@if [ -x $(PY) ]; then $(PY) extract.py loud; else python3 extract.py loud; fi
proxy:
@if [ -x $(PY) ]; then $(PY) extract.py proxy; else python3 extract.py proxy; fi
picker:
@if [ -x $(PY) ]; then QT_QPA_PLATFORM=xcb QT_STYLE_OVERRIDE=Fusion $(PY) picker.py --config $(CONFIG); else QT_QPA_PLATFORM=xcb QT_STYLE_OVERRIDE=Fusion python3 picker.py --config $(CONFIG); fi
@@ -112,5 +117,22 @@ ast:
fi
@if [ -x $(PY) ]; then LC_NUMERIC=C PYTHONPATH=. QT_STYLE_OVERRIDE=Fusion $(PY) sync_audio_test.py --config $(CONFIG); else LC_NUMERIC=C PYTHONPATH=. QT_STYLE_OVERRIDE=Fusion python3 sync_audio_test.py --config $(CONFIG); fi
vst:
@VIDEO_A=$$(python3 -c "import tomllib; c=tomllib.load(open('config.toml','rb')); print(c['extract'].get('file_a',''))" 2>/dev/null); \
VIDEO_B=$$(python3 -c "import tomllib; c=tomllib.load(open('config.toml','rb')); print(c['extract'].get('file_b',''))" 2>/dev/null); \
OUT=$$(python3 -c "import tomllib; c=tomllib.load(open('config.toml','rb')); print(c['extract'].get('out_dir','extracted'))" 2>/dev/null); \
STEM_A=$$(basename "$$VIDEO_A" | sed 's/\.[^.]*$$//'); \
STEM_B=$$(basename "$$VIDEO_B" | sed 's/\.[^.]*$$//'); \
if [ ! -f "$$OUT/$${STEM_A}_video.mkv" ] || [ ! -f "$$OUT/$${STEM_B}_video.mkv" ]; then \
echo "=> extracted masters not found, running make extract first..."; \
$(MAKE) extract; \
elif [ ! -f "$$OUT/$${STEM_A}_proxy.mkv" ] || [ ! -f "$$OUT/$${STEM_B}_proxy.mkv" ]; then \
echo "=> masters exist but proxies missing, running make proxy (local only)..."; \
$(MAKE) proxy; \
else \
echo "=> extracted videos exist, skipping extract/proxy"; \
fi
@if [ -x $(PY) ]; then LC_NUMERIC=C PYTHONPATH=. QT_STYLE_OVERRIDE=Fusion $(PY) sync_video_test.py --config $(CONFIG); else LC_NUMERIC=C PYTHONPATH=. QT_STYLE_OVERRIDE=Fusion python3 sync_video_test.py --config $(CONFIG); fi
clean:
rm -rf $(VENV) __pycache__ .pytest_cache