V
V
ValdikSS2013-09-19 14:46:55
bittorrent
ValdikSS, 2013-09-19 14:46:55

How to give two clients one live http stream?

I'm developing Ace Stream to HTTP Proxy ( more about Ace Stream, formerly called Torrent... ). The trouble is that if two clients come to watch the same stream (so far we are talking only about live stream), Ace Stream Engine will not let you do this: the link that is issued to the player supports only one connection, and if you run the same stream in parallel , then the first user will be disconnected.
So I need to write something like a little broadcast server and I don't know how to do it right. What if we have a client connected with a good connection, and with a bad one? Constantly expand the buffer, or set a fixed and periodically drop packets for a slow client? What do vlc and ffserver do in this case? Are there any embeddable implementations in Python2?
The problem is that the Ace Stream Engine does not really like it when a stream is continuously read from it. The engine assumes that a custom player will always be used to use it, the engine periodically sends PAUSE / RESUME messages so that the video player is paused at a certain moment in order to avoid buffering in the future (it is better to pause once for 5 seconds than 5 times for 1 second). At the moment, I solve this by stopping reading from the video stream (and, accordingly, sending data to the user) for a certain number of seconds on PAUSE. Whether it is possible to implement it somehow at quantity of clients >1?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
ValdikSS, 2013-10-08
@ValdikSS

In general, I used VLC VLM.

M
miolini, 2013-09-21
@miolini

Imagine you have 1 ace => 1 http and need 1 http => n http

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question