-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
migrate_v4_EN_sample srt
HOME > EN > SRT > SRT Sample
Delivery SRT by SRS:
Suppose the server ip is 192.168.1.170
Step 1, get SRS. For detail, read GIT
git clone https://github.com/ossrs/srs
cd srs/trunk
Or update the exists code:
git pull
Step 2, build SRS. For detail, read Build
./configure --srt=on && make
Remark: Recommend srs-docker to run SRS and FFMPEG.
Step 3, config srs. Please read SRT.
Save bellow as config, or use conf/srt.conf
:
# conf/srt.conf
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
srt_server {
enabled on;
listen 10080;
}
vhost __defaultVhost__ {
}
Note: About more parameters, please see SRT Parameters.
Note: More discussion about SRT, please read #1147.
Step 4, start srs.
./objs/srs -c conf/srt.conf
Step 5, start encoder.
Use FFMPEG to publish stream:
for((;;)); do \
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.flv \
-c copy \
-f mpegts "srt://192.168.1.170:10080?streamid=#!::r=live/livestream,m=publish"; \
sleep 1; \
done
The stream in SRS:
- RTMP url:
rtmp://192.168.1.170/live/livestream
Step 6, play RTMP stream.
RTMP url is: rtmp://192.168.1.170:1935/live/livestream
User can use vlc to play the RTMP stream.
Or, use online SRS player: srs-player
Note: Please replace all ip 192.168.1.170 to your server ip.
Winlin 2020.01
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: