arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.35k stars 3.51k forks source link

Live broadcast streaming delay #1499

Open guitarpound opened 4 years ago

guitarpound commented 4 years ago

Describe the question Hi,

I setup the AVideo Server in LAN and then do live streaming (RTMP).

The problem is when I compare Video streaming output with the video source. It delay about 35-40 sec. Is it possible to reduce the latency time close to video source?

Thanks & BR,

sriman commented 4 years ago

Yes we can achieve 2 seconds sub latency

https://user-images.githubusercontent.com/2287197/38203115-bb277aee-36bb-11e8-90a2-e8ade888757a.png

guitarpound commented 4 years ago

Hi Sriman,

So, It depend on the Encoder setting. Right? I tried set the parameter same as your picture. But the latency still about 10-12 sec.

obs

Thanks & BR, Pond

sriman commented 4 years ago

No other than this I haven't configured anything, I have served through servers in which I could achieve 1.5 - 2 seconds delay, you are using LAN so it should be below 1 second.

ArvyRogerio commented 4 years ago

So, It depend on the Encoder setting. Right?

Not only. Screen size, encoding, decoding, internet speed + latency, etc. I use Nginx + RTMP + OBS, 1280px video, 128k audio, remote server, my latency is exactly 40 seconds, always.