I am trying to change multimedia sample 12 on orin so it support RGBA pixel format but the example failed. I get that buffer size that i get different from suppose to be.
Can anyone help me with it?
I am trying to change multimedia sample 12 on orin so it support RGBA pixel format but the example failed. I get that buffer size that i get different from suppose to be.
Can anyone help me with it?
Hello Eamo,
The 12_camera_v4l2_cuda sample is written assuming a YUV422 packed camera format, if you want to learn more about it check this out.
So according to that, the buffer size is width * height * 2 bytes (2 bytes per pixel). If you switch the camera to an RGBA-type format, you now have 4 bytes per pixel, but the sample code is still expecting YUV422 sizes and layout. That’s why you see the buffer-size mismatch.
So you will need to change the buffer size logic according to the format fize.
Let me know if this helps you and feel free to show me the logs and code where you have problems.
Best regards,
Pedro
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com
Thank RidgeRun team for the quick suggestion and guidance.
I get warning camera v4l2 buf length is not expected buf.length:8818944 ctx->g_buff[index].size: 8388608 for resolution 1920x1080
When i am trying YUYV format i also get warning:
buf.length:4671744 ctx->g_buff[index].size:4194304
In both cases the enqueue operation failed
Hi,
Please follow the steps and see if you can launch the camera in gst-launch-1.0 command through v4l2src plugin:
Jetson Nano FAQ
I dont want to use gstreamer.
I want to use the samples of multimedia.
Can you tell me what gstreamer v4l2src element use by default? MMAP or DMABUF?
Hi,
By default RGBA is not supported in 12 sample. Would suggest try gstreamer commands first. To confirm you can capture good frame data in gst-launch-1.0 command.
Can you give me example of command of gstreamer v4l2src element using dmabuf