]> git.parisson.com Git - telecaster-server.git/commitdiff
use volume, apply right volume, threshold and ratio values feature/volume
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 5 Apr 2022 07:28:43 +0000 (09:28 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 5 Apr 2022 07:28:43 +0000 (09:28 +0200)
src/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh
src/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh

index 32dd4ef6d63a3d117095c5195b7cf0951038e44e..418eceba4f436163e1eb2f0748be80ee790d6fcc 100755 (executable)
@@ -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
 
index f48dc4ea69c61feb0475feab4072b70d581c616b..4c797629eabadae627864221bb5dbe2a86f850c2 100755 (executable)
@@ -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. \