Stream video from ffmpeg and capture with OpenCV

后端 未结 1 1147
眼角桃花
眼角桃花 2020-12-16 03:24

I have a video stream coming in on rtp to ffmpeg and I want to pipe this to my OpenCV tools for live streaming processing. The rtp linkage is working because I am able to s

相关标签:
1条回答
  • 2020-12-16 03:33

    hope it's not too late to answer, but I have tried the same thing some time ago, and here is how I did it.

    The video-decoding backend for OpenCV is actually ffmpeg, so all its facitilites are available in OpenCV as well. Not all the interface is exposed, and that adds some difficulties, but you can send the rtp stream address to OpenCV.

    cap.open("rtp://xxx.xxx.xxx.xxx:1234");
    

    Important: OpenCV is not able to access password-protected rtp streams. To do that, you would need to provide the username and the password, there is no API exposed for it.

    0 讨论(0)
提交回复
热议问题