Video Processing Framework Error when decoding: HW decoder faced error. Re-create instance

Followed the instructions at GitHub - NVIDIA/VideoProcessingFramework: Set of Python bindings to C++ libraries which provides full HW acceleration for video decoding, encoding and GPU-accelerated color space and pixel format conversions to install VPF. I ran samples/SampleDecodeRTSP.py and I am able to decode h264 RTSP stream but after a while it errors out with the following error message:

HW decoder faced error. Re-create instance.

The error message is printed and no exception is thrown. After removing the try catch statement in Tasks.cpp, I am able to catch an exception when this happens and re created decoder instance with:

nvc.PyNvDecoder(w, h, f, c, g)

However then I get this error

Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8860 >= 8856

I want to use VPF to decode multiple RTSP streams on multiple processes with HW acceleration. If this issue is resolved I would be able to do that

Hello @ananda,

The VPF internallz relies on the Video Codec SDK. That means all features and functionality depends on that SDK.

What you are facing has the a bit of an indication of a multi-threading issue. Your GPU will only have a limited amount of physical parallel instances for NVDEC/NVENC, meaning there has to be resource sharing or blocking calls.

I would recommend reading the relevant sections (Chapter 6) in the Programming Guide for the Video Codec SDK and debug your app in that regard.

Thanks!