Creating a "TV Station" from my Plex library

I’d like to have a sort of 24/7 “TV Station” that just runs random episodes of specific shows from my TV Show library. The closest I’ve gotten was a running VLC instance on my server that transcoded a playlist over either HTTP, or UDP/RTP multicasts. I was able to view the streams from a VLC client on another computer, but couldn’t ever get a bare-bones Plex channel to reliably access the streams (I tried them all in different variations) on all of the devices I use (Desktop, iOS, Roku).



Has anyone done something like this? Bonus points if it can be entirely contained within Plex and avoid VLC altogether. I don’t need to be able to re-order episodes, or skip them.

I don’t see why it couldn’t be done with one caveat. There was some discussion of something similar in this forum a while back (but that user had more specific requirements). The only issue I see offhand is if you want it to be already “playing” when you tune it (you can’t really have things running outside the plugin), but if you’re happy with it just picking a random episode when you launch the channel and having it start from the beginning of that episode it should be doable. One thing you’ll need to do is to run it as an “elevated” plugin in order to access and parse the PMS’s XML files. You can do this by adding this to your Info.plist file:



<br />
        <key>PlexPluginCodePolicy</key><br />
        <string>Elevated</string><br />




In theory you might be able to simulate an already playing channel and have it start a specific episode as if it was already playing -- but it would probably be more work than it's worth. Also with this type of setup it wouldn't work out as expected to have multiple users trying to play the same channel at the same time ... so in a way you can't do it quite like that, but if it's for single user you can do a fair simulation of it depending on how much work you want to put into it.

Having it start “on-demand” at a random episode is good enough for me.

Then go for it :slight_smile: You might need to learn how to grok the XML from PMS a bit (but it’s not that complicated), and you’ll need to either setup preferences or hard code which shows to randomly select from. If you want to track them as to which has been shown or not it may get more complicated, but start out simple and take it from there. If you have any questions ask in here and I’ll try and help you where I can.

Thanks for your help.



So far I’ve got a Channel that returns a dynamic list of series from my TV Show library tagged with the “Comedy” genre. Right now they’re just presented in a list of TVShowObjects.



So now I need to figure out how to:


  • Queue up all the episodes of the selected show, in random order.
  • Play them.



    I suspect the second part will just be returning some kind of Object (I’m thinking MediaObject or PartObject?), but have no idea how to get the server to generate a playlist from the selected show and return, I would guess, a URL I can stream from.



    Thanks again.

I know nothing about playlists to be honest, not sure if they actually work within the channel context or not, but I’ll see what I can find out for you.

Well the news is not good … it doesn’t look like there are actual playlists at all available to use :frowning: What you might be able to do is to load things up with each video as a multiple part (stacked parts), but it may or may not work in some clients and will end up with you having a single “show” being as long as all of them that you load. What I guess you could do is to just drop back to the menu and have to click on the option to play a video and it will play another, but I think that’s the best that’s going to be possible at the moment :frowning:

I appreciate you looking into it. I’ll see what I can figure out.



As a backup plan, if I have to go with the VLC streaming server, what type of stream would work best with Plex? HTTP, MMS, UDP, or RTP. UDP/RTP have Unicast and Multicast options as well.

I would guess HTTP streaming would be your best bet. I’ve seen other people asking about UDP but I don’t know if they ever got that sorted or if it’s supported, but HTTP is almost certainly going to work.

When i was using vanilla XBMC, i used the Pseudo TV plugin for this very feature.



http://forum.xbmc.org/showthread.php?tid=90738



It collects all your media into themed TV channels, has a guide and works beautifully.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.