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

**URL:** <https://forums.developer.nvidia.com/t/video-processing-framework-error-when-decoding-hw-decoder-faced-error-re-create-instance/257262>\
**Category:** Video Codec, PyNv & OFA\
**Tags:** decoder, rtsp, video\
**Created:** [June 20, 2023, 10:52am UTC](https://forums.developer.nvidia.com/t/video-processing-framework-error-when-decoding-hw-decoder-faced-error-re-create-instance/257262 "2023-06-20T10:52:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ananda](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ananda](https://forums.developer.nvidia.com/u/ananda)\
**Post date:** [June 20, 2023, 10:52am UTC](https://forums.developer.nvidia.com/t/video-processing-framework-error-when-decoding-hw-decoder-faced-error-re-create-instance/257262/1 "2023-06-20T10:52:31Z")

</div>

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](https://github.com/NVIDIA/VideoProcessingFramework) 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:

```auto
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

---

<div class="post-metadata">

**Author:** ![MarkusHoHo](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/markushoho/32/233145_2.png) [@MarkusHoHo](https://forums.developer.nvidia.com/u/MarkusHoHo)\
**Post date:** [July 3, 2023, 12:48pm UTC](https://forums.developer.nvidia.com/t/video-processing-framework-error-when-decoding-hw-decoder-faced-error-re-create-instance/257262/2 "2023-07-03T12:48:12Z")

</div>

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](https://docs.nvidia.com/video-technologies/video-codec-sdk/pdf/NVENC_VideoEncoder_API_ProgGuide.pdf) and debug your app in that regard.

Thanks!
