From 650340b552a259592c9fbe08dfc5fe016d41fdc9 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 5 Apr 2022 09:28:43 +0200 Subject: [PATCH] use volume, apply right volume, threshold and ratio values --- .../.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh | 15 ++++++++------- .../scripts/tc_video_simple_webm_stream-gst1.sh | 11 ++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh b/src/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh index 32dd4ef..418eceb 100755 --- a/src/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh +++ b/src/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh @@ -6,7 +6,8 @@ set -e AUDIO_CHANNELS=2 AUDIO_OPUS_BITRATE=96000 AUDIO_MP3_QUALITY=4.0 -AUDIO_GAIN=12.0 +AUDIO_GAIN_PRE=2.5 +AUDIO_GAIN_POST=1.5 LOCAL_DIR=$(dirname "$0") if [ -f $LOCAL_DIR/.env ]; then @@ -15,13 +16,13 @@ fi # GST launch gst-launch-1.0 jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \ - ! queue ! audioconvert \ - ! queue ! rgvolume pre-amp=$AUDIO_GAIN \ ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ - ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.25 ratio=4.0 \ - ! queue ! rgvolume pre-amp=$AUDIO_GAIN \ - ! queue ! rglimiter \ - ! queue ! audioconvert ! queue ! lamemp3enc quality=$AUDIO_MP3_QUALITY \ + ! queue ! volume volume=$AUDIO_GAIN_PRE \ + ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \ + ! queue ! volume volume=$AUDIO_GAIN_POST \ + ! queue ! audiodynamic characteristics=hard-knee mode=compressor threshold=0.95 ratio=0.001 \ + ! queue ! audioconvert \ + ! queue ! lamemp3enc quality=$AUDIO_MP3_QUALITY \ ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live.mp3 > /dev/null diff --git a/src/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh b/src/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh index f48dc4e..4c79762 100755 --- a/src/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh +++ b/src/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh @@ -22,7 +22,8 @@ VIDEO_FLIP=none # Audio AUDIO_CHANNELS=2 AUDIO_OPUS_BITRATE=96000 -AUDIO_GAIN=12.0 +AUDIO_GAIN_PRE=2.5 +AUDIO_GAIN_POST=1.5 LOCAL_DIR=$(dirname "$0") if [ -f $LOCAL_DIR/.env ]; then @@ -43,11 +44,11 @@ gst-launch-1.0 v4l2src device=/dev/video$V4L2_ID ! video/x-raw, format=YUY2, wid ! queue ! vp8enc threads=4 deadline=2 \ ! queue ! muxout. \ jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \ - ! queue ! rgvolume pre-amp=$AUDIO_GAIN \ ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ - ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.25 ratio=4.0 \ - ! queue ! rgvolume pre-amp=$AUDIO_GAIN \ - ! queue ! rglimiter \ + ! queue ! volume volume=$AUDIO_GAIN_PRE \ + ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \ + ! queue ! volume volume=$AUDIO_GAIN_POST \ + ! queue ! audiodynamic characteristics=hard-knee mode=compressor threshold=0.95 ratio=0.001 \ ! queue ! audioconvert \ ! queue ! opusenc bitrate=$AUDIO_OPUS_BITRATE \ ! queue ! muxout. \ -- 2.39.5