--- /dev/null
-VIDEO_WIDTH=864
-VIDEO_HEIGHT=480
+ #!/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
-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 \
++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
- ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live.webm
++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_$V4L2_ID.webm
+ > /dev/null
--- /dev/null
- infos: {description: TeleCaster WebM monitor stream, genre: Vocal, name: monitor.webm, short_name: monitor.webm,
+ deefuzzer:
+ log: /var/log/telecaster/telecaster_webm_monitor.log
+ m3u: /var/www/m3u/telecaster_webm_monitor.m3u
+ station:
+ control: {mode: 1, port: 16002}
- record: {dir: /home/telecaster/trash/webm, mode: 1}
- relay: {author: TeleCaster, mode: '1', url: 'http://127.0.0.1:8000/telecaster_live.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'}
- type: icecast, mountpoint: monitor.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_1.webm}
+ twitter: {key: 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE, mode: '0', secret: 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4,
+ tags: bla bla}