Answer the question
In order to leave comments, you need to log in
How can I organize a video broadcast from Raspberry pi b + with a minimum delay?
There is a task to organize a video broadcast from a standard Raspberry pi b + camera module with minimal delay and, most importantly, with correct operation in most browsers and devices. The video will then be displayed in php, running on the same raspberry under NGINX, i.e. it will be viewed by users through the browser.
Tried:
-RTMP (not suitable due to the fact that it is not supported by many devices already, that is, it requires the installation of additional players, etc.)
- mjpg-streamer (too slow)
- flash will not work, because almost all Android does not support it, in favor of html5
- WebRTC (cool, but again compatibility problems with different browsers, it was not possible to set up the work normally)
Answer the question
In order to leave comments, you need to log in
HTML5 does not yet support real-time broadcasting.
I cycle through websockets. Due to the need to convert each frame to base64, and also due to the impossibility of any compression other than mjpeg (more precisely, JPEGs are actually sent), the maximum frame rate that I achieved on 640x480 video turned out to be no more than 7 frames per second.
PS The previously used mjpeg was abandoned due to the fact that browsers are leaking, as a result, the frame with the video has to be regularly reloaded, which is inconvenient.
You need to install middleware - a media server that will convert on the fly to those protocols that will be understood by devices.
For the output, you need to provide RTMP and HLS as the main formats. On the desktop, RTMP will be played through Flash players, and HLS will go on mobile devices.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question