Record video with from two OV9782 cameras in stereo
-
Hi
I am running on the VOXL2 and have two of these OV9782 cameras with a stereo flex cable. I am trying to get a simple video recording working. I ran voxl-camera-server and then voxl-record-video and get the following error.
waiting for server at / run/mpa/stereo_grey/ error, can only record pipes with type h264 or h265
Stereo_grey is the name of the pipe when I list the pipes.
-
@restore There are other ways to record video depending on what you are trying to accomplish. voxl-logger can log those outputs and save them as individual png images. This can then be replayed using voxl-replay and viewed in voxl-portal. Or you can stream using voxl-streamer and record the stream using vlc or similar.
-
@restore ,
voxl-record-video
is designed to record encoded streams. Can you please describe your use case in more detail, I can help you. Specifically, do you want to record raw images or h264/h265, do you want the recordings to be separate for left and right camera or in a single video? Is this just for debugging purposes or you want a stable solution that will be used to recording the video in your project? -
@Alex-Kushleyev I was able to get both cameras recorded using voxl-streamer and VLC.
For our project, we would like to record video on each camera separately during flight. How do I set up the cameras to be visible/accessible in QGroundControl? Is there a way to configure it to save videos in 2 minute clips or something similar?
Thank you!
-
@restore , I am personally not an expert in QGroundControl and whether you can view multiple camera streams there..
It seems you figured out how to do what you need using voxl-streamer (did you encoded one double image or two separate h264/5 streams?)
we don't have ability to break up the video into chunks, but you could modify the
voxl-record-video
tool to do this.BTW, when you record video using
voxl-record-video
, the resulting video is not in a media container, so it will not play in VLC, but you can fix it usingffmpeg
(adjust arguments accordingly):ffmpeg -r 30 -i voxl-record-video.h264 -codec copy videofile.mp4
If you are asking whether it is possible to have QGroundControl to save videos in 2 minute chunks, that I also do not know (maybe check px4 forums)
-
@restore The way to view multiple cameras on QGC is to use multiple instances of voxl-streamer, each streaming one camera to a dedicated port. Then use voxl-mavcam-manager to advertise each of those cameras using the Mavlink camera protocol. Then, in QGC you can choose which camera you want to see and start recording, take snapshots, etc. But voxl-mavcam-manager is still under development so not the easiest to work with right now.
-
Thank you - I was able to make it work for one camera with the following changes.
etc/modalai/voxl-camera-server.conf
- changed
"camera_id_second":
to -1 to get just one camera, - changed
"en_preview":
to false, - Added:
"en_small_video": true, "small_video_width": 1280, "small_video_height": 800,
- restart voxl-camera-server service
etc/modalai/voxl-streamer.conf
"input-pipe": "stereo_small_encoded"
etc/modalai/voxl-mavcam-manager.conf
"video_record_pipe_name": "stereo_small_encoded",
- changed