Stream to remote server

asked 2018-12-26 12:30:21 -0500

I'm using OpenCV, in python, to do some real-time object detection locally. For this I am using the imshow function in a while True loop. I'm also writing the frames to disk. I want the live stream to be viewable from a remote device like a phone on an outside network. However, I am having a difficult time figuring out how to do this. I've found that I need to set up a remote web server, live-stream to that server, and then live-stream from the remote web server to the remote phone. I've looked into the different streaming protocols as well. Can anyone point me in the right direction to get this implemented?


edit retag flag offensive close merge delete


off topics : there is no web server in opencv

may be gstreamer can be used but you must build opencv-python yourself...

LBerger gravatar imageLBerger ( 2018-12-26 15:02:36 -0500 )edit

The way I've done this in the past is using RTP. First, compress the video using H.264 then pack the data into an RTP packet (which is really just UDP with some extra header stuff) then broadcast it using UDP. A UDP client can then connect to the stream and decode the packet into RGB.

noel gravatar imagenoel ( 2018-12-27 21:39:01 -0500 )edit