How to install gstreamer nvcodec vs nvdec/nvenc plugins on Ubuntu 20.04

1k Views Asked by At

Installed gstreamer and gstreamer-plugins-bad on ubuntu 20.04 via the apt repo. I also installed the Video_Codec SDK 11.0 from Nvidia.

The gst-ispect command shows me nvenc and nvdec is installed and I am able to use hardware acceleration when playing videos.

What I have found however is reference to the nvcodec at gstreamer nvcodec doc.

I don't have this plugin when I look in get-inspect.

Have also compile opencv with support for gstreamer.

Ultimately I want to be able to use gstreamer in python with opencv and get hardware accelerated decoding of my streams. What I can't seem to do is create a pipeline which converts the output of nvdec to play in appsink. The nvcodec plugin I mentioned earlier appears to have this capability.

So is there a way to install nvcodec on Ubuntu 20.04 or is there a way to create a pipeline that decodes using the nvdec plugin and feeds into the appsink so that I can consume that in opencv.

1

There are 1 best solutions below

0
On

nvcodec is available from GStreamer 1.18 onwards. Since you are on Ubuntu 20.04, it installs GStreamer 1.16 by default, which supports nvenc and nvdec. Upgrade your OS to Ubuntu 22.04, and it'll install GStreamer 1.20 by default, and you'll get nvcodec automatically.