GPU Sample for VideoReader not working

Sorry I missed that I thought by

you meant all video source (i.e. files, rtsp sources etc.) including webcams and usb.

You can’t use VideoReader unless you can use the CAP_FFMPEG backend to read from your source as VideoReader parses the video source using VideoCapture with the FFmpeg backend. Therefore without modification VideoReader will not work on hardware video sources (capture cards, usb or inbuilt webcams).

I tried to help @data with this but we didn’t get very far. In windows you can build the FFmpeg backend to use hardware devices so I had hoped you could do the same with v42l. Anyway you can try the suggestions in

which is essentially build OpenCV against libavdevice and include avdevice_register_all() in void CvCapture_FFMPEG::init() and set OPENCV_FFMPEG_CAPTURE_OPTIONS=input_format;v42l. I have no idea if this will work and don’t have time to test as I’m working on windows at the moment.