Last active
June 15, 2022 07:04
-
-
Save tetsu-koba/1b3752e6685c77d7458106fd493e666c to your computer and use it in GitHub Desktop.
SRT server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is sample for srt server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:22.04 | |
RUN apt-get update | |
RUN apt-get install -y gstreamer1.0-tools gstreamer1.0-plugins-bad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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