Plex MythTV LiveTV Channel/Plugin
I just purchased plexpass and was hoping to be able to do the livetv from myth, but there really weren't any good options out there. I wrote a channel to do it. As of now, it just does the LiveTV. It doesn't list the recordings. With some tweaking, I set up a plex libraries to look at the mythtv recordings folder - so i didnt have a need for recordings yet. I'm not a fantastic developer, It's a little dirty and could probably be all done completely within the bundle, instead of the myth side php i used. My setup is ubuntu and separate VMs for plex and myth. HDHomeRun Prime. I have not done any load testing so don't know what the CPU/mem requirements are, but i've been able to do 2 streams on multiple vcpu VMs without any issue.
I have a basic Channel/Plugin built, which does the initial communicating with Myth to get the channels/icons and then calls the php file on the mythserver to initiate the livetv and start streaming through plex. Keep in mind, this is not using the myth streaming/transcoding like I've seen a few people try to do - The Plexserver is accessing the raw video stream just like any standard client does (ie: mythfrontend/kodi) and then based on the plexclient, the plexserver does the transcoding. I didnt think it made sense to transcode once with myth and then another time with plex.
Ya place the bundle in the plugin directory obviously (may have to change permissions to the plex user) and there's a config option when you launch the channel to set the mythtv hostname and/or ip and the categories you want to display. It always displays the "All Channels" and "Channels Recently Watched" category, but you can add things like Sitcom, Movie, anything ya like. It will create a group and only return those listings that have categories which fall within the group
The stream.php file (txt file attached) gets put in the web server root directory (ubuntu:/var/www/html) of the myth server as stream.php. Would need mythweb running of course.
It's not perfect and I see plenty of room for improvement. I don't have much down time, so I don't know if I'm going to be able to get this further than it is, but if someone who is a little smarter than me wants to take it and run with it....it's all yours. I haven't done a huge amount of testing, but It does what i needed it to do both from a pc and my iphone.
Couple things I noticed...
Rewinding and Fast-forwarding is funky. On the phone it works semi well, the web-browser, not so much. I think i have a way to account for it, just didn't have time to do it yet.
Channel Icons are sized weird, but better than nothing
In my environment - for the most part, all the channels are always there. But, for some reason a few disappear. If you go back to the list a minute later - the missing ones show up. They're randomly missing from results from the MythAPI call, so I'll be looking into why Myth is fumbling the results to see if there is a better way to do it.
If I do end up making any updates, i'll post them
MythTV Live Channel playback