I have compiled ffmpeg and OpenCV to decode RTSP video streams using the video codec SDK. I’m using multiple threads to decode each video stream. Initially, everything runs smoothly, but after an unpredictable period of time, I encounter an issue where OpenCV returns ‘None’ when reading the frame. Can anyone explain the possible reasons behind this issue and suggest a solution?
The NVIDIA Video Codec can decode several RTSP video streams normally, but after a few days, it fails to decode certain streams
Hello @user141873 and welcome to the NVIDIA developer forums!
One thing that could be possible is that your number of decode surfaces is too low and simply consume the buffer faster than the decoder can fill it.
another scenario is that your multi-threading together with the necessary decoder queue threading is not set up correctly. It is very easy to make mistakes here. I recommend have a look at the programming guide of the Video Codec SDK, specifically the chapter on “Writing an Efficient Decode Application”.
I hope that gives you some starting points!