fix: refactor audio conversion mode handling in FFMpeg

This commit is contained in:
Chrystian Huot 2026-05-17 08:57:02 -04:00
parent 3c4da551c9
commit b7975763cf

View file

@ -96,9 +96,10 @@ func (ffmpeg *FFMpeg) Convert(call *Call, systems *Systems, tags *Tags, mode uin
} }
if ffmpeg.version43 { if ffmpeg.version43 {
if mode == AUDIO_CONVERSION_ENABLED_NORM { switch mode {
case AUDIO_CONVERSION_ENABLED_NORM:
args = append(args, "-af", "apad=whole_dur=3s,loudnorm") args = append(args, "-af", "apad=whole_dur=3s,loudnorm")
} else if mode == AUDIO_CONVERSION_ENABLED_LOUD_NORM { case AUDIO_CONVERSION_ENABLED_LOUD_NORM:
args = append(args, "-af", "apad=whole_dur=3s,loudnorm=I=-16:TP=-1.5:LRA=11") args = append(args, "-af", "apad=whole_dur=3s,loudnorm=I=-16:TP=-1.5:LRA=11")
} }
} }