From 0a8f3d6dca5f02a91e4a29ecd8516c818a4ccca7 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 19 Sep 2024 16:13:05 +0200 Subject: [PATCH] add pipewire tests --- tests/tc_audio_pw.sh | 18 ++++++++++++++ tests/tc_video_audio_pw.sh | 25 ++++++++++++++++++++ tests/tc_video_pw.sh | 20 ++++++++++++++++ tests/tc_video_pw_audio.sh | 25 ++++++++++++++++++++ tests/tc_video_simple_webm_stream-gst1-pw.sh | 25 ++++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100755 tests/tc_audio_pw.sh create mode 100644 tests/tc_video_audio_pw.sh create mode 100755 tests/tc_video_pw.sh create mode 100644 tests/tc_video_pw_audio.sh create mode 100755 tests/tc_video_simple_webm_stream-gst1-pw.sh diff --git a/tests/tc_audio_pw.sh b/tests/tc_audio_pw.sh new file mode 100755 index 0000000..a07fe8a --- /dev/null +++ b/tests/tc_audio_pw.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -e + +# Default TeleCaster video parameters + +source /etc/telecaster/telecaster.conf + +gst-launch-1.0 pipewiresrc client-name="audio_processing" target-object="jack_source" ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \ + ! queue ! audioconvert \ + ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ + ! 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 ! pipewiresink client-name="audio_processing" target-object="none" + + diff --git a/tests/tc_video_audio_pw.sh b/tests/tc_video_audio_pw.sh new file mode 100644 index 0000000..71fa163 --- /dev/null +++ b/tests/tc_video_audio_pw.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -e + +# Default TeleCaster video parameters + +source /etc/telecaster/telecaster.conf + +gst-launch-1.0 pipewiresrc \ + ! queue ! videoconvert \ + ! queue ! vp8enc threads=4 deadline=2 \ + ! queue ! muxout. \ + pipewiresrc ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \ + ! queue ! audioconvert \ + ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ + ! 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. \ + webmmux streamable=true name=muxout \ + ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live_pw.webm + diff --git a/tests/tc_video_pw.sh b/tests/tc_video_pw.sh new file mode 100755 index 0000000..4f75dfc --- /dev/null +++ b/tests/tc_video_pw.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -e + +# Default TeleCaster video parameters + +source /etc/telecaster/telecaster.conf + +gst-launch-1.0 pipewiresrc client-name="video_streaming" ! $VIDEO_FORMAT, width=$VIDEO_WIDTH, height=$VIDEO_HEIGHT, framerate=$VIDEO_FRAMERATE/1 \ + ! queue ! $VIDEO_DECODER \ + ! queue ! videoconvert \ + ! queue ! vp8enc threads=4 deadline=2 \ + ! queue ! muxout. \ + pipewiresrc client-name="video_streaming" target-object="audio_processing" ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \ + ! queue ! audioconvert \ + ! queue ! opusenc bitrate=$AUDIO_OPUS_BITRATE \ + ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live_pw.webm + diff --git a/tests/tc_video_pw_audio.sh b/tests/tc_video_pw_audio.sh new file mode 100644 index 0000000..1df6a36 --- /dev/null +++ b/tests/tc_video_pw_audio.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -e + +# Default TeleCaster video parameters + +source /etc/telecaster/telecaster.conf + +gst-launch-1.0 pipewiresrc \ + ! queue ! videoconvert \ + ! queue ! vp8enc threads=4 deadline=2 \ + ! queue ! muxout. \ + pipewiresrc \ + ! queue ! audioconvert \ + ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ + ! 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. \ + webmmux streamable=true name=muxout \ + ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live_0.webm + diff --git a/tests/tc_video_simple_webm_stream-gst1-pw.sh b/tests/tc_video_simple_webm_stream-gst1-pw.sh new file mode 100755 index 0000000..92f2d93 --- /dev/null +++ b/tests/tc_video_simple_webm_stream-gst1-pw.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -e + +# Default TeleCaster video parameters + +source /etc/telecaster/telecaster.conf + +gst-launch-1.0 pipewiresrc \ + ! queue ! videoconvert \ + ! queue ! vp8enc threads=4 deadline=2 \ + ! queue ! muxout. \ + pipewiresrc \ + ! queue ! audioconvert \ + ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ + ! 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. \ + webmmux streamable=true name=muxout \ + ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live_$V4L2_ID.webm + -- 2.39.5