From bca351707a0219fc3da4a97a08398863f3537d7d Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sun, 24 May 2020 11:41:34 +0200 Subject: [PATCH] revert to s302m codec --- ffplayout/utils.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ffplayout/utils.py b/ffplayout/utils.py index ccef64f5..38a82406 100644 --- a/ffplayout/utils.py +++ b/ffplayout/utils.py @@ -984,7 +984,12 @@ def timed_source(probe, src, begin, dur, seek, out, first, last): def pre_audio_codec(): """ - use libtwolame if is compiled in ffmpeg, when not use normal mp2 + when add_loudnorm is False we use a different audio encoder, + s302m has higher quality, but is experimental + and works not well together with the loudnorm filter """ - acodec = 'libtwolame' if 'libtwolame' in FF_LIBS['libs'] else 'mp2' - return ['-c:a', acodec, '-b:a', '384k', '-ar', '48000', '-ac', '2'] + if _pre_comp.add_loudnorm: + acodec = 'libtwolame' if 'libtwolame' in FF_LIBS['libs'] else 'mp2' + return ['-c:a', acodec, '-b:a', '384k', '-ar', '48000', '-ac', '2'] + else: + return ['-c:a', 's302m', '-strict', '-2', '-ar', '48000', '-ac', '2']