Nnvidconv poor performance after upgrade from jp4.3 to jp4.4

Hi there, I have a fairly complex gstreamer pipeline running, but I have isolated my problem to a very simple test:

This:

gst-launch-1.0 v4l2src device=/dev/video1 ! perf ! fakesink

does 30fps

This:

gst-launch-1.0 v4l2src device=/dev/video1 ! ‘video/x-raw,format=UYVY’ ! perf ! nvvidconv ! fakesink

does 10fps.

It was working great (30fps+) on jetpack 4.3 cuda 10.0 . Now I can’t make it run ok on jetpack 4.4 cuda 10.2.

Any hints? Some setting that may have changed?

thanks a lot

Hi,
Please get supported formats of the camera by running:

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

And check if the source can reach 30fps by running:

gst-launch-1.0 v4l2src device=/dev/video1 ! ‘video/x-raw,format=UYVY,width=_WIDTH_,height=_HEIGHT_,frametate=30/1’ ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v

We have steps of launching USB cameras(or YUV sensors through v4l2):
Jetson Nano FAQ
Q: I have a USB camera. How can I launch it on Jetson Nano?

Yes it it supported:

Size: Discrete 3840x2160
                        Interval: Discrete 0.033s (30.000 fps)

Yes, it goes to almost 30, which is the spec according to the manufacturer (not cool e-con systems, not cool, your page says 30fps):

 gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=UYVY,width=3840,height=2160,framerate=30/1 ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v

/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 45, dropped: 0, current: 29,42, average: 29,41
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 60, dropped: 0, current: 29,42, average: 29,41
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 75, dropped: 0, current: 29,42, average: 29,41

So my problem persists, as soon as I put a nvvidconv in the middle, and go to RGBA, on NVMM, it goes to sub 10fps speeds. Again, this was working great before the upgrade, on 3 simultaneous cameras. This is a AGX Xavier.

Thanks a lot

Sorry I need to share this:

perf: perf0; timestamp: 118:53:26.893929129; bps: 2557739008,000; mean_bps: 0,000; fps: 14,344; mean_fps: 14,344; cpu: 14;
INFO:
perf: perf0; timestamp: 118:53:27.900269535; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 4,968; mean_fps: 9,656; cpu: 6;
INFO:
perf: perf0; timestamp: 118:53:29.105273510; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 4,979; mean_fps: 8,097; cpu: 5;
INFO:
perf: perf0; timestamp: 118:53:30.293475096; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 5,050; mean_fps: 7,335; cpu: 5;
INFO:
perf: perf0; timestamp: 118:53:31.298530265; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 4,975; mean_fps: 6,863; cpu: 7;
INFO:
perf: perf0; timestamp: 118:53:32.498536324; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 5,000; mean_fps: 6,553; cpu: 6;
INFO:
perf: perf0; timestamp: 118:53:33.697094127; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 5,006; mean_fps: 6,332; cpu: 6;
INFO:
perf: perf0; timestamp: 118:53:34.697313594; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 4,999; mean_fps: 6,165; cpu: 5;
INFO:
perf: perf0; timestamp: 118:53:35.698392429; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 4,995; mean_fps: 6,035; cpu: 5;
INFO:
perf: perf0; timestamp: 118:53:36.698571224; bps: 3981312000,000; mean_bps: 3981312000,000; fps: 4,999; mean_fps: 5,932; cpu: 5;
INFO:
perf: perf0; timestamp: 118:53:37.703577119; bps: 1278869504,000; mean_bps: 3735635409,455; fps: 16,915; mean_fps: 6,930; cpu: 17;
INFO:
perf: perf0; timestamp: 118:53:38.707114309; bps: 4005560320,000; mean_bps: 3758129152,000; fps: 31,887; mean_fps: 9,010; cpu: 29;
INFO:
perf: perf0; timestamp: 118:53:39.719895758; bps: 3209297920,000; mean_bps: 3715911364,923; fps: 29,621; mean_fps: 10,595; cpu: 27;
INFO:
perf: perf0; timestamp: 118:53:40.742533014; bps: 1616773120,000; mean_bps: 3565972918,857; fps: 29,336; mean_fps: 11,934; cpu: 27;
INFO:
perf: perf0; timestamp: 118:53:41.760196158; bps: 2413035520,000; mean_bps: 3489110425,600; fps: 29,479; mean_fps: 13,104; cpu: 28;

I put a lot of framerate=30/1 and this is what happened. It started sub 10fps and then suddenly corrected itself.

I’m happy, of course, but worried.

Thanks

Hi,
Please try nvv4l2camerasrc:

$ gst-launch-1.0 nvv4l2camerasrc ! 'video/x-raw(memory:NVMM),format=UYVY,width=3840,height=2160,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v

It eliminates copying data from CPU buffers to NVMM buffers:

v4l2src ! video/x-raw ! nvvidconv video/x-raw(memory:NVMM)

Should bring performance improvement.

1 Like

Hi @DaneLLL, I changed v4l2src for nvv4l2camerasrc, it’s working great now.

Where can I read about this new element? The guide doesn’t says much.

Thanks

Hi,
Please check
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#wwpID0E0LR0HA

It is open source. You can get the source code in
https://developer.nvidia.com/EMBEDDED/linux-tegra
L4T Driver Package (BSP) Sources

1 Like