from copy import deepcopy
- VIDEO_PIPELINE_BASE="""{video_source} {video_options} client-name="webm_streaming_{id}_video" \
+ VIDEO_PIPELINE_BASE="""{video_source} {video_options} \
! {format}, width={width}, height={height}, framerate={framerate}/1 \
- ! queue ! {decoder} \
- ! queue ! videoflip method={flip} \
- ! queue ! videoconvert \
- ! queue ! vp8enc threads=4 deadline=2 target-bitrate={vp8_bitrate} \
- ! queue ! muxout. \
+ ! {decoder} \
+ ! videoflip method={flip} \
+ ! videoconvert \
+ ! vp8enc threads=4 deadline=2 target-bitrate={vp8_bitrate} \
+ ! muxout. \
{audio_source} {audio_options} client-name="webm_streaming_{id}_audio" ! audio/x-raw, format=F32LE, channels={channels} \
- ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \
- ! queue ! volume volume={gain_pre} \
- ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \
- ! queue ! volume volume={gain_post} \
- ! queue ! audiodynamic characteristics=hard-knee mode=compressor threshold=0.95 ratio=0.001 \
- ! queue ! audioconvert \
- ! queue ! opusenc bitrate={opus_bitrate} \
- ! queue ! muxout. \
+ ! audiocheblimit mode=high-pass cutoff=120 poles=4 \
+ ! volume volume={gain_pre} \
+ ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \
+ ! volume volume={gain_post} \
+ ! audiodynamic characteristics=hard-knee mode=compressor threshold=0.95 ratio=0.001 \
+ ! audioconvert \
+ ! opusenc bitrate={opus_bitrate} \
+ ! muxout. \
webmmux streamable=true name=muxout \
- ! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live_{id}.webm
+ ! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live_{id}.webm > /dev/null
"""
- AUDIO_PIPELINE_BASE="""{audio_source} {audio_options} client-name="mp3_audio_streaming" ! audio/x-raw, format=F32LE, channels={channels} \
- ! audiocheblimit mode=high-pass cutoff=120 poles=4 \
- ! volume volume={gain_pre} \
- ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \
- ! volume volume={gain_post} \
- ! audiodynamic characteristics=hard-knee mode=compressor threshold=0.95 ratio=0.001 \
- ! audioconvert \
- ! lamemp3enc quality={mp3_quality} \
- ! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live.mp3
-AUDIO_PIPELINE_BASE="""{audio_source} {audio_options} ! audio/x-raw, format=F32LE, channels={channels} \
++AUDIO_PIPELINE_BASE="""{audio_source} {audio_options} \
++ ! audio/x-raw, format=F32LE, channels={channels} \
+ ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \
+ ! queue ! volume volume={gain_pre} \
+ ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \
+ ! queue ! volume volume={gain_post} \
+ ! queue ! audiodynamic characteristics=hard-knee mode=compressor threshold=0.95 ratio=0.001 \
+ ! queue ! audioconvert \
+ ! queue ! lamemp3enc quality={mp3_quality} \
+ ! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live.mp3 > /dev/null
"""
+BOOT_TIME_DELAY = 0
+
+DEFAULT_CONFIG_FILE = "/etc/telecaster/telecaster.yml"
+
class TeleCasterGStream(Thread):