ltebean / Live

Demonstrates how to build a live broadcast app(Swift 3)
2.41k stars 419 forks source link

Latency issue #9

Closed garudaonekh closed 7 years ago

garudaonekh commented 8 years ago

Hi, Thanks for sharing the great code. I try it with DigitalOcean server and choose the Singapore Data Center as it's closest to me.

There's a problem with delay in the live video(Latency).

Do you have any suggestion on hosting or configuration to do to reduce it to the minimum?

Thanks

ltebean commented 8 years ago

for how many seconds?

garudaonekh commented 8 years ago

around 1 second.

ltebean commented 8 years ago

1s delay is already very short generally, the acceptable range for rtmp delay is 2-4s

garudaonekh commented 8 years ago

I have seen Bigo Live. its delay is 10-500ms(My guess)--nearly real time. I think it's even better than Facebook live. Just wonder how they achieve it.

San-Jeevan commented 8 years ago

theoretically if you are in same country as the relaying server you can get around 300ms. Remember the latency will be like this:

but too many factors here. your device has to have good enough CPU.

Also I dont know Bigo Live, but they may be using webrtc? Device-2-device streaming without relaying server.

//edit: jsut seen bigo live, they dont use webrtc as its multicasting.

garudaonekh commented 7 years ago

@San-Jeevan: Thank you so much for explaining in detail. Much appreciated!