From 4d8d48afc6902ded6de80be8a43b658ce3c394c4 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 4 Apr 2022 11:16:32 +0200 Subject: [PATCH] add AUDIO_GAIN param --- src/home/telecaster/.fluxbox/scripts/.env.sample | 3 ++- .../telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh | 5 +++-- .../.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/home/telecaster/.fluxbox/scripts/.env.sample b/src/home/telecaster/.fluxbox/scripts/.env.sample index 7152a99..8e26e1b 100644 --- a/src/home/telecaster/.fluxbox/scripts/.env.sample +++ b/src/home/telecaster/.fluxbox/scripts/.env.sample @@ -16,4 +16,5 @@ VIDEO_FLIP=rotate-180 # Audio AUDIO_CHANNELS=2 AUDIO_OPUS_BITRATE=96000 -AUDIO_MP3_QUALITY=4.0 \ No newline at end of file +AUDIO_MP3_QUALITY=4.0 +AUDIO_GAIN=12.0 \ No newline at end of file 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 200dca5..32dd4ef 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,6 +6,7 @@ set -e AUDIO_CHANNELS=2 AUDIO_OPUS_BITRATE=96000 AUDIO_MP3_QUALITY=4.0 +AUDIO_GAIN=12.0 LOCAL_DIR=$(dirname "$0") if [ -f $LOCAL_DIR/.env ]; then @@ -15,10 +16,10 @@ fi # GST launch gst-launch-1.0 jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \ ! queue ! audioconvert \ - ! queue ! rgvolume pre-amp=12.0 \ + ! 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=12.0 \ + ! queue ! rgvolume pre-amp=$AUDIO_GAIN \ ! queue ! rglimiter \ ! queue ! audioconvert ! queue ! lamemp3enc quality=$AUDIO_MP3_QUALITY \ ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live.mp3 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 9cfe929..f48dc4e 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,6 +22,7 @@ VIDEO_FLIP=none # Audio AUDIO_CHANNELS=2 AUDIO_OPUS_BITRATE=96000 +AUDIO_GAIN=12.0 LOCAL_DIR=$(dirname "$0") if [ -f $LOCAL_DIR/.env ]; then @@ -42,10 +43,10 @@ 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=12.0 \ + ! 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=12.0 \ + ! queue ! rgvolume pre-amp=$AUDIO_GAIN \ ! queue ! rglimiter \ ! queue ! audioconvert \ ! queue ! opusenc bitrate=$AUDIO_OPUS_BITRATE \ -- 2.39.5