Files
movie_sync/config.toml
T

39 lines
1.5 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.
file_a = "/path/to/movie_b.mp4"
file_b = "/path/to/movie_a.mkv"
# Output stem names (without extension). If omitted, derived from input filename.
stem_a = "file_a"
stem_b = "file_b"
# 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
[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_b_audio.wav"
# file_b_wav = "extracted/movie_a_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
[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)