How to verify if gstreamer is using GPU?

Hi,

I can run this cmd in my xavier:

gst-launch-1.0 rtspsrc latency=150 location=rtsp://admin:admin@192.168.1.164:554/h265/ch1/sub/av_stream !  \
rtph265depay ! h265parse ! omxh265dec  ! nvoverlaysink

I’m a beginner to both deepstream and gstreamer, so the cmd above is copied from somewhere but it worked ( a video window will open and display the images)

Then I’d like to check if GPU is used and I use

tegrastats

and I get this:

RAM 4246/31919MB (lfb 5364x4MB) SWAP 0/15960MB (cached 0MB) CPU [0%@1190,0%@1190,1%@1190,1%@1190,7%@1190,7%@1190,0%@1190,2%@1190] EMC_FREQ 0% GR3D_FREQ 0% AO@45.5C GPU@46C Tdiode@47.25C PMIC@100C AUX@46C CPU@46C thermal@46C Tboard@45C
RAM 4246/31919MB (lfb 5364x4MB) SWAP 0/15960MB (cached 0MB) CPU [2%@1190,0%@1190,0%@1190,0%@1190,5%@1190,7%@1190,1%@1190,0%@1190] EMC_FREQ 0% GR3D_FREQ 0% AO@45.5C GPU@46C Tdiode@47C PMIC@100C AUX@46C CPU@46C thermal@46.2C Tboard@45C
RAM 4246/31919MB (lfb 5364x4MB) SWAP 0/15960MB (cached 0MB) CPU [2%@1190,0%@1190,1%@1190,0%@1190,5%@1190,1%@1190,0%@1190,2%@1190] EMC_FREQ 0% GR3D_FREQ 0% AO@45.5C GPU@46C Tdiode@47.25C PMIC@100C AUX@46.5C CPU@46C thermal@46.35C Tboard@45C
RAM 4246/31919MB (lfb 5364x4MB) SWAP 0/15960MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,2%@1190,3%@1190,0%@1190,0%@1190] EMC_FREQ 0% GR3D_FREQ 0% AO@45.5C GPU@46.5C Tdiode@47.25C PMIC@100C AUX@46.5C CPU@46.5C thermal@46.35C Tboard@45C

the GR3D_FREQ 0% is always 0, which I don’t understand.

Then I use

htop

to check the cpu load, it’s about 3%, which seems to be lower than my c++ code of using something like cv::VideoCapture().

Here is my question: In my case, how can I verify the GPU is working to reduce CPU load?

Thanks

  1. Your pipeline doesn’t use GPU. omxh265dec uses dedicated HW decoder NVDEC.
  2. Use sudo tegrastats for full stats. You should see NVDEC stats indicating that the HW decoder engine is used.
1 Like

Thanks! I was not surprised when I had some concept misunderstandings.

Is gstreamer (for Xavier) designed to be like that? so it uses NVDEC not GPU? I’m satisfied as long as it moves CPU load to somewhere else but I’m just curious to see if I can use different gstreamer piplines to try GPU?

A side question, when gstreamer works on PC (I’m not sure if there is NVDEC on PC GPU cards), will it use GPU?

Thanks

On all jetsons (at least since TK1) you would find gstreamer plugins able to leverage HW resources. All these jetsons have HW blocks for rescaling, converting, cropping, encoding or decoding.

Sorry, I cannot tell much about desktop GPU, but my understanding so far (not much investigated) is that nvcuvid library may have provided encoder and decoder capabilities from GPU. Not tried nvcuvid on recent desktop GPU nor recent CUDA versions as I can do most of what I need with 15W with a Xavier NX ;-)