Is there drop any frame in capturing video?

I have a Jetson Xavier NX with custom carrier board. I capture video from a SDI input with OpenCV in python or Gst-launch-1.0 without process. Camera is configured to 1280x720 with 50 FPS. It seams that I lost some frames during capturing video. Is there any sure way or test to know if we have frames drop or not?

Not sure about how to check frame rate in OpenCV. This would need other users to share experience. In gst-launch-1.0 command, you can use fpsdisplaysink like:

$ gst-launch-1.0 -v ... ! ... ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0

Thank you for reply.
I run this command:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,width=1920, height=1080, framerate=50/1 ! fpsdisplaysink text-overlay=0 video-sink=autovideosink sync=0 -v

and I get this overlay:

/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 204, dropped: 0, current: 50.00, average: 49.76

If the drop is equal to zero in all of overlays, this means I’m sure there are no drops?

Looks like it can be in stable 50fps in gst-launch-1.0 command. The video source looks good. For checking frame rate in OpenCV, would see if other users can share experience.

1 Like

My experience in openCV is that there’s more happening than just camera capture. So sure you can measure time from start capturing until you have processed it, but that is measuring something else than the true camera FPS.

My experience is that above works well, with the fpsdisplaysink, to ensure that the camera can provide proper framerate unfortunately its more to the story than that, but a good start to know what you can expect from the camera.

Or you can run this:
v4l2-ctl --set-fmt-video=width=1920,height=1080 --stream-mmap --stream-count=-1 -d /dev/video0

Hello magnus.gabell,
Thank you for your reply.
After run that command I got this:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 49.99 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.00 fps

As far as I understand, these β€œ<” represent the frames.
Sometimes number of these β€œ<” are equal to 50, but why sometimes are number of these equal to 49 or 51?

Is there a way to directly access the image (camera) buffer and manipulate it directly? Without the interference of high-level libraries like gstreamer or opencv.

We suggest try jetson_multimedia_api. For capturing frame data through v4l2, please check the sample and give it a try:


Yo can install the package through SDKManager or apt-get install command.

To be honest i dont know how the gstreamer calculates the framerate. But it is as close to your true FPS I know how to get. There is little overhead running this command compared to openCV in python or especially (of course) showing to screen.

Does this sample use Argus library?
I ran that samples, but with a usb camera. My camera is a SDI camera that output of that converted to MINI PCIe and given to jetson.
Which of them can be run with this camera?

Is there difference between V4L and Argus libs?
I want to reduce latency of accessing to buffer of image without any drop. Which of these libs are better to use? Can I use them in Python or can they only be used in C++?