Why does nvarguscamerasrc report a framerate of 30/1 rather than the actual framerate?

I’m using a Jetson Nano with a Raspberry Pi camera module. If I don’t explicitly specify a framerate then nvarguscamerasrc reports a framerate of 30/1 rather than the actual framerate:

$ gst-launch-1.0 -v nvarguscamerasrc num-buffers=60 \
    ! 'video/x-raw(memory:NVMM), width=3280, height=2464' \
    ! fakesink
...
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps =
    video/x-raw(memory:NVMM),
    width=(int)3280, height=(int)2464,
    format=(string)NV12,
    framerate=(fraction)30/1
...
GST_ARGUS: Running with following settings:
   ...
   Output Stream W = 3280 H = 2464 
   ...
   Frame Rate = 21.000000
...

So above we can see that it knows that Frame Rate = 21 however it fills in framerate=(fraction)30/1 and this is what’s seen by everything downstream in the pipeline.

If I specify an incorrect framerate then this is neither corrected nor does it result in an error:

$ gst-launch-1.0 -v nvarguscamerasrc num-buffers=60 \
    ! 'video/x-raw(memory:NVMM), width=3280, height=2464, framerate=120/1' \
    ! fakesink
...
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps =
    video/x-raw(memory:NVMM),
    width=(int)3280, height=(int)2464,
    format=(string)NV12,
    framerate=(fraction)120/1
...
GST_ARGUS: Running with following settings:
   ...
   Output Stream W = 3280 H = 2464 
   ...
   Frame Rate = 21.000000

Here I specified 120/1 and even though it can only capture at 21/1 at this width and height it doesn’t complain - it captures at 21/1 but reports 120/1 downstream in the pipeline.

This is a little frustrating - I don’t want to worry about the framerate and I’m happy to let the camera chose the rate, e.g. 21/1 above, but I want the actual rate reported in the pipeline rather than an incorrect default of 30/1 (if I don’t specify a framerate) or an incorrect rate if I specify an invalid framerate and the camera chooses a different one.

I can confirm that the incorrect framerate makes it all the way down the pipeline and is stored in any resulting video file:

$ gst-launch-1.0 -v nvarguscamerasrc \
    ! 'video/x-raw(memory:NVMM), width=3280, height=2464' \
    ! nvjpegenc \
    ! matroskamux \
    ! filesink location=out.mkv
...
Frame Rate = 21.000000
...
$ ffprobe -loglevel panic -show_streams out.mkv | fgrep r_frame_rate
r_frame_rate=30/1

Here Frame Rate = 21 but r_frame_rate=30/1 is reported for the resulting MKV file.

Is there any way to tell nvarguscamerasrc to report the actual framerate to the pipeline?

Hi,
We can reproduce it on r32.2. Checking and will update.

It has been half a year, what is the status on this issue?

Hi,
The issue is fixed in r32.3.1. Please upgrade and give it a try.