Extract frames using GStreamer with NVDEC

Hi,
I’m trying to use GStreamer with NVDEC to extract frames from a video file. I already compiled and installed the NVDEC GStreamer plugin.

With a CPU decoder it works perfectly fine:

gst-launch-1.0 filesrc location=video.mkv ! matroskademux ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=2560,height=1920 ! jpegenc ! multifilesink index=0 location=%d.jpg

However, I want to take advantage of the hardware decoder in the GPU (using NVDEC):

gst-launch-1.0 filesrc location=video.mkv ! matroskademux ! h264parse ! nvdec ! videoconvert ! videoscale ! video/x-raw,width=2560,height=1920 ! jpegenc ! multifilesink index=0 location=%d.jpg

This fails with:

WARNING: erroneous pipeline: could not link videoscale0 to jpegenc0, videoscale0 can't handle caps video/x-raw, width=(int)2560, height=(int)1920

How can this be fixed?

Hi there @david.molnar, welcome to the NVIDIA developer forums.

The gstreamer plugin is not developed or supported by NVIDIA, so I am afraid we are unable to give much assistance here. You should check with the plugn developer or with the gstreamer community directly what might be a common cause for the videoscale0 failure.

Thanks!