josephnhtam / live-streaming-server-net

A .NET implementation of RTMP live streaming server, supporting HTTP-FLV, WebSocket-FLV, HLS, Kubernetes, cloud storage services integration and more.
https://josephnhtam.github.io/live-streaming-server-net/
MIT License
74 stars 11 forks source link

Minimize delay on displaying local RTMP-Stream #12

Closed Luk4s93 closed 2 months ago

Luk4s93 commented 2 months ago

Hi, first of all thank you for this project!

I am using it in a .NET MAUI Application on iOS, where an iPhone is not only the RTMP-Server but also the Client, showing the RTMP-Livestream on the screen.

I want to show the stream along a view of the camera of the iPhone itself, my problem is the delay of ~2sec I get between both views. The only setting I found which could have impact was on RtmpServerConfiguration the setting EnableGopCaching. But changing it had no impact at all.

Is there any caching/delay/latency setting I've missed?

Thanks in advance!

josephnhtam commented 2 months ago

Hi, Luk4s93.

This library doesn’t add any intentional latency. Setting EnableGopCaching to false can generally help, however, it might not be noticeable when the keyframe interval is low. Additionally, latency can also result from the buffering time on the receiving side.