Hi,
I am using a Jetson Nano (JP4.4) and a raspberry pi v2 camera (IMX219) and currently recording RAW videos at 120fps using the v4ctl library. I am powering the device using a microusb cable (5V 2.1A). When I just stream images using this command,
v4l2-ctl -d /dev/video0 -csensor_mode=4 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=600
I get the following output:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 122.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.50 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.33 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.25 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.40 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.33 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.28 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.25 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.33 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121.30 fps
i.e it is stable at ~120fps.
When I try to save the raw file using this command
v4l2-ctl -d /dev/video0 -csensor_mode=4 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=10000 --stream-to=FILE.raw
i get this output:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 119.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 109.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 90.33 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 79.50 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 69.96 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 66.50 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 62.10 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 59.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 56.65 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^X<<< 54.74 fps
So the frame rate seems to drop very quickly and it slows down.
I thought that maybe 120fps might be an issue so I changed the framerate to 60fps by modifying the csensor_mode using this command:
v4l2-ctl -d /dev/video0 -csensor_mode=3 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=600
and I got stable 60fps streaming. When I tried to save the file, I noticed this
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.39 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 59.90 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.13 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.25 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 49.04 fps
<<<<<<<<<<<<<< 49.50 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 51.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 52.18 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 52.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 51.09 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 49.95 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 48.87 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 48.03 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 47.28 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 46.66 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 46.12 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 45.62 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 45.17 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 44.84 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 44.50 fps
So even at 60fps, it seems to be slowing down the framerate when it drops.
I was wondering:
[1] why is there such a slow down in fps when saving the file?
[2] Is there some other way to save this raw output so that I can have a stable frame rate at 120fps? I only need to acquire 5-10 seconds of video data.