I'm trying to save and stream the Raspi Camera trough wifi at 10FPS with a Rpi Zero W (no serverX)
I need to save in full frame and high resolution that suppose to use MJPEG codec. That is done by this command :
raspivid -md 2 -w 2592 -h 1944 -fps 10 -cd MJPEG -fl -f -t 0 -o videoOut.mjpeg
That is working fine and uses only 6% of CPU.
Then I need to stream in 640x480. My idea is to stream the preview from raspivid with a Rpi screen resolution set to 640x480.
To get very low latency I have to use WebRTC (https://github.com/mpromonet/webrtc-streamer).
I don't want to use UV4L to stay open source.
Webrtc-streamer manages screens but seems only with ServerX.
Does anybody have an idea?
Thanks!
It's difficult, or even impossible, to do low-latency streaming by screencasting a video preview window. There are simply too many steps that take a whole frame time each.
That's five frame times, or half a second at 10fps.
You're much better off capturing the compressed stream directly. The Broadcom RPi processor has video compression hardware built in, and can produce compressed data streams in just over one frame time. It can render the preview window concurrently with producing the compressed video stream.
And WebRTC handles the network aspects of streaming quite well.