]> git.parisson.com Git - telecaster-server.git/commitdiff
add test develop feature/jack
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 13 Sep 2024 10:01:10 +0000 (12:01 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 13 Sep 2024 10:01:10 +0000 (12:01 +0200)
tests/tc_video_simple_webm_stream-gst1-test.sh [new file with mode: 0644]

diff --git a/tests/tc_video_simple_webm_stream-gst1-test.sh b/tests/tc_video_simple_webm_stream-gst1-test.sh
new file mode 100644 (file)
index 0000000..fd6f147
--- /dev/null
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+
+set -e
+
+# Default TeleCaster video parameters
+
+# v4l2
+V4L2_ID=0
+V4L2_ZOOM=140
+V4L2_SHARPNESS=128
+
+# C920
+#VIDEO_WIDTH=864
+#VIDEO_HEIGHT=480
+#VIDEO_FRAMERATE=24
+
+# C922
+VIDEO_WIDTH=640
+VIDEO_HEIGHT=480
+VIDEO_FRAMERATE=30
+VIDEO_FLIP=none
+VIDEO_FORMAT="video/x-raw, format=YUY2"
+VIDEO_DECODER="identity"
+
+# Audio
+AUDIO_CHANNELS=2
+AUDIO_OPUS_BITRATE=96000
+AUDIO_GAIN_PRE=2.5
+AUDIO_GAIN_POST=1.5
+
+
+# GST launch
+gst-launch-1.0 v4l2src device=/dev/video$V4L2_ID ! $VIDEO_FORMAT, width=$VIDEO_WIDTH, height=$VIDEO_HEIGHT, framerate=$VIDEO_FRAMERATE/1  \
+       ! queue ! $VIDEO_DECODER \
+       ! queue ! videoflip method=$VIDEO_FLIP \
+       ! queue ! videoconvert \
+       ! queue ! vp8enc threads=4 deadline=2 \
+       ! queue ! muxout. \
+       jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels=$AUDIO_CHANNELS \
+       ! 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 ! filesink location=/tmp/telecaster_live.webm
+
+