Save RAW image and video of IMX477 image sensor

Hi all,

I am trying to save raw images or videos with a 10 or 12 bit depth using the IMX477 image sensor (The sensor supports 10 or 12 bit depth). However, I have encountered some errors with the pipeline I am using. It seems that the sensor does not support the format r210 and I have also tried other 10 bit depth formats listed here with no success.

Does the nvarguscamerasrc support saving raw images of the IMX477 sensor?
If so, can anyone suggest a way to save raw images or videos with a 10 or 12 bit depth?
Any help would be greatly appreciated.

Here is my pipleline

def pip_video(exp):
return “nvarguscamerasrc wbmode=0 aelock=true awblock=true sensor-id=0 exposuretimerange = "”+ str(exp)+" “+str(exp)+”" ispdigitalgainrange="1 1" gainrange="10.625 10.625" ! video/x-raw(memory:NVMM), width=(int)4032, height=(int)3040,format=(string)r210, framerate=(fraction)30/1, exposurecompensation=0 ! tee name=t t. ! queue ! nvvidconv ! videobalance brightness=0 saturation=1 contrast=1 ! video/x-raw, format=(string)I420, width=4032, height=3040 ! appsink sync=0 ";


Error opening bin: could not link nvarguscamerasrc0 to t, nvarguscamerasrc0 can’t handle caps video/x-raw(memory:NVMM), width=(int)4032, height=(int)3040, format=(string)r210, framerate=(fraction)30/1, exposurecompensation=(int)0

no, it’s not supported.
please use v4l commands for saving Raw files.
for example,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=4032,height=3040,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw

Thank you Jerry.

But I need to capture the image with 4032 x 3040 @ 30fps.
I saw the v4l2 do not support this resolution

Is there any other options that I can follow?

hello riul5627k,

please check $ v4l2-ctl -d /dev/video0 --list-formats-ext for available sensor modes.

Hi, Thank you

Now I checked v4l2 supports 4032 x 3040 @30 fps.
But it still returns empty test.raw file.
The command did not end or return any warnings or errors.

Here, is my code

b@b-desktop:~/Desktop$ v4l2-ctl --list-devices
vi-output, imx477 7-001a (

b@b-desktop:~/Desktop$ v4l2-ctl -d /dev/video0 --list-formats-ex
Index : 0
Type : Video Capture
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 4032x3040
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)

b@b-desktop:~/Desktop$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=4032,height=3040,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap=4 --stream-count=1 --stream-to=test.raw

this looks incorrect. please try again as following.
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=4032,height=3040,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw

Thank you but --stream-mmap with out “=4” also returns same results.

hello riul5627k,

can you access to the camera stream correctly?
can this v4l pipeline executed to test the camera stream. $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=4032,height=3040,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100
please also share kernel logs for reference if you’re seeing failures. i.e. $ dmesg > logs.txt

Hello JerryChang.
The camera still doesn’t work
The kernel logs is below.

[520684.000869] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 1640625 has been capped to VI’s max BW 1500000
[520684.290629] video4linux video0: frame start syncpt timeout!0
[520684.498614] video4linux video0: frame start syncpt timeout!0
[520684.706724] video4linux video0: frame start syncpt timeout!0
[520684.915240] video4linux video0: frame start syncpt timeout!0

I found some way to solve this issue, but I don’t know how to patch. There is no imx477_mode_tbls.h file in my jetson (my jetpack version is 4.4). Could you give me some advice?

hello riul5627k,

that’s because JP-4.4 did not support IMX477 by default.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.