54 lines
2.3 KiB
TOML
54 lines
2.3 KiB
TOML
# movie_sync base config — shared by extract.py and sync_audio_test.py
|
|
# TOML is efficient: no yaml dep, stdlib tomllib (py3.11+) parses directly.
|
|
|
|
[extract]
|
|
# Input files — relative to repo root or absolute. Same as extract.py inputs.
|
|
# Example: file_a = "/path/to/movie_a.mkv"
|
|
file_a = "/path/to/movie_a.mkv"
|
|
file_b = "/path/to/movie_b.mp4"
|
|
# Window to extract (seconds). This is the ONLY duration needed.
|
|
duration = 30
|
|
# Start offset in file (seconds, 0 = file start). ffmpeg -ss before -i for fast seek.
|
|
start = 0.0
|
|
out_dir = "extracted"
|
|
target_fps = "24000/1001" # Blu-ray film 23.976
|
|
target_fps_eps = 0.02
|
|
# Lossless gray analysis proxy ({stem}_proxy.mkv), built from the LOCAL master
|
|
# (never re-reads the originals). Used by sync_video_test.py for fast decode.
|
|
proxy = true
|
|
proxy_width = 192
|
|
|
|
[audio]
|
|
# Target for re-encode / load. Must be identical for both files.
|
|
sample_rate = 48000
|
|
channels = 1
|
|
# If extracted wavs already exist, sync test can load them directly:
|
|
# file_a_wav = "extracted/movie_a_audio.wav"
|
|
# file_b_wav = "extracted/movie_b_audio.wav"
|
|
# EBU R128 loudness normalization (two-pass loudnorm)
|
|
normalize = true
|
|
target_lufs = -14 # -14 streaming, -23 broadcast
|
|
target_tp = -1.0 # true peak limit (dBTP)
|
|
target_lra = 11 # loudness range
|
|
# Audio stream selection: null = prompt interactively, int = use that index, "skip" = no audio
|
|
# stream = null
|
|
volume = 70 # the default volume in ast
|
|
|
|
[sync]
|
|
# Analysis window: null = use full extracted duration; otherwise limit for quick test
|
|
# duration = 30 # optional, seconds, null = full
|
|
method = "phat" # "phat" (GCC-PHAT, robust) or "standard" (raw)
|
|
use_gpu = "auto" # "auto" | "cpu" | "cuda" (ROCm/CUDA both via torch.cuda)
|
|
out_dir = "output" # synced output folder
|
|
|
|
[video]
|
|
# Settings for sync_video_test.py (reads ONLY files inside extract.out_dir).
|
|
grid = "32x18" # correlation grid WxH (16x9, 24x14, 32x18, 48x27, 64x36)
|
|
bars = true # auto-crop static letterbox/pillarbox bars before scaling
|
|
max_lag = 0.0 # search half-window in seconds (0 = full range)
|
|
prefer_proxy = true # use {stem}_proxy.mkv when present, else {stem}_video.mkv
|
|
decode_width = 192 # decode scale width when reading the full master
|
|
# Explicit extracted files (optional, relative to repo root or absolute):
|
|
# file_a_mkv = "extracted/movie_a_proxy.mkv"
|
|
# file_b_mkv = "extracted/movie_b_proxy.mkv"
|