Opencv videocapture

Hello everyone! I have a problem with cv2.VideoCapture(). I set path to rtcp connection to my remote camera and sometimes I get some errors like these and video has stopped (ret = False):
[hevc @ 0x1d05d00] log2_parallel_merge_level_minus2 out of range: -1
[hevc @ 0x1d05d00] log2_parallel_merge_level_minus2 out of range: -1
[hevc @ 0x1d27900] log2_parallel_merge_level_minus2 out of range: -1
[hevc @ 0x23d8f40] Could not find ref with POC 66
I read about version of opencv (update). I change codec from 265 to 264 (in properties of camera).
And Ihave stable connection.
Could you help me with my problem?

that’s all logging from ffmpeg.

you can probably reproduce this with ffmpeg, without OpenCV.

yes but i need to use opencv because i am using neural network for this video. Can I use ffmpeg to get video stream and after that process that video in opencv.

the neural networks don’t cause the error.

please review the MRE article.