56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
# SRT with short streamid format and default_mode=publish
|
|
# For publishing: ffmpeg -re -i source.flv -c copy -pes_payload_size 0 -f mpegts 'srt://127.0.0.1:10080?streamid=live/livestream'
|
|
# For playing: ffprobe 'srt://127.0.0.1:10080?streamid=#!::r=live/livestream,m=request'
|
|
# For playing HTTP-FLV: ffprobe 'http://127.0.0.1:8080/live/livestream.flv'
|
|
|
|
listen 1935;
|
|
max_connections 1000;
|
|
daemon off;
|
|
srs_log_tank console;
|
|
|
|
http_api {
|
|
enabled on;
|
|
listen 1985;
|
|
}
|
|
|
|
http_server {
|
|
enabled on;
|
|
listen 8080;
|
|
dir ./objs/nginx/html;
|
|
}
|
|
|
|
srt_server {
|
|
enabled on;
|
|
listen 10080;
|
|
maxbw 1000000000;
|
|
connect_timeout 4000;
|
|
peerlatency 0;
|
|
recvlatency 0;
|
|
latency 0;
|
|
tsbpdmode off;
|
|
# Whether to enable too-late packet drop.
|
|
# When enabled, packets arriving later than the latency window will be dropped,
|
|
# which prevents buffer overflow and 100% CPU usage caused by retransmission storms.
|
|
# See https://github.com/ossrs/srs/issues/4587
|
|
tlpktdrop on;
|
|
sendbuf 2000000;
|
|
recvbuf 2000000;
|
|
payloadsize 1316;
|
|
# Short streamid format (without #!::) will be treated as publisher by default.
|
|
# This allows: srt://host:port?streamid=live/stream to publish directly.
|
|
default_mode publish;
|
|
}
|
|
|
|
vhost __defaultVhost__ {
|
|
srt {
|
|
enabled on;
|
|
srt_to_rtmp on;
|
|
}
|
|
|
|
http_remux {
|
|
enabled on;
|
|
mount [vhost]/[app]/[stream].flv;
|
|
}
|
|
}
|
|
|