From: Guillaume Pellerin Date: Fri, 13 Sep 2024 10:01:10 +0000 (+0200) Subject: add test X-Git-Tag: 4.0.0~40 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=refs%2Fheads%2Fdevelop;p=telecaster-server.git add test --- 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 + +