Configuration reference
Https://github.com/simple-rtmp-server/srs/wiki/v2_CN_LowLatency
Latency Impact factors
Encoders: Different encoders (free or open source), the delay is also different.
Streaming Media server: SRS2
Streaming protocol: For example: RTMP is real-time high, http_flv is also high-real-time, HLS is not, the official said 60s can tolerate ...
Player: VLC is slower than Ffplayer and player.
Network: Of course, it is also related to the network, and the relationship is relatively large.
Video bitrate: 200k and 2M of the rate of this comparison, of course, can also be attributed to network reasons.
SRS Configuration Low Latency
Listen 1935;max_connections 1000;srs_log_tank file;srs_log_ file ./objs/srs.log;http_api { enabled on; listen 1985;} http_server { enabled on; listen 80; dir ./objs/nginx/html ;} stats { network 0; disk sda sdb xvda xvdb;} vhost __defaultvhost__ { min_latency on; mr { enabled off; #latency 350; } mw_latency 100; #enabled on; gop_cache off; queue_length 10; http_remux { enabled on; mount [vhost]/[app]/[stream].flv; hstrson; }}
Test
Encoder: OBS
Player: OSMF (http://www.ossrs.net/srs.release/releases/demo.html?ip=192.168.1.170)
Test protocol: RTMP, http-flv
Code Rate:
200K delay Rtmp:1-2s (1S7) http_flv:2s2
800K Delay Rtmp:2s HTTP_FLV:3S30
SRS rtmp http-flv Stream Low latency setting, testing