RTSP Streaming via OpenCV

I think I found the solution to your question, the code is on this topic.
I hope it will help you.