Skip to content

Instantly share code, notes, and snippets.

@tetsu-koba
Last active June 15, 2022 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tetsu-koba/1b3752e6685c77d7458106fd493e666c to your computer and use it in GitHub Desktop.
Save tetsu-koba/1b3752e6685c77d7458106fd493e666c to your computer and use it in GitHub Desktop.
SRT server
This is sample for srt server
version: "3.2"
services:
publisher001:
image: koba/srt
build: .
volumes:
- .:/root/srt
expose:
- "7001-7002/udp"
ports:
- "7001:7001/udp"
- "7002:7002/udp"
entrypoint: /root/srt/srt_server.sh 7001 7002
restart: always
publisher002:
image: koba/srt
build: .
volumes:
- .:/root/srt
expose:
- "7003-7004/udp"
ports:
- "7003:7003/udp"
- "7004:7004/udp"
entrypoint: /root/srt/srt_server.sh 7003 7004
restart: always
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y gstreamer1.0-tools gstreamer1.0-plugins-bad
#!/bin/sh -eu
RECVPORT=$1
RECVLATENCY=200
SENDPORT=$2
SENDLATENCY=200
while :; do
sleep 2
gst-launch-1.0 \
srtserversrc uri="srt://:$RECVPORT" latency=$RECVLATENCY ! \
queue leaky=2 ! srtserversink uri="srt://:$SENDPORT" latency=$SENDLATENCY
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment