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?
You may try downloading from GL memory into system memory: