From cb2718a44cc5d8857f0709c8e344158502564b71 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 13 Sep 2024 12:01:10 +0200 Subject: [PATCH] add test --- .../tc_video_simple_webm_stream-gst1-test.sh | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/tc_video_simple_webm_stream-gst1-test.sh 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 index 0000000..fd6f147 --- /dev/null +++ b/tests/tc_video_simple_webm_stream-gst1-test.sh @@ -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 + + -- 2.39.5