fix normalization to conform to EBU R128
This commit is contained in:
parent
ddb5f38d75
commit
b4621d0044
2 changed files with 10 additions and 5 deletions
|
@ -22,7 +22,7 @@ X264_BANNED_PIXFMTS = {"bgr24", "yuv422p"}
|
|||
# see doc/command_assembler.png
|
||||
command = over.types.ndict()
|
||||
command.identify = Command("ffprobe", "-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", "INFILE")
|
||||
command.normalize_prepass = Command("ffmpeg", "-i", "INFILE", "-filter:a", "loudnorm=I=-16:TP=-1.5:LRA=11:print_format=json", "-f", "null", "/dev/null")
|
||||
command.normalize_prepass = Command("ffmpeg", "-i", "INFILE", "-filter:a", "loudnorm=i=-23.0:tp=-2.0:lra=7.0:print_format=json", "-f", "null", "/dev/null")
|
||||
command.encode_generic = Command("ffmpeg", "FPS", "CUT_FROM", "-i", "INFILE", "-threads", str(multiprocessing.cpu_count()), "CUT_TO", "MAP", "VIDEO", "AUDIO", "-sn", "OUTFILE")
|
||||
command.sub_mp3 = Command("-codec:a", "libmp3lame", "NORMALIZE")
|
||||
command.sub_opus = Command("-codec:a", "libopus", "NORMALIZE")
|
||||
|
@ -276,7 +276,12 @@ if __name__ == "__main__":
|
|||
|
||||
info.normalize_command = command.sub_normalize
|
||||
info.normalize_command.reset()
|
||||
info.normalize_command.LOUDNORM_INCANTATION = "loudnorm=I=-16:TP=-1.5:LRA=11:measured_I=%.02f:measured_LRA=%.02f:measured_TP=%.02f:measured_thresh=%.02f:offset=%.02f:linear=true" %(info.loudnorm.input_i, info.loudnorm.input_lra, info.loudnorm.input_tp, info.loudnorm.input_thresh, info.loudnorm.target_offset)
|
||||
info.normalize_command.LOUDNORM_INCANTATION = "loudnorm=i=-23.0:lra=7.0:tp=-2.0:offset=0.0:measured_i=%.02f:measured_lra=%.02f:measured_tp=%.02f:measured_thresh=%.02f:linear=true" %(
|
||||
info.loudnorm.input_i,
|
||||
info.loudnorm.input_lra,
|
||||
info.loudnorm.input_tp,
|
||||
info.loudnorm.input_thresh
|
||||
)
|
||||
|
||||
else:
|
||||
info.normalize_command = None
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
major = 1 # VERSION_MAJOR_IDENTIFIER
|
||||
minor = 111 # VERSION_MINOR_IDENTIFIER
|
||||
# VERSION_LAST_MM 1.111
|
||||
patch = 2 # VERSION_PATCH_IDENTIFIER
|
||||
minor = 112 # VERSION_MINOR_IDENTIFIER
|
||||
# VERSION_LAST_MM 1.112
|
||||
patch = 0 # VERSION_PATCH_IDENTIFIER
|
||||
str = ".".join(str(v) for v in (major, minor, patch))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue