How to start implementing a video streaming server in c / C ++?

In my project, I need a dedicated server that sends streams to multiple clients.

More specifically, I have a callback function that is called to collect stream data, but does not know how to pass it to other applications.

What is the best way to start with this?

+4
source share
2 answers

What video do you plan to transfer?

There is an open source library called liveMedia, available at http://www.live555.com . This C ++ library is available under LGPL and implements RTSP, RTP / RTCP and payload formats for different types of media. There is a class called DeviceSource IIRC that makes it easy to get data in the library. There is an active mailing list, and you can find a lot of information by searching the archives.

There are also a bunch of sample test projects that illustrate how to transfer mpeg, mp3, etc.

If you decide to use standardized protocols, you can read RTP and RTSP .

+2
source

I think you should check the connection through network sockets.

There is no network concept in C ++, so you need to rely on your system API or libraries (e.g. boost.asio)

0
source

All Articles