Videorate gstreamer plugin

Hi all,

I’m trying to set fps as 5 or 8 with my gstreamer command.
But I can’t use videorate with nvvidconv. Actually I can use videoconvert instead of nvvidconv for changing format but it’s performanc is bad.
Could you let me know how can I use video rate with nvvidconv?
Here is my gstreamer sample.

  1. gst-launch-1.0 v4l2src device=/dev/video0 ! “video/x-raw, format=(string)UYVY, width=(int)1920,height=(int)1080” ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420” ! nvoverlaysink sync=false

  2. str_gst_launch = “v4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=UYVY !
    nvvidconv ! video/x-raw(memory:NVMM), format=I420 ! nvjpegenc quality=95 ! appsink name=mysink”;

  3. str_gst_launch = “v4l2src device=/dev/video3 ! video/x-raw,width=1920,height=1080,format=UYVY !
    nvvidconv ! video/x-raw(memory:NVMM) ! nvvidconv ! video/x-raw, format=BGRx ! appsink name=mysink”;

Thanks in advance.

I found below command is working well with usb camera but gmsl camera doesn’t work with it.

gst-launch-1.0 v4l2src device=/dev/video0 ! “video/x-raw, format=(string)UYVY, width=(int)1280,height=(int)720” ! videorate ! video/x-raw,framerate=5/1 ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420” ! nvoverlaysink sync=false

Could you let me know what is the difference when I use gstreamer command between gmsl and usb camera?

Hi,
Please share the information of the gmsl camera:

$ v4l2-ctl -d /dev/video0 --list-formats-ext

And reease version( $ head -1 /etc/nv_tegra_release )

Hi @DaneLLL

Here is my camera and version info.

ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘UYVY’
Name : UYVY 4:2:2
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 1280x960
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)

R32 (release), REVISION: 2.1, GCID: 16294929, BOARD: t210ref, EABI: aarch64, DATE: Tue Aug 13 04:28:29 UTC 2019

Hi,
The capability looks same as the usb camera. Also support 720p30 and UYVY format. The gstreamer command should be the same. Do you see any error in launching the gmsl camera?

@dongjin.ha

trying using " videorate max-rate=5", it allows you to use videorate with video/x-raw(memory:NVMM)

@DaneLLL
Yes, it’s same capability with my usb camera.
I could see below error log and it’s only shown when I run gmsl camera.
Do you think it’s the problem?

0:00:00.664476209 11321 0x5595605320 WARN v4l2src gstv4l2src.c:911:gst_v4l2src_create: Timestamp does not correlate with any clock, ignoring driver timestamps

@nicholas.leong
Thank you for your comment.
I run below command but it’s same. I could not see the preview with below command.

gst-launch-1.0 v4l2src device=/dev/video1 ! “video/x-raw, format=(string)UYVY, width=(int)1920,height=(int)1080” ! videorate ! video/x-raw,max-rate=5 ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420” ! nvoverlaysink sync=false

The pipeline is wrong, it should be

gst-launch-1.0 v4l2src device=/dev/video1 ! “video/x-raw, format=(string)UYVY, width=(int)1920,height=(int)1080” ! videorate max-rate=5 ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420” ! nvoverlaysink sync=false

Hi @nicholas.leong

Thank you for your comment.
But unfortunately I could see the same problem.
With your command, I could run ubs camera without any problem. But gmsl camera still has the issue.
I could see below warning log after enabling debug log level 2.

0:00:00.577083940 8197 0x55aba2fc00 WARN v4l2src gstv4l2src.c:911:gst_v4l2src_create: Timestamp does not correlate with any clock, ignoring driver timestamps

Hi @DaneLLL

I found that error log is shown when I run camera well without videorate plugin.
So I think the error log is not a problem.

Hi,
Does the gmsl camera work in a pipeline without videorate?

gst-launch-1.0 v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)UYVY, width=(int)1920,height=(int)1080,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! nvoverlaysink sync=false

Hi @DaneLLL

Yes, the gmsl camera is working well without videorate plugin.
The issue only happened when I add videorate plugin. I can’t understand why it has problem even though my usb camera is fine with videorate plugin.