Starling2 live streaming and video recording
-
I have a Starling2 Modalai drone and require assistance recording its live stream directly on my PC. Currently, QGroundControl saves recordings to Voxl2 instead of my PC. Could you please advise on how to save recordings locally and capture multiple video feeds simultaneously (hires_color, hires_grey, qvio_overlay, tof_depth, and tof_ir)? Thank you.
-
Hi @muhammad-kazim-0 ,
For saving h264 / h265 you can use
voxl-streamer
tool to serve the video via RTSP from VOXL2 and then on your host PC useffmpeg
orffplay
(or similar tools) to view / save the video. For simple playback of rtsp video, you can run a command on your linux PC :ffplay rtsp://<voxl-ip>:<rtsp-port>/live
-- the IP of voxl2 you can get usingifconfig
, the rtsp port will be printed out byvoxl-streamer
when it strarts up. You can run multiple instances ofvoxl-streamer
on different ports, please check help for this command-line tool.I would not recommend streaming uncompressed images for the purpose of recording the video. Just to clarify, any camera stream that is not named
*_encoded
is going to be uncompressed RAW8 or YUV format and when you view it usingvoxl-portal
, what happens is the back-end ofvoxl-portal
(running on voxl2) will take the original image from the requested stream and it will use JPG compression before sending the JPG to yourvoxl-portal
in the browser for viewing. Jpeg is a lot less efficient than h264/5, so you will need a lot more bandwidth. You can still use the jpeg approach if you really want to.For example, you can use ffplay to play the jpeg stream (this is kind of an undocumented feature):
ffplay -f mjpeg -framerate 30 -probesize 32 -analyzeduration 0 -fflags -nobuffer -flags low_delay -i http://<voxl-ip>/video_raw/<camera-stream-name>
Please note if you use these streams (which are generated by
voxl-portal
backend), if you also concurrently actually usevoxl-portal
in browser, the streams might interfere / stop.You should also be able to figure out how to use ffplay / ffmpeg to how save the file to disk.
If you have too many jpeg streams (especially high resolution camera), VOXL2 may not be able to keep up. Specifically for hires streams, you should definitely make use of the encoded streams.
You can always use the tool
top
on voxl2 to check the cpu usage of individual processes, specificallyvoxl-portal
to make sure it is not overloading the system. if the streams that you are getting are not the FPS that you are expecting, then it probably means that voxl2 cannot keep up with sending the streams (either encoding to jpg or limited network bandwidth).Please try this out and let me know if you have any questions.
Alex