I’m using Wowza to restream an IP camera live stream and do HLS streaming for playing back in multi devices. The problem is the latency of HLS, about 10s after some tuning, is not acceptable for surveillance. And I take into MPEG DASH streaming with hope in low-latency solution. But the trouble is even bigger, the latency ~ 30-60s
Hello there and welcome to the Wowza support forum.
HTTP streaming sends chunks to the client. The client needs 3 chunks cached before it starts playing.
By default Wowza is set to send 3, 10 second chunks in each packet sent to the client. You can modify this behavior by editing the Application.xml file.
This guide explains how to control how the Cupertino (iOS device) segmenter segments an incoming live stream:
As Salvadore mentioned, the key-frame interval is an important setting, since the chunks are created when a key-frame is received. They start with a key-frame. You will also need to properly configure the IP camera key-frame interval setting, so that smaller chunks can be generated on Wowza side. So a 1 key-frame per second or 1 key-frame every 2 seconds is a recommended IP camera video encoding setting.
Yes, that is correct. It is a balancing act between the size of the chunks and the smooth playback on the client side. Smaller chunk may provide lower latency of the stream, but for a playback client that doesn’t have enough bandwidth available, it is possible that his device might need more than 1 second to play back a 1 second media chunk. If this occurs, the user will experience a freeze in his playback, because the player will have to wait for the entire 1 second media chunk to be loaded in order to play it back. This will cause the latency of the live stream to increase, and can happen again when the player experiences another glitch in the network, causing longer download times.
So, when deciding on the media chunk sizes, you will have to consider multiple playback scenarios as well.
So the latency is because of the chunk buffering. I have set 01 second chunk duration to get 10 second latency of HLS streaming. It can not be reduced anymore.
I thought MPEG DASH had a better way to resolve it , but that’s it, we need another solution.
My low-end cameras from China does not let us configure the key-frame interval but the frame-rate setting. I’ll try to find out its H264 profile via ONVIF interface, but after digging this forum, it seems like getting <5 seconds latency of HTTP streaming is really difficult.