Project

General

Profile

Multicast feature prototype

Added by Alex Revetchi almost 10 years ago

Hi,

I have prototyped a working version of multicast, the source is located on a branch in a forked repository https://github.com/zakalibit/tvheadend/tree/master-multicast
In a nutshell is the same service streaming with a replaced tcp socket handle with a connected upd socket (a proper impl might need more work).

So the actual http request is just a udp multicast starter, a sample request would look like:

http://tvheadend:9981/stream/mcast/&lt;service uuid>?address=<udp multicast address>&port=<multicast port>

Where uuid is the value you can get from the Play link in the services tab

On the web interface in the status tab connections, you'll get a connection with Type: UDP-MULTICAST, User name: <udp multicast address>:<multicast port>

in the support folder I have added a python script mcastctl, that can be used to start and stop multicasts:

Start a multicast using service id (the actual channel sid, no need to know the uuid):
./mcastctl --sid 6201 --mip 239.0.0.1 --mport 1234

If web interface running on a different port, for example 8081:
./mcastctl --port 8081 --sid 6201 --mip 239.0.0.1 --mport 1234

And different host then localhost:
./mcastctl --host tvheadend-host --port 8081 --sid 6201 --mip 239.0.0.1 --mport 1234

To stop all multicasts:
./mcastctl killall