Recording on Jetvariety

1.Which seller did you purchase the product(s) from?

2.The Model number of the product(s) you have purchased?
B0266
3.Which Platform are you using the product(s) on?
Jetson Nano
4.Which instruction are you following?
https://github.com/ArduCAM/MIPI_Camera/tree/master/Jetson/Jetvariety/example
5.Has your product ever worked properly?

6.What problems are you experiencing?
Hello,

I have my module: https://www.arducam.com/product/arducam-1mp2-stereoscopic-camera-bundle-kit-for-raspberry-pi-nvidia-jetson-nano-xavier-nx-two-ov9281-global-shutter-monochrome-camera-modules-and-camarray-stereo-camera-hat/

I would like to record video into a file. On examples (https://github.com/ArduCAM/MIPI_Camera/tree/master/Jetson/Jetvariety/example) there is only usage with OpenCV VideoCapture with displaying. I cannot find any example of just simple recording to file. With simple IMX219 modules I used OpenCv.VideoWritter with gst but it does not work with this module.

Can you provide any samples how to do it?
7.What attempts at troubleshooting have you already made?

8.How would you like us to help you?

I am using Jetson Nano with Camera Hat Module and I am trying to record video into a file (like with raspivid -o vid.h264).

I guess that the best option would be to use GStreamer + (optional) OpenCV.

I have to admit here that I have really poor experience with GStreamer.

I managed to record video with Stream with:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,framerate=60/1,width=2560,height=800 ! queue ! videoconvert ! video/x-raw,format=RGBA ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test.mov -e sync=false

But it gives me only 9 fps in final video…

I also tried to do it with OpenCV:

gstIn = „v4l2src device=/dev/video0 ! video/x-raw,framerate=(fraction)60/1,width=2560,height=800 ! appsink sync=false”

Cap = cv2.VideoCapture(gstIn, cv2.CAP_GSTREAMER)

...

gst_out = "appsrc ! video/x-raw ! queue ! videoconvert ! video/x-raw,format=I420 ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test.mov sync=false"

Out = cv2.VideoWriter(gst_out, cv2.CAP_GSTREAMER, 0, 60, (2560, 800))


But writing to file takes too much time and there are many dropped frames in final video.

Could you provide solution to handle this case? Or please point out what I am doing wrong here?

 

 

Jetpack: 4.4, L4T32.4.4

My GStreamer version: 1.14.5

 

I did not find anything in docs (https://www.arducam.com/docs/camera-for-jetson-nano/multiple-cameras-on-the-jetson/camarray-arducam-1mp-stereoscopic-camera-bundle-kit/).

Hi here,
The low frame rate may be caused by software format conversion, you can try this:

https://developer.nvidia.com/embedded/dlc/l4t-accelerated-gstreamer-guide-24-2-1

Hey! Now it works perfectly! It was all about software conversions. Thank you so much!

Regards

Glad to hear that your problem has been solved,
If you have any other questions, please feel free to contact us

Hey, I actually encountered one more issue - not sure if it’s desired.

According to product description (https://www.arducam.com/product/arducam-1mp2-stereoscopic-camera-bundle-kit-for-raspberry-pi-nvidia-jetson-nano-xavier-nx-two-ov9281-global-shutter-monochrome-camera-modules-and-camarray-stereo-camera-hat/) :

Support Changing Frame Rate: You can change the frame rate from 5fps to 80fps
It should be possible to change frame_rate param.

In documentation (https://www.arducam.com/docs/camera-for-jetson-nano/multiple-cameras-on-the-jetson/camarray-arducam-1mp-stereoscopic-camera-bundle-kit/) you pointed out method to get custom params: v4l2-ctl -l. In the results you have params like gain, exposure and frame_rate.

However in my case there is no frame_rate param and when calling v4l2-ctl -c frame_rate=X it says that there is no such param as frame_rate.

For me v4l2-ctl -l gives:


User Controls

exposure 0x00980911 (int) : min=0 max=65535 step=1 default=681 value=100
gain 0x00980913 (int) : min=0 max=15 step=1 default=1 value=5
trigger_mode 0x00981901 (bool) : default=0 value=0
disable_frame_timeout 0x00981902 (bool) : default=0 value=0
frame_timeout 0x00981903 (int) : min=100 max=12000 step=1 default=2000 value=2000

Camera Controls

bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
write_isp_format 0x009a2068 (bool) : default=0 value=0
sensor_signal_properties 0x009a2069 (u32) : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=5 flags=read-only

What may be the issue? Do I have a different version? May it be connected to some software versions (Jetpack, v4l2)?

 

 

 

 

Hi ufoscoder

It seems that the version of the module in your hand is too old and may not support frame rate control