This app was mentioned in 4 comments, with an average of 2.00 upvotes
Or why not just try TVHeadend server in VM? I'm doing it at the moment at my apartment, 1 VM for the TV server, and RPi 2/3 running Kodi attached to each TV, all the data is transferred thru the network.
TVH is free, it has account management, timeshift functionality, you can record unlimited number of shows, streaming, media endcoding, EPG, and A LOT more
I'm using Kodi with the official TVH addon and everything is flawless.
EDIT: Formatting
EDIT2: There is "official" mobile app which support streaming to Chromecast
I'm doing it using [TVHeadEnd](tvheadend.org), right now using a Raspberry Pi 2, before that I did it on a virtualbox vm, and even before, on a dedicated PC I used as a media center. If you have a decent PC, as this runs on linux, the easiest way would be to run a vm with OpenELEC, that includes it. You can use Kodi (ex-XBMC) for a client, or TVHClient from the play store (sideloaded). You can also stream from most web browsers just pointing at the IP of the machine running tvheadend
surprised about all the replies and none of them mentioning what, I think, was the first and most "native" app for tvheadend since like forever :
​
it does have in-app purchases, but not to remove ads (as far as i can tell it doesn't have ads), but rather to enhance it's features (but they're all about adding/editing recording timers etc ... watching channels and browsing the EPG is, if i'm not mistaken, fully enabled in the free version).
keep in mind that if you want to watch from outside your network (port forwarding etc), TVHclient uses the 9982 (!) port to communicate with the tvheadend server, so you'll have to expose both ports (normally 9981 is enough for watching/streaming).
Apropos the title of this thread, but not specifically the OP detail requirement.
If you want to control a PC run a simple python web server like this . Here's what I believe to be the licence for that simple python web server. Apologies to the author for what I've done with it ;-)
def do_POST(self): content_length = int(self.headers['Content-Length']) # <--- Gets the size of data. post_data = self.rfile.read(content_length) # <--- Gets the data itself. self._set_headers() self.wfile.write("<html><body><h1>POST!</h1></body></html>") # Code in this function below this line has been added. # Buffer overflows and exploits are at your own risk! cmd = 'eval "' + post_data + '"' if re.match('/usr/local/bin/mpv http://',post_data) is not None: os.system('killall mpv') os.system(cmd.replace('%20',' ').replace('%3f','?')) else: sys.exit( "->" + post_data + "<-") # <--- Command rejected.
My change is quick and dirty, horrendously insecure, and absolutely a hack. Firewall it at least.
I run TVH client to show a satellite TV EPG on my phone, Autoshare to run a task to do an HTTP POST of the stream URL to the PC when I choose a TV show, and the server runs the command.