aboutsummaryrefslogtreecommitdiffstats
path: root/srt-server
blob: 99513b991980a785ca5167f5b9cd9c7f9ac00d04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -eux

# This worked somehow.
# srt-live-transmit 'srt://:60001?mode=listener&bandwidth=60000&timeout=10000' srt://:60000 -v

# 1mbps, see https://medium.com/@michael_70509/configuring-srt-properly-d89517354d0d
bandwidth="${SRT_BANDWIDTH:-250000}"
# 1 second in microseconds, see https://obsproject.com/wiki/Streaming-With-SRT-Or-RIST-Protocols.
timeout="${SRT_TIMEOUT:-2000000}"
latency="${SRT_LATENCY:-30}"
# Extra arguments must start with '&'
input_extra_args="${SRT_INPUT_EXTRA_ARGS:-}"
output_passphrase="${SRT_PASSPHRASE:-}"

srt-live-transmit \
	"srt://:60001?mode=listener&bandwidth=$bandwidth&timeout=$timeout&latency=$latency$input_extra_args" \
	"srt://:60000$output_passphrase" \
	-v