Skip to content

Commit c0e2f38

Browse files
committed
Max allowed version of lra is 20
1 parent 86b1470 commit c0e2f38

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

auto_editor/help.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
; Integrated loudness target
170170
- i (and/c (or/c int? float?) (>=/c -70) (<=/c -5)) : -24.0
171171
; Loudness range target
172-
- lra (and/c (or/c int? float?) (>=/c 1) (<=/c 50)) : 7.0
172+
- lra (and/c (or/c int? float?) (>=/c 1) (<=/c 20)) : 7.0
173173
; Set maximum true peak
174174
- tp (and/c (or/c int? float?) (>=/c -9) (<=/c 0)) : -2.0
175175
; Set offset gain. Gain is applied before the true-peak limiter

auto_editor/render/audio.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
from auto_editor.utils.types import Args
1919
from auto_editor.wavfile import AudioData, read, write
2020

21+
# only newer versions of ffmpeg support lra to 50.
22+
# Ubuntu Latest and my static ffmpeg build for Windows are the main blockers
23+
2124
norm_types = {
2225
"ebu": smallAttrs(
2326
"ebu",
2427
smallAttr("i", -24.0, andc(is_int_or_float, gte_c(-70), lte_c(-5))),
25-
smallAttr("lra", 7.0, andc(is_int_or_float, gte_c(1), lte_c(50))),
28+
smallAttr("lra", 7.0, andc(is_int_or_float, gte_c(1), lte_c(20))),
2629
smallAttr("tp", -2.0, andc(is_int_or_float, gte_c(-9), lte_c(99))),
2730
smallAttr("gain", 0.0, andc(is_int_or_float, gte_c(-99), lte_c(99))),
2831
),

auto_editor/subcommands/test.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import sys
88
from dataclasses import dataclass, field
99
from fractions import Fraction
10-
from platform import system
1110
from time import perf_counter
1211
from typing import Any, Callable
1312

@@ -601,10 +600,8 @@ def audio_norm_f():
601600
return run.main(["example.mp4"], ["--audio-normalize", "#f"])
602601

603602
def audio_norm_ebu():
604-
lra = 20 if system() == "Linux" else 40
605-
# Some old versions only support lra [1 - 20]
606603
return run.main(
607-
["example.mp4"], ["--audio-normalize", f"ebu:i=-5,lra={lra},gain=5,tp=-1"]
604+
["example.mp4"], ["--audio-normalize", f"ebu:i=-5,lra=20,gain=5,tp=-1"]
608605
)
609606

610607
def palet():

0 commit comments

Comments
 (0)