I had to hack it quite severely to get fast load with fair resilience for my usecase as the devices are restricted in performance and can have fairly low bandwidth. Since you're looking at a relatively fast connection, simply reducing the chunk size should get you to the target.
As a follow up - I've spent a couple years working on a video product based on WebRTC. This either works for a PoC where you just hack things together or on a large scale where you have time and resources to fight odd bugs and work through a spectrum of logistical hoops in setting it up. So unless you plan to have a large-ish deployment with people taking care of it I would stick to HLS or other simpler protocols.
RTMP protocol has a lot of implementations and is still widely used for the backend part of transmitting video at a low latency (i.e. from the recorder to the server).
RTSP with or without interleaved stream is another option.
DASH/HLS is a solution for worldwide CDN delivery and browser based rendering. Poorly suited for low latency.
If you need low latency and browser based rendering you need something custom.
I have used nginx-rtmp in the past - a very solid solution for my use case.
But this is also a little annoying to be forced to use flash to open the stream. I wonder if we could find something better now.
Speaking of nginx-rtmp, look like dev is stalled now. Anyone know if there is an alternative or someone who took over ?
https://webrtchacks.com/zoom-avoids-using-webrtc/
Some VNC services like noVNC and Xpra also uses WebSockets.
Sadly browsers do not come RTMP enabled.
Contact me if you want to discuss it further.
"8-12 seconds End-to-End Latency" for community edition.
Actually a commercial product is not necessarily a problem, but the monthly fees are. If there was a one time fee version (perhaps with limited number of clients or something), then this might work.
I also poked a round with making a real time remote desktop client that could be access via a web browser for linux. It to -- at least on local lans got very low latency video. The link for that is below too.
- https://www.youtube.com/watch?v=7kSbm-IQjK0
- https://www.youtube.com/watch?v=JJ_srz7Ti8Y
Edit: I should mention latency were measured in ms, not seconds, even for many clients. I am sure to scale out to 1000's of users I would have to add a bit, of latency but not by much.
That being said, the ffmpeg solution is not using the hardware accelerator either, even though it does support MJPEG. But I think with work we can get a gstreamer based solution: the missing part is an equivalent of ffserver that works with gstreamer. The hardware vendors like to provide gstreamer plug-ins for their accelerators.
Also, it's weird to me that this needs a giant javascript client library. What about the HTML5 built-in video support?
My code is geared to robots -- and has not been updated recently but there is at least a example of the simpler multiplexing in go.
Anyway, so I've tried many of the recent protocols. I was really hoping that HLS would work, because it's so simple. For example, I can use the gstreamer "hlssink" to generate the files, and basically deliver video with a one-line shell script and any webserver. But the 7 second best case latency is unacceptable. I really want 1 second or better.
I looked at MPEG-DASH: it seems equivalent to HLS. Why would I use it when all of the MPEG-DASH examples fall back on HLS?
I looked at WebRTC, but I'm too nervous the build a product around the few sample client/server code bases I can find on github. They are not fully baked, and then I'm really depending on a non-standard solution.
I looked a Flash: but of course it's not desirable to use it these days.
So the solution that works for me happens to be the oldest: Motion JPEG, where I have to give up on using a good video compression (MPEG). I get below 1 second latency, and no coding (use ffmpeg + ffserver). Luckily Internet Explorer is dead enough that I don't have to worry about its non-support of it. It works everywhere else, including Microsoft-Edge. MJPEG is not great in that the latency can be higher if the client can't keep up. I think WebRTC is likely better here.
Conclusion: here we are in 2019 and the best low latency video delivery protocol is from the mid-90s. It's nuts. I'm open to suggestions in case I've missed anything.