From: Guillaume Pellerin Date: Wed, 31 Jan 2024 20:22:37 +0000 (+0100) Subject: Merge branch 'develop' into feature/double-cam X-Git-Tag: 3.0~45 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=85adfc77bc679bd381fcff6a07f856931a36770b;p=telecaster-server.git Merge branch 'develop' into feature/double-cam --- 85adfc77bc679bd381fcff6a07f856931a36770b diff --cc bin/streaming/tc_video_simple_webm_stream-gst1.sh index 0000000,85c1a8d..b6c3c83 mode 000000,100755..100755 --- a/bin/streaming/tc_video_simple_webm_stream-gst1.sh +++ b/bin/streaming/tc_video_simple_webm_stream-gst1.sh @@@ -1,0 -1,55 +1,64 @@@ + #!/usr/bin/env bash + + set -e + + # Default TeleCaster video parameters + + # v4l2 + V4L2_ID=0 + V4L2_ZOOM=140 + V4L2_SHARPNESS=128 ++V4L2_FORMAT=image/jpeg ++V4L2_DEC=jpegdec ++#V4L2_FORMAT=video/x-h264 ++#V4L2_DEC=avdec_h264 + + # C920 + #VIDEO_WIDTH=864 + #VIDEO_HEIGHT=480 + #VIDEO_FRAMERATE=24 + + # C922 -VIDEO_WIDTH=864 -VIDEO_HEIGHT=480 ++VIDEO_WIDTH=1920 ++VIDEO_HEIGHT=1080 + VIDEO_FRAMERATE=24 + VIDEO_FLIP=none + + # Audio + AUDIO_CHANNELS=2 + AUDIO_OPUS_BITRATE=96000 + AUDIO_GAIN_PRE=2.5 + AUDIO_GAIN_POST=1.5 + + source /etc/telecaster/telecaster.conf + ++# use 1rst arg for webcam ID ++V4L2_ID=$1 ++echo $V4L2_ID ++ + # V4L2 setup + v4l2-ctl -d $V4L2_ID -c power_line_frequency=1 + v4l2-ctl -d $V4L2_ID -c zoom_absolute=$V4L2_ZOOM + v4l2-ctl -d $V4L2_ID -c focus_auto=0 + v4l2-ctl -d $V4L2_ID -c focus_absolute=1 + v4l2-ctl -d $V4L2_ID -c sharpness=$V4L2_SHARPNESS + + # GST launch -gst-launch-1.0 v4l2src device=/dev/video$V4L2_ID ! video/x-raw, format=YUY2, width=$VIDEO_WIDTH, height=$VIDEO_HEIGHT, framerate=$VIDEO_FRAMERATE/1 \ ++gst-launch-1.0 v4l2src device=/dev/video$V4L2_ID ! $V4L2_FORMAT, width=$VIDEO_WIDTH, height=$VIDEO_HEIGHT, framerate=$VIDEO_FRAMERATE/1 \ ++ ! queue ! $V4L2_DEC \ + ! 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 ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live.webm ++ ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live_$V4L2_ID.webm + > /dev/null diff --cc etc/telecaster/deefuzzer/telecaster_webm_monitor.yaml index 0000000,0d7fe35..8ce7c84 mode 000000,100644..100644 --- a/etc/telecaster/deefuzzer/telecaster_webm_monitor.yaml +++ b/etc/telecaster/deefuzzer/telecaster_webm_monitor.yaml @@@ -1,0 -1,17 +1,17 @@@ + deefuzzer: + log: /var/log/telecaster/telecaster_webm_monitor.log + m3u: /var/www/m3u/telecaster_webm_monitor.m3u + station: + control: {mode: 1, port: 16002} - infos: {description: TeleCaster WebM monitor stream, genre: Vocal, name: monitor.webm, short_name: monitor.webm, ++ infos: {description: TeleCaster WebM monitor stream, genre: Vocal, name: monitor_1.webm, short_name: monitor_1.webm, + url: 'https://www.parisson.com'} + jingles: {dir: /path/to/jingles, mode: '0', shuffle: '0'} + media: {bitrate: '512', dir: /usr/local/share/telecaster/media/webm, format: webm, ogg_quality: '4', + samplerate: '48000', shuffle: '0', voices: '1'} - record: {dir: /home/telecaster/trash/webm, mode: 1} - relay: {author: TeleCaster, mode: '1', url: 'http://127.0.0.1:8000/telecaster_live.webm'} ++ record: {dir: /home/telecaster/trash/webm/1, mode: 1} ++ relay: {author: TeleCaster, mode: '1', url: 'http://127.0.0.1:8000/telecaster_live_1.webm'} + rss: {dir: /var/www/rss, enclosure: '0', media_url: 'http://localhost/rss/'} + server: {host: 127.0.0.1, port: '8000', public: '0', sourcepassword: source2parisson, - type: icecast, mountpoint: monitor.webm} ++ type: icecast, mountpoint: monitor_1.webm} + twitter: {key: 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE, mode: '0', secret: 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4, + tags: bla bla}