VLC channel

I am still having one significant issue on the Roku interface.  The screen "on deck" will not update unless there is a transition from parent to child screens.  Changes on that screen/page or one below (any number of levels) does not result in an update of the content on the higher level screen on Roku.  This is not true for the Plex Media Manager interface, where it works pretty much as desired.  I have no_cache set to true. On Roku, I have to exit the channel and re-enter to update the main menu.

Also, once I add a VideoClipObject to the MainMenu container, I cannot remove it.  The MainMenu creates a new ObjectContainer to pass back without the VCO, but it is still present on the main menu page once one was included.

The source code is provided through the link in the previous post.

Does anyone have ideas on how to accomplish this?

I have not found anything helpful.

Thanks.

This seems to have been addressed.

See: https://forums.plex.tv/topic/93110-home-screen-on-deck-not-updating/

and  https://github.com/awg0020/roku-client-public/tree/refresh-home-on-view

I will be trying this solution.

This did not solve the problem.  Still looking for a solution.  Attempting to modify the Roku Plex channel plugin to accomplish this.

Any suggestions would be greatly appreciated.

Thanks.

I have continued to make progress.  See:  https://github.com/wtw2/VLC_Channel

The package includes a very small bug fix for PMS and a change to a Roku Plex channel file to update the active screen for VLC state user feedback.

I am still having one significant problem.  It takes a very long time before the stream starts playing on Roku.

I am looking for a better solution for this.  I've looked a little into HLS.  This would avoid getting the stream directly from VLC and just play the file pieces generated by VLC.  This requires that the video file is transferred to a local disk, which is not really desired.

The __init__.py file is kind of long.  All the VideoClipObject code is at the end.  All the rest is VLC control routines and screen container structure.

If some would be willing to look at what I'm doing and comment, it would be greatly appreciated.

I do not understand the streaming issues and settings.  It appears that Plex and Roku are working in spite of what my code is throwing at them.

Thanks.

There is really no reason at all you should be asking users that want to try your channel to have to replace the channel framework and portions of their PMS installation or from their Roku client installation, it's pretty clear that you've either a) found bugs in this things and you should file them for the appropriate apps or b) doing something that Plex is not intended to do and you are trying to hack whatever Plex apps you're using into submission so it works the way you want it to work.

I tried to take a look at your channel code but to be honest it's really complex and I don't even understand what it's truly supposed to be for (aside from trying to play things from VLC).

To other users wanting to try this:  Please be cautious in replacing component of PMS or your Plex apps in order to work with a channel.  In the case of the channel framework you will end up stuck at this version (because updates have been disabled if you follow these instructions).

This also appears to be catered to only working with the windows version of VLC and PMS.

@walktheway:  Sorry if I sound like I'm being mean about this, I think it's just important for users to know what they are getting into when doing things like this, a lot of users just do whatever they are told and if they do they could end up with non-functional things or stop getting updates for the channel framework (which is bad).

No problem.  I agree with you completely about the user concerns.  Thanks for the user warnings.  I did fail to point out that the channel is geared toward Windows, due to the methods it uses to verify that VLC is running, etc.  The only purpose for the channel is to access, control (to a reasonable extent) and use VLC to access streams or online video files that Plex and Roku cannot, but VLC can.

I don't believe that it matters if it is a Windows version of VLC.  If the channel code is adjusted for Mac or Linux, it should work there also.  All other imports were removed except for those related to checking the VLC process, per your suggestion.  Thanks!

The bug fix was included so that if someone wanted to try the channel, they could make it work.  It is temporary, and the official Plex Framework fix is already being deployed.

I will remove that from GitHub when I see it appear.

 I have been very open on this forum in stating that if someone has any questions related to the VLC channel to message me.  The channel has changed considerably from its start.  The mod to the Roku Plex Channel is optional and I state so.  I have posted notice and sent PMs regarding the PMS bug (a very rare issue to even find it, though I was not the first).  There does not seem to be a great way to address the bug report issue for Plex.  The forum appears to be the promoted place.  I went beyond that after a couple days and disturbed a couple Plex employees with a PM.  The resolution of that issue was delayed due to unforeseen circumstances on the part of Plex (not their fault).  That has been resolved and the fix is being deployed.  The Roku channel issue appears to be a philosophical issue (intent of the design).  Plex does not seem to agree that there is any significantly useful reason to provide the ability to update a screen on the Roku except by exiting and re-entering that channel.  I disagree, but the Roku Plex channel belongs to Plex, not me.  Maybe I should look into starting a branch.

I figured that if users saw the bug fix and the Roku Plex Channel mod, that would scare off most of them.  The VLC channel code on GitHub has not seen a lot of traffic.  Not only has no one commented on it or asked about it, even the two users who were looking for a VLC channel on this forum did not respond to my PMs.  I am willing to work with them directly should they need it.

I seem to be all alone here with this channel. It's been interesting and entertaining though.  I also got to "meet" you several times. :)

BTW, the section of code that I am looking for comments on is not long and convoluted.  It is the VideoClipObject interface.  Most of the code is related to controlling VLC from Roku and seems to be working well and can be ignored.  I need some guidance from a Plex streaming expert.  There appears to be many issues related to this part and my ignorance of this aspect calls for humility.

Kind Regards.

Yes again I didn't mean to seem like I was coming down hard on you, I just wanted to make it clear of the limitations and the risks of modifying things without knowing the full consequences (it would surprise you how many people blindly copy and paste stuff like that and then have no idea why things are busted further down the road).

One thing to consider here, is that if VLC can play a video from online Plex can most likely also play it (with a few exceptions).  I would personally probably work towards building channels and URL services to support the types of videos you want to play instead of relying on controlling a different application (and all the issues that go along with it).  This is just my opinion.  If nothing else it's certainly been a good exercise for you to learn the channel framework.

One comment:  When you're using IndirectReponse() I think you should also be using the @indirect decorator before the def (right above or under the @route decorator)

https://github.com/wtw2/VLC_Channel/blob/master/VLCplayer.bundle/Contents/Code/__init__.py#L1645

Other than that I don't see anything after a quick look as to why it would be so slow unless the problem lies somewhere else (in the VLC options, etc).

But as I said before I would honestly work harder towards trying to make a channel that will play your content directly where it's possible.

Thanks.

I tried the @indirect decorator, no difference and I changed the code to make sure that the PlayVideo() method was being invoked.

The VLC settings are a good question.

I am currently trying:

transcode{vcodec=h264,width=480,height=360,fps=29.97,acodec=mpga,ab=128,channels=2,samplerate=44100} with mux=ts{use-key-frames}

This should provide a format that both Plex and Roku prefer.  It also should force the content to be 360p and the same frames per second as the TV (not sure about that issue).

I don't know if there are better choices.

It looks like this part should be very straight forward, and I may be doing it correctly.  I just don't understand why it takes so long to start displaying the stream.  It seems to be buffering (probably on the Plex side as Roku really has no significant buffer) at least 5 minutes of the stream.

The play directly strategy would probably be to do an HLS strategy.  That way, Plex is accessing a pile of video files on a local drive instead of trying to display a stream it catches on the fly.

I don't know if Plex is waiting for more metadata to be obtained, of trying to do so.  CreateVideoClipObject() gets called several times.

Here is the log section when playing:

2014-03-06 19:56:17,131 (27b8) :  DEBUG (logkit:13) - MainMenu(): Adding a VCO
2014-03-06 19:56:17,131 (27b8) :  DEBUG (logkit:13) - EXECUTING: GetStatusTermsVLC()
2014-03-06 19:56:17,131 (27b8) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:5555/requests/status.json'
2014-03-06 19:56:17,176 (27b8) :  DEBUG (logkit:13) - EXECUTING: CreateVideoClipObject()
2014-03-06 19:56:17,177 (27b8) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:5555/requests/status.json'
2014-03-06 19:56:17,223 (27b8) :  DEBUG (logkit:13) - EXITING: MainMenu()
2014-03-06 19:56:17,223 (27b8) :  DEBUG (base:123) - Checking if com.plexapp.plugins.vlcplayer is broken
2014-03-06 19:56:17,223 (27b8) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMjkKY29tLnBsZXhhcHAucGx1Z2lucy52bGNwbGF5ZXJzMTAKaWRlbnRpZmllcnIwCg__'
2014-03-06 19:56:17,232 (27b8) :  DEBUG (runtime:918) - Response: [200] MediaContainer, 6222 bytes
2014-03-06 19:56:17,259 (2ac0) :  DEBUG (runtime:717) - Handling request GET /video/vlcplayer/PlayVideo?url=http%3A%2F%2F127.0.0.1%3A11223%2Fstream.ts&default_fmt=360p&indirect=1&mediaInfo=%7B%22audio_channels%22%3A%202%2C%20%22protocol%22%3A%20null%2C%20%22optimized_for_streaming%22%3A%20true%2C%20%22video_frame_rate%22%3A%20null%2C%20%22duration%22%3A%20null%2C%20%22height%22%3A%20360%2C%20%22width%22%3A%20640%2C%20%22container%22%3A%20%22mpegts%22%2C%20%22audio_codec%22%3A%20%22mp3%22%2C%20%22aspect_ratio%22%3A%20null%2C%20%22video_codec%22%3A%20%22h264%22%2C%20%22video_resolution%22%3A%20%22360%22%2C%20%22bitrate%22%3A%20null%7D
2014-03-06 19:56:17,260 (2ac0) :  DEBUG (runtime:814) - Found route matching /video/vlcplayer/PlayVideo
2014-03-06 19:56:17,260 (2ac0) :  DEBUG (logkit:13) - EXECUTING: PlayVideo()
2014-03-06 19:56:17,263 (2ac0) :  DEBUG (runtime:918) - Response: [200] MediaContainer, 1222 bytes
2014-03-06 19:56:17,595 (2bfc) :  DEBUG (runtime:717) - Handling request GET /video/vlcplayer/CreateVideoClipObject?include_container=True&key_string=VLC%2BPlayer%2Brating_key&originally_available_at=2014-03-06%2B00%3A00%3A00&url=http%3A%2F%2F127%2E0%2E0%2E1%3A11223%2Fstream%2Ets&url_meta=http%3A%2F%2F127%2E0%2E0%2E1%3A5555%2Frequests%2Fstatus%2Ejson
2014-03-06 19:56:17,596 (2bfc) :  DEBUG (runtime:814) - Found route matching /video/vlcplayer/CreateVideoClipObject
2014-03-06 19:56:17,596 (2bfc) :  DEBUG (logkit:13) - EXECUTING: CreateVideoClipObject()
2014-03-06 19:56:17,601 (2bfc) :  DEBUG (runtime:918) - Response: [200] MediaContainer, 2199 bytes
2014-03-06 19:56:17,607 (227c) :  DEBUG (runtime:717) - Handling request GET /video/vlcplayer/PlayVideo?url=http%3A%2F%2F127.0.0.1%3A11223%2Fstream.ts&default_fmt=360p&indirect=1&mediaInfo=%7B%22audio_channels%22%3A%202%2C%20%22protocol%22%3A%20null%2C%20%22optimized_for_streaming%22%3A%20true%2C%20%22video_frame_rate%22%3A%20null%2C%20%22duration%22%3A%20null%2C%20%22height%22%3A%20360%2C%20%22width%22%3A%20640%2C%20%22container%22%3A%20%22mpegts%22%2C%20%22audio_codec%22%3A%20%22mp3%22%2C%20%22aspect_ratio%22%3A%20null%2C%20%22video_codec%22%3A%20%22h264%22%2C%20%22video_resolution%22%3A%20%22360%22%2C%20%22bitrate%22%3A%20null%7D
2014-03-06 19:56:17,608 (227c) :  DEBUG (runtime:814) - Found route matching /video/vlcplayer/PlayVideo
2014-03-06 19:56:17,608 (227c) :  DEBUG (logkit:13) - EXECUTING: PlayVideo()
2014-03-06 19:56:17,611 (227c) :  DEBUG (runtime:918) - Response: [200] MediaContainer, 1222 bytes
2014-03-06 19:56:18,375 (2a1c) :  INFO (datakit:131) - Saved the dictionary file
2014-03-06 19:56:29,016 (1760) :  DEBUG (runtime:717) - Handling request GET /video/vlcplayer/CreateVideoClipObject?originally_available_at=2014-03-06+00%3A00%3A00&url=http%3A%2F%2F127.0.0.1%3A11223%2Fstream.ts&key_string=VLC+Player+rating_key&include_container=True&url_meta=http%3A%2F%2F127.0.0.1%3A5555%2Frequests%2Fstatus.json
2014-03-06 19:56:29,017 (1760) :  DEBUG (runtime:814) - Found route matching /video/vlcplayer/CreateVideoClipObject
2014-03-06 19:56:29,017 (1760) :  DEBUG (logkit:13) - EXECUTING: CreateVideoClipObject()
2014-03-06 19:56:29,019 (1760) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:5555/requests/status.json'
2014-03-06 19:56:29,065 (1760) :  DEBUG (runtime:918) - Response: [200] MediaContainer, 2409 bytes
 

Any one else have 2 cents to contribute?

Thanks.

Is the MediaObject() information only used for passing it to the stream source url (http in my case) in a query string?

This is what it looks like in the log.

Or does Plex use it to play the stream?

What information, besides that information contained in the stream itself, is Plex using to either play the stream (Plex/Web player) or send it to Roku?

Am I missing something there?

Thanks.

After some testing, it appears that at least video_codec & video_resolution in the MediaObject() are beneficial to the JW Player in Plex/Web for it to sync the video stream.  It appears to hunt (video anomalies) for a couple seconds otherwise.  So it is not just passed back to the stream source in a query string in the url.

Also, changing the frames per second in VLC appears can result in significant video anomalies, depending on the video content. (not a surprise)

Did you ever manage to get something like this working:

Stream PC screen with VLC (desktop capture) to Roku?

Hi Squaredy.

I did get it working.  The update of Plex/Web (the integrated version with PMS) seems to have cause it some grief.  I haven't had the time to look at it again to try to get it running like it was.

I don't know what you mean by stream PC screen with VLC.  I don't know if VLC will do screen capture.  I set up the channel to pass whatever VLC could access to stream to the Roku.

It never worked as smoothly as I wanted it to, but it was running fairly well for me.

If you have some specific questions, feel free to post them and I'll try to address them more quickly.

Thanks.

Some versions of vlc do screen capture (try using screen:// as your input).  Not sure which ones still support this, I know it was pulled from the OSX version at some point (as they deprecated the underlying stuff that allowed this to happen in Lion or so) -- but the windows and Linux versions of VLC may still support this.

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