Gstreamer framerate not changing

Hi all. I have been successful in streaming and recording from a GMSL camera connected to my Jetson Xavier NX using these gstreamer commands:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! "video/x-raw(memory:NVMM), height=400, width=640, framerate=20/1" ! nvvidconv ! xvimagesink 

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! \
'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, \
format=(string)NV12, framerate=(fraction)20/1' ! nvv4l2h265enc \
control-rate=1 bitrate=8000000 ! 'video/x-h265, \
stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink \
location=test0.mp4 -e

However, I noticed that the saved video has a framerate of 30 fps, which appear to be the default value. No matter which value I choose, the result will always have 30 fps.
Anyone know what the problem could be?

Hi,
Configuring frame rate is not implemented in default code. Please download the source code and add the function. The source code is in
https://developer.nvidia.com/embedded/l4t/r32_release_v5.1/r32_release_v5.1/sources/t186/public_sources.tbz2

Thank you very much for your reply. Can I ask you if you can provide me instructions on how to build the source code to include this function? I am using Jetpack 4.4.1

@DaneLLL any chance you could give me some more information on how to add the function building from source code, for Jetpack 4.4.1?

Hi,
Please refer to
Lower the frame rate of Arudcam IMX219 cameras with Gstreamer on the CSI ports - #2

Thank you for the link but I am still not sure how to proceed. These are my questions:

  1. in the other topic, it says that is needed to download the nvarguscamerasrc source code. So do I need to build only the nvarguscamerasrc code from source or the whole Jetpack?
  2. from what I understand, what I need to do is add the setFrameDurationRange option, then I would be able to set the framerate by using fpsRange=“20.0 20.0”, is that correct?
  3. is it possible to have precise instructions on how to build (Jetpack or nvargsucamerasrc) from source adding this function?

Thanks for your help

Hi,
Yes, you would need to download the source code. There is README in the package. Please follow it to add the property, and rebuild/replace the lib.

Thank you @DaneLLL. Can I just ask you how to add that specific property? In the README there are no instructions or examples on how to add properties for nvarguscamerasrc
Also is the link you provided me for the source code for Jetpack 4.4.1?

Hi,
r32.4.4 is included in Jetpack 4.4.1. The source link is in the page:
L4T R32.4.4 archive | NVIDIA Developer

The implementation of nvarguscamerasrc is based on Argus APIs. You may refer to the code in

/usr/src/jetson_multimedia_api/samples$ grep setFrameDurationRange ./ -r
./10_camera_recording/main.cpp:    iSourceSettings->setFrameDurationRange(Range<uint64_t>(1e9/DEFAULT_FPS));
./09_camera_jpeg_capture/main.cpp:    iSourceSettings->setFrameDurationRange(Range<uint64_t>(1e9/CAPTURE_FPS));
./frontend/main.cpp:    iSourceSettings->setFrameDurationRange(Range<uint64_t>(1e9/30));
./13_multi_camera/main.cpp:    iSourceSettings->setFrameDurationRange(Range<uint64_t>(1e9/DEFAULT_FPS));