The FFmpeg backend cannot read from video for linux devices (usb camera’s). In the previous post I suggested a possible workaround which works with direct show devices but may not work with video for linux.
As I mensioned before if you can’t patch the FFmpeg backend so that it can read from a v42l device then your only other realistic option is to wrap another parser which can in a class that inherits from cv::cudacodec::RawVideoSource.
It has nothing to do with the FFmpeg libs themselves, it is to do with which parts of FFmpeg have been implemented inside of OpenCV.
I would suspect because OpenCV has other backends to read from hardware devices there is no requirement for the FFmpeg backend to do this aswell.
I would change the title of your post because the FFmpeg backend works with VideoCapture it just doesn’t do what you want which makes sense as there are other backends to do it. You have a specific requirement which is to access usb camera’s with cudacodec::VideoReader. It would be more correct to say cudacodec::VideoReader does not work when reading from a usb camera. I am trying to help you with that but it may not be easy to solve.