GStreamer nvv4l2camerasrc plugin doesn't respecting set framerate

Hi NVIDIA Team,

I am currently working with JetPack 6.1. My camera supports two frame rates, 30 FPS and 60 FPS, at a resolution of 1920x1536. By default, it is configured to 30 FPS.

However, I am unable to stream at 60 FPS using the following command:

gst-launch-1.0 nvv4l2camerasrc device=/dev/video5 ! ‘video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1536, framerate=(fraction)60/1’ ! nvvidconv ! autovideosink

When I run this command, the stream remains at 30 FPS instead of switching to 60 FPS.

If I use v4l2src instead of nvv4l2camerasrc, it works fine. See the command below:
gst-launch-1.0 v4l2src device=/dev/video5 ! ‘video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1536, framerate=(fraction)60/1’ ! fpsdisplaysink video-sink=xvimagesink text-overlay=true sync=false -v

Could you please help me understand why nvv4l2camerasrc is not streaming at 60 FPS and suggest a possible solution?

Thanks

Hi,

For the camera basic functionality first needs to check the device and driver configuration.
You can reference to below program guide for the detailed information of device tree and driver implementation.

Please refer to Applications Using V4L2 IOCTL Directly by using V4L2 IOCTL to verify basic camera functionality.

Once confirm the configure and still failed below link help to get log and some information and some tips for debug.

Thanks!

Hi
We have implemented proper s_frame_interval & g_frame_interval in the camera driver.

nvidia@nvidia-desktop:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'UYVY' (UYVY 4:2:2)
		Size: Discrete 1920x1536
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.017s (60.000 fps)
	[1]: 'NV16' (Y/CbCr 4:2:2)
		Size: Discrete 1920x1536
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.017s (60.000 fps)

If I try to set the frame rate using nvv4l2camerasrc, the s_frame_interval call does not happen, whereas in v4l2src, it is called.

Could you please let me know why this happens and suggest any possible solutions?

Hi NVIDIA Team,

Any comments?

Thanks

Hi,

Please apply the attached lib in /usr/lib/aarch64-linux-gnu/gstreamer-1.0/ and see if it works
Before replace a file, you could back up original file to cross check.

md5sum libgstnvv4l2camerasrc.so
2a30924a10de033ed6b3d7301861db0b  libgstnvv4l2camerasrc.so

r36_4_TEST_libgstnvv4l2camerasrc_1.zip (12.4 KB)

Thanks

Hi NVIDIA Team,
It works now! I am able to switch between 30 and 60 FPS using the latest shared libgstnvv4l2camerasrc.so.

One more clarification: Whenever I try to stream using nvv4l2camerasrc, I see the following message in the dmesg log:

nvmap_alloc_handle: PID 3445: gst-launch-1.0: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.

Could you please explain what causes this and whether it is an issue or not?

Thanks.