Video recording from a 4k camera to a SD card.
-
@Pavel-Ardashov It produces uncompressed NV21 format frames.
-
@Eric-Katzfey The documentation says about the ability to record 4k30 video. Currently, I don't care about the recording format.
I need to stream full hd and record 4k30 from camera M0025 -
Is it currently possible with VOXL to stream in Full HD and record 4k30 from the M0025?
-
Hi Pavel,
We need a little help clarifying your request. Your initial topic suggests "original quality" which means no compression. It seems you are looking to perform the following concurrently?
-> Record to SD Card, compressed, 4k30
-> RTSP stream 1080p?Right now that would require coding. We're working on a streamlined example coding package to do the same. We will report back here in a few days as we are working on this right now.
-
@Pavel-Ardashov Unfortunately, the current voxl-camera-server application has a couple of bugs that prevent it from streaming 720p out to a pipe for voxl-streamer while simultaneously taking 4k30 video, encoding it with h265, and writing into a file on the SD card. I made the code changes on a branch that will fix this here: https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-camera-server/-/tree/streaming-plus-capturing-hires. You can build this code and load it on to your Voxl. In addition you will need to change a couple configuration file entries. In
/etc/modalai/voxl-camera-server.conf
you can change the hires camera configuration to match this:"port_J2": { "name": "hires", "enabled": true, "type": "hires", "api": "hal3", "frame_rate": 30, "override_id": -1, "auto_exposure_mode": "isp", "preview": { "enabled": true, "width": 1280, "height": 720, "format": "nv21" }, "video": { "enabled": true, "width": 3840, "height": 2160, "format": "h265" }, "snapshot": { "enabled": false, "width": 1024, "height": 768, "format": "jpg" } },
And change
/etc/modalai/voxl-streamer.conf
like this:"hires": { "input": { "interface": "mpa", "mpa-camera": "hires" }, "output": { "stream": { "rotation": 0, "width": 1280, "height": 720, "decimator": 2, "bitrate": 5000000 } } },
If you do all of this you will get a 720p RTSP stream at 15fps and 5 Mbps for viewing on QGroundControl and also a file capture of 4k30 video encoded with h265. You can pull the capture file off of Voxl and view it with VLC.
-
Hi @Eric-Katzfey I tried this branch on my VOXL and while it seems to work I'm seeing a lot dropped frames and skipping in the recorded video, is this another known bug or is there a reason for this? Thanks
Edit: this doesn't seem to happen when recording at 1080p
-
@czarsimon Yes, it is a known bug and I am actively working on fixing this. 1080p and VGA seem to perform the best right now but 4k and 720p have problems. Hope to have a fix soon.
-
@Eric-Katzfey Could you please point me in the right direction for recording video to the VOXL SD card when using a UVC Linux based camera? You had mentioned using ffmpeg, but I cannot find anything else on the forums regarding this.
-
@Kris Unfortunately, we don't currently offer a solution for capturing video streams to SD card from a UVC camera. If you wanted to create your own solution you could likely start with some of our open source code and modify it. What UVC camera are you using?
-
@Eric-Katzfey Thank you for your response. I will try to create my own solution for this. In the possible case that the WiFi signal is lost during an indoor flight, I feel it is important to record RAW video to the SD card. The UVC camera is a Sony STARVIS IMX462. Any help or support with this would be very much appreciated.
-
@Kris You can start with our
voxl-uvc-server
application. The code is here: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-uvc-server. If you run it with the-s
option it will print out some information about any connected UVC cameras. There is also a utility calledshow-video-device-info.sh
that will also show some useful information. You may find that the camera can output encoded h264 video directly. Then you could simply start the camera and write the frames to a file. -
There is a new forum post here: https://forum.modalai.com/topic/889/how-to-stream-hires-camera-at-vga-resolution-and-simultaneously-capture-4k30-to-a-file that explains how to get beta access to a new package with the capability to stream from the hires camera at VGA resolution while simultaneously capturing HD 4k30 to a file.