slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.28k stars 118 forks source link

warn if dynamic mode is used but linear specified #256

Closed slhck closed 6 months ago

slhck commented 6 months ago

See: https://github.com/slhck/ffmpeg-normalize/issues/254

This changes the output format slightly, with ebu_pass1 and ebu_pass2 as new keys, replacing ebu:

➜ python3 -m ffmpeg_normalize test/test.wav -o normalized/test2.wav -prf volume=0.5,volume=0.5 -p -f C 
[
    {
        "input_file": "test/test.wav",
        "output_file": "normalized/test2.wav",
        "stream_id": 0,
        "ebu_pass1": {
            "input_i": -51.78,
            "input_tp": -39.53,
            "input_lra": 2.2,
            "input_thresh": -61.84,
            "output_i": -22.16,
            "output_tp": -9.47,
            "output_lra": 2.1,
            "output_thresh": -32.25,
            "normalization_type": "dynamic",
            "target_offset": -0.84
        },
        "ebu_pass2": {
            "input_i": -52.24,
            "input_tp": -39.53,
            "input_lra": 2.1,
            "input_thresh": -62.33,
            "output_i": -23.46,
            "output_tp": -10.75,
            "output_lra": 2.1,
            "output_thresh": -33.54,
            "normalization_type": "linear",
            "target_offset": 0.46
        },
        "mean": null,
        "max": null
    }
]