Project mtou

One
Diarpi
January, 2017

This project was simply a challenge at first, but evolved to an backend application I use to watch my local TV channels from anywhere in the world. This is achieved by setting up a tiny server, which will re-transmit Multicast traffic over Unicast. Hence the name MTOU - (M)ulticast (TO) (U)nicast.

Note that this project is dangerously close to what someone might interpret as illegal. Therefore, consider your country's legislation before using it.
I personally believe it is rather in the gray zone, as long as you use it yourself - you are paying for it after all - and do not use it to provide TV content to someone else.

IPTV (television over IP) providers, which have their own network infrastructure, usually stream TV content over Multicast. This allows them to transmit content only once, while there can be multiple simultaneous recipients.

The upside to this is definitely simplicity and how cheap it is to provide TV to a wide number of users connected to your network infrastructure.
But, the downside is security, since anyone can simply retransmit the stream elsewhere.
To fight this, IPTV providers usually use some sort of digital rights management (DRM). They encrypt the stream, making it watchable only with a decryption key, usually bound to a specific device / user which is in their system.

But, luckily, the DRM is also quite expensive, so usually only the most popular TV channels are encrypted!

The application works as a simple HTTP server accepting HTTP requests, where path parameter must be a valid Multicast IP, on which a TV channel is transmitted by your IPTV provider. The server will join the Multicast group on specified IP and transmit data over HTTP.

In my case, I run the server in a docker container, behind a router. So I had to configure some routing to forward incoming multicast data to the relevant router interface.

Note that each IPTV providers is free to map channels differently. Therefore it is up to you to find TV channel mappings to multicast IP addresses for your IPTV provider. Since the traffic is transmitted over Unicast, consider your upload bandwidth limits.

Project specifics can be found here:
https://diarpi.com/project/mtou

Code is available here:
https://github.com/diarpi/mtou

Docker image can be found here:
https://hub.docker.com/r/diarpi/mtou)