Srt: Multiple clients with SRT

Created on 24 Dec 2020  路  3Comments  路  Source: Haivision/srt

Hello community! I have a question about pulling SRT stream. Is it possible for multiple clients pull one stream?

I have tried to push SRT to server (on server side started a listener with srt-live-transmit) and connected from another IP for pulling, it went OK, then I have tried the same from another IP, it could't pull. I have searched in forums and read issue #574, it was told that srt-live-transmit supports only one connection, so can anyone tell, is there any tool or way to support multiple connections (clients) ?

Question

Most helpful comment

Hello Guys! Just finished the first release version of my srt-server, for now the server receives data on one port and multicast on another port. Tested just today with 15-20 pulls.

https://github.com/ALLATRA-IT/srt-server

All 3 comments

It can be done, but you will likely need to write it yourself.

  1. Create local srt socket, I use non-blocking.
  2. create a thread and epoll that socket for events,
  3. On new event, check and add new remote socket to a container.
  4. In your other main "output" thread, iterate on container and write to each socket.

It is very TCP-like nature. The example app in the code, recvlive.cpp is a pretty good starting point with connection management in serverThread() function.

It can be done, but you will likely need to write it yourself.

  1. Create local srt socket, I use non-blocking.
  2. create a thread and epoll that socket for events,
  3. On new event, check and add new remote socket to a container.
  4. In your other main "output" thread, iterate on container and write to each socket.

It is very TCP-like nature. The example app in the code, recvlive.cpp is a pretty good starting point with connection management in serverThread() function.

Thank you @midicase for your answer, I begin understanding, will try to implement.

Hello Guys! Just finished the first release version of my srt-server, for now the server receives data on one port and multicast on another port. Tested just today with 15-20 pulls.

https://github.com/ALLATRA-IT/srt-server

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gou4shi1 picture gou4shi1  路  5Comments

moonbc picture moonbc  路  4Comments

aamirrad picture aamirrad  路  4Comments

oviano picture oviano  路  6Comments

DigitalTVDev picture DigitalTVDev  路  4Comments