Raspberry Pi Camera Tuning Profiles

I’m using an Arducam OV5647 with a Rock 3C. I finally figured out how to get MPP to work and can successfully push video to Youtube and write a file to the disk at the same time. But if I use the Raspberry PI Camera V2 Overlay I get these errors :

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../sys/v4l2/gstv4l2src.c(659): gst_v4l2src_decide_allocation (): 
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.013661988
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): 
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...

However if I use the Raspberry Pi Camera V1.3 overlay, I get everything to work but the image is very green. Hence the need for the tuning file.

Hi Cgorton

ROCK 3C support Rpi V2 camera now, but we didn’t tune the Rpi Camera V1.3(OV5647), We are now doing the work to upgrade the kernel version from 4.19 to 5.10, and at the same time we tuning the Rpi camera V1.3, we will release the image with 5.10 kernel and with the support of Rpi Camera V1.3 at end of June.

Nice, perfect! I’ll keep an eye on the releases and start testing as soon as its posted.

We’re passed the middle of July and still no official release on the new kernel.

I tried the test builds 2 and 3 and still no tuning files for the V1.3(OV5647) cameras. I ordered a V2(IMX219) camera since the official B33 release says it the only camera supported…and it doesn’t look like a tuning file is being used on the official release.

on further investigation I found the iq files (the actual tuning files) and have them on my device. I also have a bunch of other stuff like rkaiq_3a_server running now.

But I still can’t get the ISP to accept an iq file and thus the image isn’t tuned. I did notice i get error in dmseg :
rkisp rkisp-vir0: can not get first iq setting in stream on

so I think I’m still missing something which is keeping the ISP from receiving an iq file.

ROCK 3C with 5.10 kernel is here:

RPi camera should be already supported and tuned. Please test it and report bugs to @Peter.Wang if you meet any.

Any help on how to use them?

I don’t see them in the /etc/iq_files directory and when recording video with Gstreamer it’s still very green.

Installed the desktop version of the test-build-5 and the tuning files are there and being used.

I can use cheese and gstreamer to get video and the video looks great.

But now I have a new problem, when I use software h264 encoding it’s slow but work. When using mpp get errors.

command : sudo gst-launch-1.0 v4l2src device=/dev/video0 ! mpph264enc ! queue! h264parse! mpegtsmux! filesink location=test123.mp4

and the errors :
rga_api version 1.3.1_[11] (RGA is compiling with meson base: $PRODUCT_BASE)
10000 is unsupport format now,pilese fix.
10000 is unsupport format now,pilese fix.
10000 is unsupport format now,pilese fix.
10000 is unsupport format now,pilese fix.
10000 is unsupport format now,pilese fix.
10000 is unsupport format now,pilese fix.
RgaBlit(1356) RGA_BLIT fail: Invalid argument RgaBlit(1357) RGA_BLIT fail: Invalid argument
fd-vir-phy-hnd-format[16, (nil), (nil), (nil), 0]
rect[0, 0, 1920, 1080, 3840, 1080, 65536, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[26, (nil), (nil), (nil), 0]
rect[0, 0, 1920, 1080, 1920, 1088, 2560, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
…/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.223337578
Setting pipeline to NULL …
Freeing pipeline …

It works!!

I had to specify the pixel format to get the pipeline to be happy. I added “video/x-raw,width=1920,height=1080,format=NV12” to my command and it all works as expected. Low CPU usage, low power, 30 fps, and good looking video

the final command was :
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,format=NV12 ! mpph264enc ! queue! h264parse! mpegtsmux! filesink location=test123.mp4