# Plex HTML5 App WorldWide Request



## jgametest

I have reached out to the Plex team to see about them helping us and all to work on a HTML5 client. If anyone can pull this off it's them.. So many variations of that product are in use for multiplatform. Just note it's going to take time.

https://forums.plexapp.com/index.php/topic/90423-html5-app-worldwide-request/


----------



## bradleys

I know a version was being developed for Boxee before it was purchased by Samsung and shelved...

fyi - Boxee was using the Opera SDK, according to this article.

The source code is still available.

And it looks pretty good:


----------



## jgametest

http://www.operasoftware.com/products/tv-browser

It would seem so much easier to just give in and grant us the browser functions we so desire. It would resolve much need for APPS vs. direct.

Will monitor this closely on the web for background noise.

There is no doubt in my mind with the latest updates this will generate curiosity back to the boxes to push the limits further once again.

http://d2jc9zwbrclgz3.cloudfront.ne...8f697dc58490f8a25cc8750586607f/tv_browser.jpg


----------



## Philmatic

FYI, the Opera TV Store only supports H.264 video and MPEG1/MPEG2/AAC audio inside MP4 containers. It DOES support HLS though, so Plex would work somewhat reliably if you use their transcoding server.

If you were hoping for more native codec support (Like XBMC), it's not going to happen.


----------



## jtclark

You can remotely pass your Plex Media Server URL to the Tivo Opera browser via kmttg, but as you guys have mentioned there are no browser controls.

Just seeing the Plex web interface displayed by the Tivo gives me possibly unfounded hope.

Like everyone else, still looking for that one box that does it all.

With a little more open browser on the Tivo, I think it would win hands down.


----------



## jgametest

This team decided to providing the sourcecode to the general public. Will it be enough Or is the current product to reliant on a pc.

With a modified code could it possible to put on a public/private server to emulate a pc/mac model?

[media]http://www.youtube.com/watch?v=jeh0eQTTTEQ[/media]

http://kylo.tv/ - Product
http://code.kylo.tv/ - Sourcecode


----------



## ntlord

So I spent a bit of time looking into this, but I could not get very far.

First, I started with this: (forum won't let me post links-but search for "plex.h3consulting" on google)

It is a javacript based plex frontend for LG TVs. I got it to work, and navigation works pretty well but video will not play.

LG TVs use a custom video object, so I modified it to use an HTML5 video tag. I got it full working in Safari (which means HTML5 HLS video is working), but it will not work on the Tivo.

As best as I can tell, Tivo does NOT support HLS. I am not familar enough with Plex's transcoder to go much further, but I did try to use the "generic" (as opposed to the universal) transcoder to produce an MP4 file. For example, as in this thread (search for "transcoder help" in plex devel forum) But, everytime I executed the command, it locked up the transcoder (windows) or killed plex process (OS X). The logs weren't any help either.


----------



## gonzotek

ntlord said:


> So I spent a bit of time looking into this, but I could not get very far.
> 
> First, I started with this: (forum won't let me post links-but search for "plex.h3consulting" on google)
> 
> It is a javacript based plex frontend for LG TVs. I got it to work, and navigation works pretty well but video will not play.
> 
> LG TVs use a custom video object, so I modified it to use an HTML5 video tag. I got it full working in Safari (which means HTML5 HLS video is working), but it will not work on the Tivo.
> 
> As best as I can tell, Tivo does NOT support HLS. I am not familar enough with Plex's transcoder to go much further, but I did try to use the "generic" (as opposed to the universal) transcoder to produce an MP4 file. For example, as in this thread (search for "transcoder help" in plex devel forum) But, everytime I executed the command, it locked up the transcoder (windows) or killed plex process (OS X). The logs weren't any help either.


It looks like Opera has confirmed no HLS support on TiVo (which is a bummer for transcoding purposes):
http://my.opera.com/community/forums/topic.dml?id=1811322

I've been toying around with the Opera html5 support on TiVo though, and there are still some interesting apps that could be created for TiVo.


----------



## ntlord

That is too bad. The documentation on the Opera SDK is seriously lacking. There also does not seem to be much of a developer community (i.e. you question went unanswered for days).

My hope is that if I can get Plex's transcoder to pop out an mp4 then this would still have a chance at working. But as of right now, when I try that Plex crashes.


----------



## moyekj

ntlord said:


> My hope is that if I can get Plex's transcoder to pop out an mp4 then this would still have a chance at working. But as of right now, when I try that Plex crashes.


 I don't see how that's possible. mp4 container requires MOOV atom among others that can only be generated once the encoding is complete, so on the fly transcoding to mp4 I don't think is possible...
IMO, mp4 container is lousy and I wish at least mpeg2 transport container would work since it's much more flexible.


----------



## ntlord

I thought so too. But if you search for "transcoder help" (again sorry can't post links yet) on the Plex dev forums, somebody seems to indicate they got it to work with a Vizio tv and a .mp4 container that was transcoded on-the-fly. 

I will try a couple of basic tests later on tonight, just to verify the only container the Tivo can support is .mp4. But, I'm not hopeful.


----------



## gonzotek

FWIW, here's the post (I think)https://forums.plex.tv/index.php/topic/89736-transcoder-help/#entry553787. I agree it doesn't look hopeful, but don't let me stop you from trying! I'd really like to see any kind of live streaming/live transcoding working.


----------



## moyekj

ntlord said:


> I will try a couple of basic tests later on tonight, just to verify the only container the Tivo can support is .mp4. But, I'm not hopeful.


 It's good to have independent confirmation, but from my tests not too long ago the only thing that works inside a tag for TiVo Opera browser is mp4 container with H.264 video and AAC audio. (The MOOV atom does not have to be at start of the file from what I recall).

NOTE: mp4 container with H.264 video and AC3 audio will actually play, but you don't get any sound.


----------



## ntlord

I tested with ogg, webm, mpegts. No dice. I also extracted the .ts files from the .m3u8 file, also no dice.

At this point, my only hope is that I get an answer on the Plex forums, and somehow that generic transcoder mp4 thing magically works. 

As an aside, is the new netflix app HTML5? Is it possible we could try to intercept the traffic, and see if there are some custom objects being passed around not documented in the Opera web SDK? 

Has there been any news as to when tivo is going to post the SDK info on their website? It seems to have been down for "maintenance" and awful long time.


----------



## moyekj

ntlord said:


> As an aside, is the new netflix app HTML5?


 No. Back when "opera:history" still worked before 20.3.8 update, Dan203 was able to confirm that after launching Netflix no URL showed up in Opera browser history for his TiVo. After launching YouTube HTML version it did show up in history. Also, the URL for Netflix App launch is a special type:


Code:


x-tivo:netflix:netflix

vs the YouTube one:


Code:


x-tivo:web:https://www.youtube.com/tv

So YouTube videos are being launched using tags in html5 while Netflix is doing its own custom thing. YouTube videos are mp4 container with H.264 video and AAC audio which is why that's not a problem.

It would be wonderful for us to get access to same TiVo SDK that Netflix must be using, but that's likely never going to happen...


----------



## ntlord

Hmm that's too bad. Although, I guess you never know, who knows what Netflix is sending back and forth? Maybe, if I have time this weekend, I'll try to set up a packet sniffer. Even if it is HTTPS it still may be possible to intercept by setting up a man-in-the-middle proxy.


----------



## gonzotek

ntlord said:


> Hmm that's too bad. Although, I guess you never know, who knows what Netflix is sending back and forth? Maybe, if I have time this weekend, I'll try to set up a packet sniffer. Even if it is HTTPS it still may be possible to intercept by setting up a man-in-the-middle proxy.


^
Love to hear the results of this.

I started looking into WebRTC during my break at work today..I'm wondering if there isn't a way to implement streaming by pretending we're a webcam on the server side. If it works at all on the TiVo, there'll probably be a bunch of limiting factors like dropping frames when it can't keep up, the codecs only support low-bitrates designed for real-time video chats and such. It's relatively new, and I'm betting isn't even included in Opera's device sdk(and thus on tivo), but it was a passing thought.


----------



## sirfergy

ntlord said:


> So I spent a bit of time looking into this, but I could not get very far.
> 
> First, I started with this: (forum won't let me post links-but search for "plex.h3consulting" on google)
> 
> It is a javacript based plex frontend for LG TVs. I got it to work, and navigation works pretty well but video will not play.
> 
> LG TVs use a custom video object, so I modified it to use an HTML5 video tag. I got it full working in Safari (which means HTML5 HLS video is working), but it will not work on the Tivo.
> 
> As best as I can tell, Tivo does NOT support HLS. I am not familar enough with Plex's transcoder to go much further, but I did try to use the "generic" (as opposed to the universal) transcoder to produce an MP4 file. For example, as in this thread (search for "transcoder help" in plex devel forum) But, everytime I executed the command, it locked up the transcoder (windows) or killed plex process (OS X). The logs weren't any help either.


Could you share the changes you made go get it working? Most of my media is h264/aac so I don't need transcoding support.


----------



## Dan203

moyekj said:


> I don't see how that's possible. mp4 container requires MOOV atom among others that can only be generated once the encoding is complete, so on the fly transcoding to mp4 I don't think is possible...
> IMO, mp4 container is lousy and I wish at least mpeg2 transport container would work since it's much more flexible.


You are correct. MP4 files require a MOOV atom and the MOOV atom can not be generated until the file has finished encoding, so MP4 can not be used for realtime transcoding and streaming.

HLS is really our only hope for that functionality. I wonder why it's not included in the TiVo version of Opera?


----------



## ntlord

This moov atom thing has me confused. I get that when you are transcoding a live stream it may not be possible to generate the moov atom. But that is not the case with Plex. Instead, with Plex, you are transcoding a fixed file. It would seem to me to be completely within the realm of possibility to generate the correct MOOV atom in that case.

There must be some third party transcoders that can do that. Has anybody looked into that? I know it somewhat defeats the purpose of using plex, but I guess for now it would work. 


@sirfergy - As to sharing the code. I really just hacked something together. It was never fully functional. Just enough to get it to the point to play a video, so there really isn't much to share. But, in general all you need to do is change the LG custom object html tag to a video tag and modify the Javascript to change the "src" attribute of that tag. After that, you would need to mess a bit with the player controls to get them to work. 

-Dan


----------



## jgametest

Air PlayIt Server is created for Mac and Windows users as a way of Transcoding for live playback or to pull a copy to the app found within the AppStore or GooglePlay. There is even an option to make the server available as WEB interface within the application which then is tied to it's own Custom or default port with IP address. If the technology it uses could be broken down maybe it could be used. I did notice last time I used it the installation included FFMPEG similar to what is used with Streambaby.

Details about Airplayit

http://airplayit.com/


----------



## moyekj

jgametest said:


> Air PlayIt Server is created for Mac and Windows users as a way of Transcoding for live playback or to pull a copy to the app found within the AppStore or GooglePlay. There is even an option to make the server available as WEB interface within the application which then is tied to it's own Custom or default port with IP address. If the technology it uses could be broken down maybe it could be used. I did notice last time I used it the installation included FFMPEG similar to what is used with Streambaby.
> 
> Details about Airplayit
> 
> http://airplayit.com/


 Transcoding is to M3U8/M3U (i.e. HLS) format which is not (currently) supported by TiVo Opera browser.


----------



## ntlord

This seems promising:

http://stackoverflow.com/questions/...p4-works-in-android-but-fails-in-flash-player

If this works, it may be possible to emulate using Plex DLNA transcoder profiles.


----------



## Dan203

ntlord said:


> This moov atom thing has me confused. I get that when you are transcoding a live stream it may not be possible to generate the moov atom. But that is not the case with Plex. Instead, with Plex, you are transcoding a fixed file. It would seem to me to be completely within the realm of possibility to generate the correct MOOV atom in that case.
> 
> There must be some third party transcoders that can do that. Has anybody looked into that? I know it somewhat defeats the purpose of using plex, but I guess for now it would work.


The problem is that the MOOV atom contains byte offsets to individual chunks of data in the file. There is no way to know the exact position of these chunks ahead of time because you have no way of knowing how big each individual frame will be. Even if you used a CBR encoding method the size of each individual frame would still vary making it impossible to guess.


----------



## Dan203

ntlord said:


> This seems promising:
> 
> http://stackoverflow.com/questions/...p4-works-in-android-but-fails-in-flash-player
> 
> If this works, it may be possible to emulate using Plex DLNA transcoder profiles.


Hmmm... I forgot about fragmented MP4 files. They're only supported by some players though. Although it's easy to created a fragmented MP4 in ffmpeg, so it should be easy enough to test if they work in the TiVo browser. Just add...


Code:


-movflags frag_keyframe

to the ffmpeg commandline when outputting the MP4 file.

Edit: You might also need to set the H.264 encoder options to output IDR frames at specific intervals for that to work properly. (I'd recommend every 2 seconds)

Edit: This page has a more robust explanation about how to create a fragmented MP4 file in FFmpeg...

http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg


----------



## moyekj

Dan203 said:


> Hmmm... I forgot about fragmented MP4 files. They're only supported by some players though. Although it's easy to created a fragmented MP4 in ffmpeg, so it should be easy enough to test if they work in the TiVo browser. Just add...
> 
> 
> Code:
> 
> 
> -movflags frag_keyframe
> 
> to the ffmpeg commandline when outputting the MP4 file.
> 
> Edit: You might also need to set the H.264 encoder options to output IDR frames at specific intervals for that to work properly. (I'd recommend every 2 seconds)
> 
> Edit: This page has a more robust explanation about how to create a fragmented MP4 file in FFmpeg...
> 
> http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg


Tried a sample ffmpeg encode with:
-movflags frag_keyframe

Both VLC and TiVo Opera browser only play the 1st fragment (I used -g 52 for keyframe). mediainfo sees total length of video as 1st fragment only.

Next tried the following:
-movflags frag_keyframe+empty_moov

Neither VLC or TiVo Opera browser could play it at all.


----------



## Dan203

Try the ismv format instead. It's basically a fragmented MP4 but with an extra index file, kind of like HLS. 

This is apparently what Microsoft Smooth Streaming is, and that's listed as supported in Opera Media Streaming docs.


----------



## moyekj

Tried with the following:
-movflags frag_keyframe -f ismv

VLC can play it, TiVo Opera errors out as unsupported.


----------



## Dan203

Did you try...

frag_keyframe+empty_moov

?


----------



## moyekj

-movflags frag_keyframe+empty_moov -f ismv

VLC plays, TiVo Opera unsupported.


----------



## Dan203




----------



## ntlord

So, netflix communicates via HTTPS. I tried to decrypt using man-in-the middle techniques, but it appears the app has smart enough certificate handling where that won't work.

I also verified that TechCrunch and MovieFone seem to be using just normal .mp4 files.

It looks like we could be SOL here until Tivo gives us some more information regarding their SDK.

Edit: I was able to get the video file decoded. Here is an ASCII readout of the header from the netflix video file:

... ftypmp42....isomiso2dashiso6...luuidNetflixPiffStrm!.........`It...........
[................].............C.......]....^..%.......40k.i....free...................Luuid....~C.A..!!..d2.........km.Netflix Media Library Version 1.0.1755.....mmoov...xmvhd.........kna.....[email protected]...................................trak...htkhd.........kna.....kna.[email protected]..............Amdia...,mdhd.........kna.....kna............U......4hdlr........soun............Audio Media Handler.....minf....smhd...........$dinf....dref............url ........stbl....stts............ctts...........Astsd...........1ec-3...............................
dec3p........stsc............stsz................stco...........<mvex....mehd.......
[...... trex............................sidx.........................


----------



## Dan203

Those are MP4 atoms. So apparently Netflix uses MP4. But since it's adaptive bitrate it must use a fragmented MP4 system like SmoothStream or MPEG-Dash. IIRC the website uses Silverlight for streaming right? SIlverlight uses SmoothStream, so that's probably what it is. But the Netflix app on TiVo doesn't use Opera, so that's probably some custom implementation.

What bout YouTube? Does it do adaptive streaming on the TiVo? If your network starts to slow does it automatically drop to a lower resolution? Or does it stall and stutter? If it does adaptive streaming then there must be some way to do it via Opera and there is hope for us. If not then static MP4s are the only option and we're basically SOL.

Dan


----------



## moyekj

ntlord said:


> So, netflix communicates via HTTPS. I tried to decrypt using man-in-the middle techniques, but it appears the app has smart enough certificate handling where that won't work.
> 
> I also verified that TechCrunch and MovieFone seem to be using just normal .mp4 files.
> 
> It looks like we could be SOL here until Tivo gives us some more information regarding their SDK.
> 
> Edit: I was able to get the video file decoded. Here is an ASCII readout of the header from the netflix video file:
> 
> ... ftypmp42....isomiso2dashiso6...luuidNetflixPiffStrm!.........`It...........
> [................].............C.......]....^..%.......40k.i....free...................Luuid....~C.A..!!..d2.........km.Netflix Media Library Version 1.0.1755.....mmoov...xmvhd.........kna.....[email protected]...................................trak...htkhd.........kna.....kna.[email protected]..............Amdia...,mdhd.........kna.....kna............U......4hdlr........soun............Audio Media Handler.....minf....smhd...........$dinf....dref............url ........stbl....stts............ctts...........Astsd...........1ec-3...............................
> dec3p........stsc............stsz................stco...........<mvex....mehd.......
> [...... trex............................sidx.........................


 If you have an actual decrypted Netflix video file (how did you get that?) then please run mediainfo on it and post the output here. I assumed lately they were using mpeg2 TS container for TiVos with H.264 video & AC3 audio. As Dan203 posted the above implies mp4 container. The original Netflix on TiVo implementation years ago I think was using asf container with VC-1 video & 2-channel WMA9 audio.


----------



## ntlord

Well I just have a streaming version of it. I was able to trick the netflix client into using http instead of https using some arp spoofing and an SSL interception program that returns HTTP links when HTTPS is requested. Then I just ran tcpdump. 

I assume its unencrypted because of the header, but I'm sure it has all kinds of additional DRM. 

Would media info work on a partial file?


----------



## moyekj

ntlord said:


> Would media info work on a partial file?


 I think it should. Worth a try anyway.


----------



## Dan203

ntlord said:


> Well I just have a streaming version of it. I was able to trick the netflix client into using http instead of https using some arp spoofing and an SSL interception program that returns HTTP links when HTTPS is requested. Then I just ran tcpdump.
> 
> I assume its unencrypted because of the header, but I'm sure it has all kinds of additional DRM.
> 
> Would media info work on a partial file?


Based on your dump the MOOV atom is at the start of the file so it should work. It should work even if the data is encrypted as most of the info about the file is stored at the container level and that does not appear to be encrypted.


----------



## ntlord

Hmm. Stupidly I got rid of my capture file. And for whatever reason, I can't get it to work again. Netflix keeps timing out. One thing I did notice is that it seems to be video by video. When I had it working, I tried a different video and it looked like it was returning a "ismv" file, which as I understand it is smooth streaming. I'll keep at it. Hopefully, I can get this to work.


----------



## ntlord

Ok here is a capture of the ismv file, still working on trying to get mp4.










Edit. I'm don't think there ever was an MP4, I think I must have just picked up in the middle of the ismv file.


----------



## ntlord

Here are the rest of the details:

General
Count : 284
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Inform : MPEG-4 (Base Media): 225 MiB, 2h 10mn
Count of video streams : 1
Video_Format_List : AVC
Video_Format_WithHint_List : AVC
Codecs Video : AVC
Complete name : /Users/[*removed]/Desktop/138716156.ismv
Folder name : /Users/[*removed*]/Desktop
File name  : 138716156
File extension : ismv
Format : MPEG-4
Format : MPEG-4
Format/Extensions usually used : mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v
Commercial name : MPEG-4
Format profile : Base Media
Internet media type : video/mp4
Codec ID : iso2
Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html
Codec : MPEG-4
Codec : MPEG-4
Codec/Extensions usually used : mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v
File size : 236043450
File size : 225 MiB
File size : 225 MiB
File size : 225 MiB
File size : 225 MiB
File size : 225.1 MiB
Duration : 7824483
Duration : 2h 10mn
Duration : 2h 10mn 24s 483ms
Duration : 2h 10mn
Duration : 02:10:24.483
Overall bit rate mode : VBR
Overall bit rate mode : Variable
Overall bit rate : 241338
Overall bit rate : 241 Kbps
Stream size : 7760723
Stream size : 7.40 MiB (3%)
Stream size : 7 MiB
Stream size : 7.4 MiB
Stream size : 7.40 MiB
Stream size : 7.401 MiB
Stream size : 7.40 MiB (3%)
Proportion of this stream : 0.03288
HeaderSize : 172206
DataSize : 2184
FooterSize : 235869060
IsStreamable : Yes
Encoded date : UTC 2013-09-14 01:53:10
Tagged date : UTC 2013-09-14 01:53:10
File last modification date : UTC 2014-01-22 00:21:03
File last modification date (local) : 2014-01-21 19:21:03

Video
Count : 272
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
Inform : 233 Kbps, 320*240 (16:9), at 23.976 fps, AVC ([email protected]) (CABAC / 3 Ref Frames)
ID : 2
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format/Url : http://developers.videolan.org/x264.html
Commercial name : AVC
Format profile : [email protected]
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, CABAC : Yes
Format settings, ReFrames : 3
Format settings, ReFrames : 3 frames
Internet media type : video/H264
Codec ID : encv / avc1 / avc1
Codec ID/Info : Advanced Video Coding
Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html
Codec : AVC
Codec : AVC
Codec/Family : AVC
Codec/Info : Advanced Video Codec
Codec/Url : http://developers.videolan.org/x264.html
Codec/CC : encv
Codec profile : [email protected]
Codec settings : CABAC / 3 Ref Frames
Codec settings, CABAC : Yes
Codec_Settings_RefFrames : 3
Duration : 7824483
Duration : 2h 10mn
Duration : 2h 10mn 24s 483ms
Duration : 2h 10mn
Duration : 02:10:24.483
Bit rate mode : VBR
Bit rate mode : Variable
Bit rate : 233403
Bit rate : 233 Kbps
Maximum bit rate : 352000
Maximum bit rate : 352 Kbps
Width : 320
Width : 320 pixels
Height : 240
Height : 240 pixels
Pixel aspect ratio : 1.333
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Rotation : 0.000
Frame rate mode : CFR
Frame rate mode : Constant
Frame rate : 23.976
Frame rate : 23.976 fps
Frame count : 187600
Resolution : 8
Resolution : 8 bits
Colorimetry : 4:2:0
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8
Bit depth : 8 bits
Scan type : Progressive
Scan type : Progressive
Interlacement : PPF
Interlacement : Progressive
Bits/(Pixel*Frame) : 0.127
Stream size : 228282727
Stream size : 218 MiB (97%)
Stream size : 218 MiB
Stream size : 218 MiB
Stream size : 218 MiB
Stream size : 217.7 MiB
Stream size : 218 MiB (97%)
Proportion of this stream : 0.96712
Encoded date : UTC 2013-09-14 01:53:10
Tagged date : UTC 2013-09-14 01:53:10
Encryption : Encrypted
Buffer size : 470000


----------



## moyekj

That's very interesting. Strange how there is no audio information. Looks like this means TiVo can play back ismv format. Will have to see if I can get an ismv encoding pushed to TiVo (probably have to trick pyTivo to let it through as is).


----------



## Dan203

That makes sense. The website uses Silverlight, which is SmoothStream. However Neflix uses a custom app, so it could be a proprietary implimentation. 

Does anyone know if the YouTube app does adaptive streaming? Meaning will it change resolution based on your network speed? Or AOL On or Moviefone? That would tell us if some sort of fragmented MP4 is supported in Opera.


----------



## ntlord

moyekj said:


> That's very interesting. Strange how there is no audio information. Looks like this means TiVo can play back ismv format. Will have to see if I can get an ismv encoding pushed to TiVo (probably have to trick pyTivo to let it through as is).


The audio stream is sent in a different GET request. It's called an "isma" file. I didn't decode that, but I probably could if you wanted me to.


----------



## ntlord

Dan203 said:


> That makes sense. The website uses Silverlight, which is SmoothStream. However Neflix uses a custom app, so it could be a proprietary implimentation.
> 
> Does anyone know if the YouTube app does adaptive streaming? Meaning will it change resolution based on your network speed? Or AOL On or Moviefone? That would tell us if some sort of fragmented MP4 is supported in Opera.


I can capture the youtube .mp4 later on tonight, I have no idea how to determine if it is adaptive streaming, but I can run it through mediainfo, if that will help?


----------



## jgametest

Keep in mind this is how Streambaby was born from the old Youtube application. It's possible we could learn a lot from the new format and provide a valuable feature to the group. I was doing some side work running an Airplayit server from my primary IP and port. When pushing this address into KMTTG web the screen was showing up as Black background and blue hyperlinks obviously could not navigate. So this lead me to input the address manually with EntertheWebz and it loaded the formatted page in correct form showing me my entire list with playback option of Live Conversion or Play. When I choose conversion it loaded lots of Html codes indicating the info was bouncing all over the place but nothing hit AirPlayit as a conversion request. Hmm, so I tried live playback for a minute my TiVo thought about the request and in the bottom left of my screen it said processing then it timed out and said failed source. The video playback was .mp4 and .avi neither was understandable by the built in codec of EntertheWebz. I have reached out to David the developer to see if there is a way we can use a live open source codec that could emulate this ability but that could take time to find such a thing. Perhaps there is a web version of FFMPEG as an HTML5 compatible device. Not sure if it's possible but makes you think. I will keep hunting and if I come across a lead will let you know.:up:


----------



## moyekj

ntlord said:


> The audio stream is sent in a different GET request. It's called an "isma" file. I didn't decode that, but I probably could if you wanted me to.


 Interesting. So on TiVo side it must be muxing audio and video together on the fly I would guess into TS container. It would be useful to see audio specs as well, though we're pretty sure it must be AC3.

pyTivo pushes are not going through currently and I couldn't get my ismv encoding to play via Streambaby raw method so no luck getting TiVo to play ismv directly yet for me.


----------



## ntlord

I'm not at all familiar with HME. But what about some sort of hybrid frankenapp that uses a combo of HTML5 and HME. 

As I understand it, kmttg has the ability to both launch HTML5 url's and HME apps. What if a specialized web server was created which would serve up an HTML5 plex app, but once a video is selected, it would ping this web server with the request, which in turn would launch an HME video player window that would use the plex transcoder for the file?

I get that there is still the 1.1g limitation, but is better than nothing, right? My only issue is I suspect it would be crazy slow. 

How does the HME protocol work? I seem to be having trouble finding documentation on the video side of things.


----------



## moyekj

If you're going to go HME route and live with the 1.1GB limitation then may as well just use Streambaby. HME also eliminates the Mini from being used as a client as well. Note that via Streambaby you can also push videos instead of streaming them to get past the 1.1GB limitation and there's a "vidmgr" app out there that does that as well (using pyTivo to push) but with fancier metadata viewing options, but none of those work for a Mini. The nice thing about an Opera based solution is that it does work with the Mini and doesn't have the delays in starting video playback that HME solutions have.

I do envision eventually if an html-based solution is found that it may be useful to wrap HME around it so as to have a way to launch html from the TiVo itself instead of using kmttg or the like. i.e. The only purpose of HME is to be an html launch point from "Apps & Games" for the application, and that would work for a Mini as well.


----------



## ntlord

moyekj said:


> I do envision eventually if an html-based solution is found that it may be useful to wrap HME around it so as to have a way to launch html from the TiVo itself instead of using kmttg or the like. i.e. The only purpose of HME is to be an html launch point from "Apps & Games" for the application, and that would work for a Mini as well.


Exactly what I was thinking. I didn't have a chance to decode the youtube stuff yet, but I'll post it up, when I do.


----------



## ntlord

Ok, I think there might be some good news with respect to youtube. Take a look at this media info:

General
Complete name : /Users/[*removed*]/Desktop/videoplayback.mp4
Format : dash
Codec ID : dash
File size : 64.0 KiB
Duration : 5s 5ms
Overall bit rate : 105 Kbps
Encoded date : UTC 2014-01-19 14:11:10
Tagged date : UTC 2014-01-19 14:11:10

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 5s 5ms
Bit rate : 241 Kbps
Width : 426 pixels
Height : 240 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.098
Stream size : 147 KiB
Encoded date : UTC 2014-01-19 14:11:10
Tagged date : UTC 2014-01-19 14:11:10

Here is the GET

GET /videoplayback?clen=7411046&burst=40&algorithm=throttle-factor&signature=93B3116767BD39A3EDEBC08819C6C6C51DE1E761.7C348E3AAD34F21E7D56AF8F432313D80A5433F7&source=youtube&gir=yes&fexp=917000%2C930005%2C909207%2C906434%2C916612%2C901476%2C936910%2C936913%2C907231&factor=1.25&key=yt5&lmt=1390227070849331&dur=244.578&ipbits=0&sver=3&id=0d8bbf6c66d98a24&ip=68.55.5.176&sparams=algorithm%2Cburst%2Cclen%2Cdur%2Cfactor%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Csource%2Cupn%2Cexpire&itag=133&mv=m&mt=1390524907&ms=au&upn=3fnOVmqOxqY&expire=1390548037&cpn=ayacBtj7J4PEbYRR&alr=yes&mime=video%2Fmp4&ratebypass=yes&ptk=7minutesinheaven%2Buser&oid=c3gpN_mwQ_w5xpWDAmNysQ&ptchn=310aJFjr6Gn9mGZjMZ2VTQ&pltype=content&range=0-65535&keepalive=yes&fr=yes HTTP/1.1
User-Agent: Opera/9.80 (Linux mips) Presto/2.12.407 Version/12.50 , TiVo-Device/20.3.8-USA-6 (TiVo, TCD848000, wired)
Host: r1---sn-jvhj5nu-p5q6.googlevideo.com
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Origin: https://www.youtube.com


----------



## ntlord

OK, I think I've found something

I believe Opera supports Media Source Extensions! While I haven't gotten it quite able to play yet, load this link on your Tivo:

http://dashif.org/reference/players/javascript/1.0.0/index.html

If you try it in Safari, for example, if gives all kinds of warnings. But it seems to mostly work on the Tivo. For example, it loads the proper video length.

Edit: This works:

http://dash-mse-test.appspot.com/

Run the oops_ceenc file.


----------



## Dan203

Cool find! MPEG-Dash is a an open standard similar to SmoothStream, but with a slightly different playlist format. Still uses fragmented MP4 files though. If we can figure out how to get dash files out of FFmpeg then a streaming server might actually be possible. Although I'm not sure about AC3 audio. It might be limited to 2ch AAC, which could be another reason why Netflix doesn't use Opera.


----------



## moyekj

Took me a little while to figure out what you were saying plays. The "Demo Player" link followed by "oops_cenc" specifically is what you need to follow. For those that want to try it, you can use Q,A,W,S keys on Slide remote or your keyboard with kmttg on the virtual remote tab to navigate around the web page somewhat. Q, A keys jump between links, W, S keys between headers.


----------



## ntlord

So based on my research Plex is capable of outputting mpeg-dash (it's what it uses for Chromecast). I played around with it a bit last night, and I got it somewhat working, but I couldn't get it to output what looks like a fully complete MPD file. At least, it wasn't nearly as complete as the test MPD files that player I found was using. 

I don't have a chromecast, but I might purchase one this weekend and play around with it, and see if I can intercept the calls it is making to Plex. What's interesting about chromecast is that it works similar to Opera SDK in that it is basically just a chrome web browser.


----------



## bradleys

Sorry if this is an obviously ignorant question...

But couldn't we build a nice looking interface to browse media using the HTML5 interface and then initiate Stream Baby Stream to play the video?

I would much rather use the TiVo video playback tools anyway.

Would this work on the mini?


----------



## moyekj

bradleys said:


> Would this work on the mini?


No. HME streaming is actually copying to a TiVo buffer which Mini doesn't have. Thus, for example, streambaby doesn't work on Mini (the browsing part does, starting video stream does not). Only way to stream to a Mini is via its Opera browser.
If you're just looking for a nicer front end than streambaby then perhaps "vidmgr" will suit your needs. It's an HME front end to pyTivo push. (Obviously won't work on a Mini either).


----------



## bradleys

I have looked at it before...

What I would REALLY like is for TiVo to see / handle my PyTiVo share as a modern TiVo with the HDUI and Streaming et al...

But not really expecting it!


----------



## ntlord

Ok, so I went out and bought a chromecast. A couple of things:

This is a sample MPD file generated by plex:

<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="static" minBufferTime="PT10S" mediaPresentationDuration="PT0H42M20S" maxSegmentDuration="PT10S">
<Period start="PT0S" duration="PT0H42M20S">
<AdaptationSet segmentAlignment="true">
<SegmentTemplate timescale="1" duration="5" initialization="dash/065f63df4d9795ed/$RepresentationID$/initial.mp4" media="dash/065f63df4d9795ed/$RepresentationID$/$Number$.m4s" startNumber="0"/>
<Representation id="video" mimeType="video/mp4" bandwidth="2000000" codecs="avc1.42c00d"/>
</AdaptationSet>
<AdaptationSet segmentAlignment="true">
<SegmentTemplate timescale="1" duration="5" initialization="dash/065f63df4d9795ed/$RepresentationID$/initial.mp4" media="dash/065f63df4d9795ed/$RepresentationID$/$Number$.m4s" startNumber="0"/>
<Representation id="audio" mimeType="audio/mp4" bandwidth="384000" codecs="mp4a.40.2">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>

1. This is the webpage the chromecast hits: http://www.plexapp.com/chromecast/production/index.html

2. The webpage uses this obsfucated javascript: http://www.plexapp.com/chromecast/production/js/plex.js

I deobsfucated using this: http://jsbeautifier.org/

3. After looking at the javascript you can tell that Plex is doing some super complicated things like parsing the mp4 file.

4. The MPD file is not compliant and appears to have placeholder variables in it e.g., $Representation. If you search through the javascript, you can see that it has some logic to replace them.

At this point, I think the easiest thing to do is to figure out how to kick off a video using the Plex html web page. But that might be above my Javascript understanding.


----------



## jgametest

Unless you are a Plex Pass subscriber you will not be able to see the full effect of the ChromecastApp. As a paid subscriber they grant full access to their products before they decide to release to the general public.

https://plex.tv/subscription/about
Monthly $3.99 Yearly $29.99 Lifetime $74.99

They just recently released an updated Plex Home Theater which replaced The Plex Media Center. Personally I'm still on the fence if in March if I will switch to Roku. We will be cable cutting on the 31st of January. But hey Brighthouse should not be too sad, I'm still paying for 20 MBPS and the Digitial Phone.


----------



## ntlord

There is no paid app for chromecast. I do have Plexpass. But that won't matter from what we are trying to do. The plex JavaScript I pointed to is the key, as it's responsible for parsing the MPD file and playing the mp4 chunks.


----------



## jgametest

Went digging in the support forums and I found this link.

https://forums.plex.tv/index.php/to...ld-plexweb-theoretically-need-for-tivo-html5/

there is a voting section for the team to work on projects with the most votes. I tried clicking on it, but since I'm not a Plex Pass subscriber I was not allowed access

https://forums.plexapp.com/index.php/topic/56867-opera-tv-store-app-sony-tvs-tivo-more/


----------



## ntlord

Yea, the plexpass thread just has a bunch of people requesting it, nobody is actually trying to do anything about it. I think it's fair to say that we (in this thread) have gotten the furthest. The good news is that because the Tivo supports MPEG-DASH, it should be possible, which is better than we were before when we thought it was going to be impossible because of lack of HLS support. The problem is that it is going to take a lot of work because Plex outputs what is in-effect a proprietary MPD file (containing those variables I mentioned earlier). 

For this to work, somebody would have to write some Javascript to parse the proprietary MPD file, fill in the proper variables and make the calls to get the individual chunks. The rest can then be handled by passing the chunks to the MediaSource API. The Plex javascript for chromecast I posted earlier, already does all of this but it is obsfucated so its not easy to figure out how. Nevertheless, if somebody were good with Javascript they could probably repurpose the Chromecast javascript.

My problem is that I'm no longer a developer, and my skills are pretty rusty. Further, work is going to become pretty busy for me over the next 3-months, and therefore I don't have the considerable time (given my rusty programming skills) it would take for me to make this happen. Although, I believe there is enough information in this thread to give someone else the tools needed to make this happen.


----------



## jgametest

Do you think our outcome would be more interesting if we tried to launch this as an open request from Kickstarter? It seems if the reason is enough and has a big fan base things happen. Look at the results of the Veronica Mars Movie or products that launched from it.

Perhaps we could make a plea to any or all willing participants to donate either time or funds to get this idea off the ground. It seems like all though our hearts are in the right place we are against a few factors (Time and Money).

https://www.kickstarter.com/


----------



## bradleys

TiVo doesn't have nearly that kind of user base to support a Kickstarter program...

And frankly, I do not think you would like the end product anyway of these video / audio limitations cannot be overcome.

I will continue to use PyTiVo to transfer content from my library - and if I get really tired of that lutdated solution, I will pick up a cheap Chromecast.


----------



## jgametest

I'm thinking I am close to declaring defeat. We have 5 days before our cable is cut off. Wife has been recording as much as possible for the kids (shows) that are not available on Hulu or Netflix. It's funny since I have been searching so much on Amazon for Chromecast and Roku in Bing, this is all the ad's that hit my browser on my laptop. Now my inquiry nags me trying to appeal for an answer. That's what I call aggressive advertising.


----------



## wmcbrine

pyTivo, lutdated? Pshaw, I say.


----------



## ntlord

Again, I reiterate that it this is almost certainly possible. There shouldn't be any video limitations, but it's possible that we can only achieve 2.0 audio.

For me, it's not about the money, so a kickstarter doesn't mean anything. I truly don't have the time. 

If someone could convince the Plex devels, to let us have a look at the chromecast JavaScript unobsfucated, then it may be more achievable in the short term.


----------



## bradleys

wmcbrine said:


> pyTivo, lutdated? Pshaw, I say.


Interesting typo...


----------



## wmcbrine

bradleys said:


> Interesting typo...


I just copied it from your post.


----------



## bradleys

wmcbrine said:


> I just copied it from your post.


I know - I was talking about "my" interesting typo. And my intention wasn't to offend, I have been using PyTiVo for years...

OTOH, the only SD menu that ticks me off is the "My Videos" share, and I can't watch videos from my library on my Minis...

I use the PyTiVo shares a lot!


----------



## ntlord

Ok. I have good news and bad news.

First, the good news. I GOT IT WORKING!!

I hacked the google javascript code I posted earlier and the LG interface. It is fully working, but very hacked together.

Now, the bad news. I have a very limited amount of time to work on this. So, it would probably take me months until I could get something release ready. So, I will post it at some point in the very near future, and hopefully someone else can take it from there.


----------



## jmbach

Looks like somebody is actively working on it. New Development - Opera TV App Store (Tivo, Sony TV, Samsung BluRay, etc.) Perhaps you can add your knowledge to his.


----------



## ntlord

I'm not sure how active that development is since the developer seems to have gone radio silent for the last few weeks.

In any event, my code can be downloaded below:

https://mega.co.nz/#!Q1V0zC5J!dz3fTJppSpMZbwIg8V3aGwbCMgwP7cM4WhsY9lrHThA

You need to run it in a web server, and then point the Tivo to it via the URL loader. As I said before it is very preliminary, and the code is pretty hacky. But I think it is a pretty good start.

A few issues I know about:


It's painfully slow if a you have a big library <--this will take some more serious tweaking with how the posters from TV Shows and Movies are displayed. 
The sliders are visible in some of the library menus <--I'm sure this is some weird CSS thing. I'm a novice those when it comes to that kind of stuff
There seems to be some remnants of previous screens when you transition through the pages 
No fast forwarding and rewinding <--this might require some effort, but its possible
The timer bar when a movie is playing is not working <--should be pretty easy to get working
 Resuming from a place within a video doesn't work <--should be pretty easy
 Subtitles are on by default <- this is really easily fixed. Just tweak a setting in inside the transcoder. 
 Display is slightly askew on a Mini. Works fine on my roamio though.


----------



## moyekj

ntlord said:


> I'm not sure how active that development is since the developer seems to have gone radio silent for the last few weeks.
> 
> In any event, my code can be downloaded below:
> 
> https://mega.co.nz/#!Q1V0zC5J!dz3fTJppSpMZbwIg8V3aGwbCMgwP7cM4WhsY9lrHThA
> 
> You need to run it in a web server, and then point the Tivo to it via the URL loader. As I said before it is very preliminary, and the code is pretty hacky. But I think it is a pretty good start.
> 
> A few issues I know about:
> 
> 
> It's painfully slow if a you have a big library <--this will take some more serious tweaking with how the posters from TV Shows and Movies are displayed.
> The sliders are visible in some of the library menus <--I'm sure this is some weird CSS thing. I'm a novice those when it comes to that kind of stuff
> There seems to be some remnants of previous screens when you transition through the pages
> No fast forwarding and rewinding <--this might require some effort, but its possible
> The timer bar when a movie is playing is not working <--should be pretty easy to get working
> Resuming from a place within a video doesn't work <--should be pretty easy
> Subtitles are on by default <- this is really easily fixed. Just tweak a setting in inside the transcoder.
> Display is slightly askew on a Mini. Works fine on my roamio though.


Great progress!

Something doesn't look right in some of the code though. In system/script/player.js the forward & rewind functions make references such as:
this.media.playPosition
this.media.playTime
this.media.seek(pos);

However this.media = document.getElementById("v") and in player.html:

i.e. It's an html5 video object which doesn't have the above properties or the seek function, so I'm confused by the above?

Back when I implemented my trial player, I used video object "currentTime" property for setting play position. So in this case for skip forwards it should be something like:
this.media.currentTime += 30;
clearInterval(this.timer);
And for skip backwards, something like:
this.media.currentTime -= 8;
clearInterval(this.timer);

However, in this application the above sometimes work as expected but mostly not - i.e. very flaky behavior. It seems related to how much video buffer is available whether they work or not. And for a transcoding application I don't know if time-based positioning will work properly?

And for calculating scrollbar pct position it would be:
this.media.currentTime*100/this.media.duration
The above returns consistent/proper number so can be used to set scrollbar position.


----------



## ntlord

Ok. I've got one better. I got HLS working!

All you need to do is change the Plex transcode profile to make the audio AAC, and everything works. If you point it to the m3u8 file in the video tag.

To be clear: plex initially returns an MPD file, which points to the .m3u8 file. You would need to deal with that, but that is super simple - not true, the mpd file works too

Since dash is super complicated to get working, that seems like the much easier path.

Also with respect to the seeking. It doesn't look right because I left a bunch of the old code in there from the LG app. That's why you are confused. You can assume that any code you find in there is from the LG app, and needs to be retrofitted to work.


----------



## ntlord

I've updated the code to work with HLS instead of dash

It can be downloaded here:

https://mega.co.nz/#!A4UnGB6C!3XNMhqwGX1r5LUm4yHe84uGII4wx8G0OeqWMKfdDvto

The buffer bar, fast forward and rewind should be working now.

The only thing left to fix is the GUI stuff, and then its ready to roll.

Inside the zip is a file called "Tivo.xml" place that in your profiles directory in your Plex install

edit: wrong url, it's now fixed

edit2: ff/rewind does not seem to be working. It works in safari though, so it might be a limitation of the Tivo

edit3: I "fixed" the weird fading that occurs when you transition from the section titles to the recently added items. I just disabled the previews.


----------



## moyekj

There are still some issues with time display (for me the "total" part of "current/total" doesn't display) and the time bar is not updated - those can probably be fixed pretty easily. However setting currentTime doesn't seem to work at all now so skip forwards and backwards don't work. I don't think it's entirely TiVo Opera browser issue because I was able to get skip to work in my non transcoding prototype TiVo media player. But that was probably about a year ago or longer, so I need to go back and try that again to see if it still works there. It could be related to how Plex serves up the video to the TiVo Opera browser that is the issue.
Without functioning skip the usefulness of this application is greatly reduced.
I haven't yet tried FF/REW (instead of skip) accomplished by changing play back speed to see if that works yet.


----------



## ntlord

I'm starting to think that might be an HLS thing. But I'm not sure. 

The reason why the bar is messed up has to do with the duration element. It seems to be returning NaN. The easy fix is to just grab the duration from the plex XML. 

I worked on this a bit more last night, and got it fixed up.

One issue left that I'm having trouble with is the aspect ratio. In my version using dash it seemed to work fine (the video element would automagically resize). For the HLS version, the aspect ratio is off (the video element just sizes to the full scree). I'm not an HTML/CSS expert, so I'm kind of at a loss with this one.


----------



## moyekj

For the aspect ratio issue if you look at video element in player.html it defines width & height as 100% which I don't think was the case for the Dash version:


Code:


<video
    width="100%"
    height="100%"
    autoStart="true"
    id="player">
</video>

I suspect the issue may be that. Perhaps removing those width/height parameters would fix the problem?

I think the duration issue can be resolved by getting duration inside video object "loadedmetadata" trigger event, since the property doesn't get set until the video is loaded and when that event is triggered.

A question for you. When working on this I find it very frustrating that the TiVo Opera browser seems to cache code, so when I make changes to code and run it again on the TiVo, I don't have a way to clear the cache and force my updated code to be loaded. I end up renaming a bunch of files and giving a different URL to the URL Loader to make it work, but that gets old in a hurry. Do you know a way of clearing/flushing the TiVo Opera browser cache short of rebooting the TiVo?


----------



## ntlord

I tried that. I think I had 1280x720 in the dAsh version. No go. I also tried no parameter and just setting width to 100%. Also no go


----------



## moyekj

Inside "loadedmetadata" trigger event function I think you can get videoHeight and videoWidth properties of the source video and then based on that decide how to size the video while preserving the aspect ratio?


----------



## ntlord

Thanks. I read somewhere that might work. I'll give that a shot when I have a chance.

As to caching. I just change the directory I have it stored on my laptop. It's not fancy, but it works.

One thing I was planning to do was change all of the javascript imports to passing fake parameters, like this:

http://stackoverflow.com/questions/7413234/how-to-prevent-caching-of-my-javascript-file

I should probably get a github setup with this so we aren't duplicating efforts.

I've fixed a few issues already. For example, you can speed up the thumbnail loading, but doing one massive append to the html instead of appending each thumbnail. I also fixed the weird scroll bars too.


----------



## moyekj

For the video sizing issue, I post relevant snippets from my previously written player which used to size videos properly.
The video element in html had this:


Code:


<video id="video" autoplay height="auto"></video>

Register event listener functions:


Code:


video.addEventListener('loadedmetadata', videoSize, false); // Video 1st loaded
video.addEventListener('timeupdate', videoInfo, false); // Video play position changes




Code:


function videoSize() {
   var minw = 1280; // Want this min width
   var w = video.videoWidth;
   if (w < minw)
      w = minw;
   video.style.width = "" + w + "px";
}

function videoInfo() {
   var duration = video.duration;
   var current = video.currentTime;
   if (current < 5)
      videoSize();
   info.innerHTML = formattedTime(current) + " / " + formattedTime(duration); 
}

NOTE: I think the sizing during "loadmetadata" trigger didn't always work which is why I also call that function within 1st few seconds of "timeupdate" trigger just to be sure it gets done.


----------



## ntlord

Hmm. It doesn't seem to be working. I tried a bunch of different things, including this (the example linked to with the retry code):

http://stackoverflow.com/questions/17056654/getting-the-real-html5-video-width-and-height

It does not seem like those variables get set. I wonder if it is an HLS thing


----------



## moyekj

Strange. I tried this in "loadmetadata" trigger:
video.setAttribute("width", "" + video.videoWidth);
video.setAttribute("height", "" + video.videoHeight);

But querying always returns "null":


Code:


$("#message").html("w=" + video.getAttribute("width") + " h=" + video.getAttribute("height"));
$("#message").show();

EDIT: Even worse, I did this inside "timeupdate" trigger function:


Code:


$("#message").html("w=" + video.videoWidth + " h=" + video.videoHeight);
$("#message").show();

And I always get w=0 h=0

So looks like HLS is not giving video dimensions which would explain why attempts to use the variables to set dimensions don't work.


----------



## moyekj

setting video playbackRate property > 1 or < -1 doesn't work either so no go on FF/REW. I don't know if Plex client/server model even allows for that to work?


----------



## ntlord

I think its just HLS support with Opera TV. All of these features work in safari, including playbackRate and setting currentTime to seek. I think HLS is just broken in Opera, which is not surprising.

It may make sense to switch back to MPEG-DASH. For sure, under dash we could implement seeking. It would just be a question of getting the right segment, and putting it on the buffer. 

BTW, with respect to the caching. If you add the appropriate no cache meta tags to the HTML and add a fake parameter to the javascript imports (e.g. "?nocache=1.0), it won't cache. When you make a change to javascript just change the parameter in the html (e.g. ?nocache=1.1).


----------



## moyekj

Thanks for the no caching tips - that is very helpful.
I attach to this message my very simple html5 video test for TiVo. I confirmed last night that 30 sec skip forwards and 8 sec skip backwards work fine for it. If you want to try it out just edit the video.html to replace test videos I have in there with ones that you have available to your web server.

It did seem like perhaps the mpeg-dash version was a little better behaved, but I think I did still have trouble seeking with it as well, though it did work some of the time. So that was more likely a web server buffering related issue as you say.


----------



## gonzotek

Thanks for the tip about the no-cache meta tag. Here's a js snippet that'll save some time and sanity while editing the js and/or css, by generating the script/link tags, including a cache-busting timestamp:


Code:


<script>
var styleSheet=document.createElement("link")
styleSheet.setAttribute("rel", "stylesheet")
styleSheet.setAttribute("type", "text/css")
styleSheet.setAttribute("href", "style.css?ts=" + new Date().getTime())
document.getElementsByTagName("head")[0].appendChild(styleSheet);

var script=document.createElement('script');
script.type='text/javascript';
script.src="script.js?ts=" + new Date().getTime();
document.getElementsByTagName("body")[0].appendChild(script);
</script>

I include that at the bottom of my index.htm file(just above ). Combine that with the html meta tag ntlord pointed out, and the cache should now not be used at all while using the Opera developer tools (n.b. for future readers: you'd probably want to go back to cached resources for most files for 'release' versions of the code).


----------



## moyekj

Just for completeness on the no caching setup, this is the correct html header to use right?


Code:


<header>
 <meta http-equiv="Cache-Control" content="no-store"/>
</header>


----------



## gonzotek

moyekj said:


> Just for completeness on the no caching setup, this is the correct html header to use right?
> 
> 
> Code:
> 
> 
> <header>
> <meta http-equiv="Cache-Control" content="no-store"/>
> </header>


I haven't checked it yet, and would have used content="no-cache", but I'd assume either no-store or no-cache would work. If not, here's a mess of cache -related meta tags to try:


Code:


<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />


----------



## moyekj

Well, the caching tricks don't seem to work for me. I have this in index.html:


Code:


<head>
<meta http-equiv="cache-control" content="no-cache"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script src="system/script/jquery-2.0.3.min.js"></script>
<script src="system/script/jquery.lazyload.js"></script>
<script src="system/script/jquery.mousewheel.js"></script>
<script src="system/script/jquery.querystring.js"></script>
<script src="system/script/jquery.caret.js"></script>
<script src="system/script/jquery.tooltips.min.js"></script>
<script src="system/script/plex.js"></script>
<script src="system/script/index.js?<?php echo time(); ?>"></script>
<script src="system/script/language.js"></script>

And I have this in player.html:


Code:


<head>
<meta http-equiv="cache-control" content="no-cache"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script src="system/script/jquery-2.0.3.min.js"></script>
<script src="system/script/jquery.lazyload.js"></script>
<script src="system/script/jquery.progress.js"></script>
<script src="system/script/jquery.mousewheel.js"></script>
<script src="system/script/jquery.querystring.js"></script>
<script src="system/script/jquery.tooltips.min.js"></script>
<script src="system/script/plex.js"></script>
<script src="system/script/player.js?<?php echo time(); ?>"></script>
<script src="system/script/language.js"></script>

I then load index.html in browser once and play a video, then exit back out to URL loader using the skip back button a few times, make a change to system/script/player.js and then re-load index.html by pressing GO and run same video and see my changes are cached from last load... Frustrating. If the php part wasn't working then I figure it wouldn't load in 1st place, but it does load the file the 1st time (after a TiVo reboot to make sure cache is clear), so I think the php trick is OK.

Just in case, I went back to manually adding ?version=# prefix as part of the .js load instead of the php trick, and updating version after each player.js change, and it still doesn't work. So the caching is still happening...
NOTE: I even go so far as to kill my webserver and start it again between code changes to make sure it isn't caching something, but still no dice.


----------



## jgametest

How exactly do you enter the test page into the URL Redict page. The only one I can type out is plex.tv and logon where it's not showing my page correctly. I did add the the tivo file in the profile page. When i tried to type in my http://127.0.0.1:32400/web/index.html this comes back as "broken" with a sad dog holding the cord from within Opera.


----------



## moyekj

You can't use 127.0.0.1:32400 since 127.0.0.1 is the URL of your TiVo when you are running on the TiVo. You need to replace that IP with that of the Plex server. i.e. If computer running Plex is 192.168.1.200 then you would enter http://192.168.1.200:32400 as the URL.


----------



## gonzotek

moyekj said:


> Well, the caching tricks don't seem to work for me. I have this in index.html:
> 
> 
> Code:
> 
> 
> <head>
> <meta http-equiv="cache-control" content="no-cache"/>
> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
> <script src="system/script/jquery-2.0.3.min.js"></script>
> <script src="system/script/jquery.lazyload.js"></script>
> <script src="system/script/jquery.mousewheel.js"></script>
> <script src="system/script/jquery.querystring.js"></script>
> <script src="system/script/jquery.caret.js"></script>
> <script src="system/script/jquery.tooltips.min.js"></script>
> <script src="system/script/plex.js"></script>
> <script src="system/script/index.js?<?php echo time(); ?>"></script>
> <script src="system/script/language.js"></script>
> 
> And I have this in player.html:
> 
> 
> Code:
> 
> 
> <head>
> <meta http-equiv="cache-control" content="no-cache"/>
> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
> <script src="system/script/jquery-2.0.3.min.js"></script>
> <script src="system/script/jquery.lazyload.js"></script>
> <script src="system/script/jquery.progress.js"></script>
> <script src="system/script/jquery.mousewheel.js"></script>
> <script src="system/script/jquery.querystring.js"></script>
> <script src="system/script/jquery.tooltips.min.js"></script>
> <script src="system/script/plex.js"></script>
> <script src="system/script/player.js?<?php echo time(); ?>"></script>
> <script src="system/script/language.js"></script>
> 
> I then load index.html in browser once and play a video, then exit back out to URL loader using the skip back button a few times, make a change to system/script/player.js and then re-load index.html by pressing GO and run same video and see my changes are cached from last load... Frustrating. If the php part wasn't working then I figure it wouldn't load in 1st place, but it does load the file the 1st time (after a TiVo reboot to make sure cache is clear), so I think the php trick is OK.
> 
> Just in case, I went back to manually adding ?version=# prefix as part of the .js load instead of the php trick, and updating version after each player.js change, and it still doesn't work. So the caching is still happening...
> NOTE: I even go so far as to kill my webserver and start it again between code changes to make sure it isn't caching something, but still no dice.


If most of the development action is happening in player.js, I'd suggest not generating the timestamp in php but doing it in javascript as I detailed above. Then you only need to refresh the html one more time so that from then on, every following time the document loads, Opera will generate a newly timestamped script tag, forcing it to fetch the script from the server. I haven't had a chance to test any of the meta (no)caching tags, but I've been using the javascript method with the TiVo/Opera environment for awhile now with no issues, so I'm certain about that.

Other options: 
1) The webserver can potentially send no cache headers(this is easy in most proper web servers like Apache or with access to the source code, e.g. pytivo; it may be not so easy if you're just piggybacking on some half-baked server that's part of some other project).

2) Rather than rebooting things, in the URL loader, just add an extra parameter there: http://server/myscript.html?v=1 and keep changing it (still more work than it should be).

I'll try some things out and write out detailed steps of what works/doesn't if I can find some time later this weekend.


----------



## jgametest

I wish


----------



## moyekj

OK, I got caching to work using your method, but only after having to move the js loading trick to very bottom of the html page as you mentioned. So I have this at bottom of index.html page (before ):


Code:


<script>
var script=document.createElement('script');
script.type='text/javascript';
script.src="system/script/index.js?ts=" + new Date().getTime();
document.getElementsByTagName("body")[0].appendChild(script);
</script>

And similarly in player.html:


Code:


<script>
var script=document.createElement('script');
script.type='text/javascript';
script.src="system/script/player.js?ts=" + new Date().getTime();
document.getElementsByTagName("body")[0].appendChild(script);
</script>

BTW, I've moved focus back to the mpeg-dash version since the HLS version has too many limitations that perhaps can be overcome using dash version.


----------



## ntlord

I switched back to dash too. I got seeking mostly working. Its a bit unstable on resume, but it seems to work most of the time. I'll post the new code tommorow.


----------



## ntlord

I've set up a github, it can be accessed here:

https://github.com/ntlord/PlexTivo


----------



## moyekj

Great update! My biggest issue with mpeg-dash now is the volume is extremely low compared to the hls version when playing on the TiVo. Do you know how to get an audio boost?


----------



## ntlord

Good catch. I just updated the github. It was a stupid remnant from the Google player. It had the volume set to 10%

The only thing I haven't worked on yet is subtitles and different audio streams. That should be pretty simple to get working.

I'm thinking about switching some of the pages to server-side rendering. What do you think of an app similar to AppleTV PlexConnect? It would do some server-side rendering of the pages, and spoof the DNS of the "Moviefone" application so that the Plex client can be launched without having to open the opera store.

I'm not planning on submitting this to the Opera TV store because I don't really have the time to deal with them. Also, I've been talking with the person in the Plex forums working on this, and it sounds like he has a better GUI frontend that works with MyPlex.


----------



## ntlord

What about the TivoConnect XML? Has anyone tried to spoof the tivoconnect XML to the tivo and try to add in some sort of "application/html" item, and see what happens?

I'm just trying to figure out how the "Moviefone" application actually shows up on the Tivo. The rest of the icons seem to appear based on the TivoConnect xml.


----------



## moyekj

I was thinking along exactly those lines for DNS spoofing so one could bypass the URL loader, but wasn't exactly sure how to go about doing that. Yes, bypassing Opera TV and the developer requirement would make this much more accessible to everyone.


----------



## moyekj

How about spoofing the "Web Video Hotlist" launch point? Using that URL allows me to launch it directly via MindRPC uiNavigate operation (bypassing Opera TV URL launcher):


Code:


{"type":"uiNavigate","uri":"x-tivo:web:https://hotlist.samba.tv"}

i.e. The URL to be spoofed would be:


Code:


https://hotlist.samba.tv

EDIT, the AOL url works as well for direct launch as you already figured out:


Code:


https://app.hd.aol.com/secureapp/aolon/tv/html5-tivo/index.html


----------



## ntlord

People would need to static IP their tivo boxes, and set the DNS to the server. The server would then intercept the all requests to "hd.aol.com" from the box. That might break some other stuff though. So, if we wanted to make it really tricky, we could send a redirect to the raw IP of hd.aol.com for anything that isn't the moviefone app.

The moviefone request looks like this to host "hd.aol.com":

GET /appstart.html?app=moviefone&device=tv&platform=html5-tivo&secure=true 

Basically, what you need to do is borrow the PlexConnect DNS server. Have it look for "hd.aol.com" and redirect that to a python webserver

Then, when the python webserver sees a request for "appstart.html" with a parameter "app=moviefone" it would send a redirect to IP of PlexTivo app/index.html (presumably on the same python web server).

Otherwise, for all other requests it would figure out the IP of the "hd.aol.com" server, and send a redirect to that raw "IP" + whatever resource it requested

Since my time is limited. I'd appreciate it someone could help with this part. That way, I can focus on the webapp side of things

EDIT: or the samba.tv url


----------



## ntlord

moyekj said:


> How about spoofing the "Web Video Hotlist" launch point? Using that URL allows me to launch it directly via MindRPC uiNavigate operation (bypassing Opera TV URL launcher):
> 
> 
> Code:
> 
> 
> {"type":"uiNavigate","uri":"x-tivo:web:https://hotlist.samba.tv"}
> 
> i.e. The URL to be spoofed would be: https://hotlist.samba.tv


I with you. You could then write an HME app to add it to the menu.

But this still begs the question of whether we could spoof the TivoConnect XML going to the tivo unit and add it an item with the type "x-tivo/web"? I'm thinking that might work.

Edit: Also does it have to be HTTPS? Can you try with just http?


----------



## moyekj

I tried the TivoConnect XML angle a while back and using type = x-tivo/web, but didn't have any luck. But that was over a year ago. I'll give it another try perhaps some time this weekend.


----------



## ntlord

Ok, let's scrap tivoconnect XML for now. I'm concerned the https is going to cause a prob with certificate checking though. If it works with http, this should be simple


----------



## moyekj

Unfortunately, using http instead of https for both the AOL & Web Video URLs resulted in the dreaded:


Code:


ERROR: RPC error response:
{
   "text": "Not allowed.",
   "debug": "",
   "code": "notAllowed",
   "type": "error"
}

BTW: The YouTube launch point is:


Code:


https://www.youtube.com/tv

Which is therefore also https and too popular to spoof anyway.

The problem with DNS spoofing in general is it will require TiVo users change TiVo network settings and also keep the DNS server running 24/7 so as not to affect normal operation, so I'm not sure it's a good long term solution.

It actually may be easier to just focus on the app itself for now and then submit to Opera TV for approval. If you don't want to do it I'm sure someone else here could volunteer.


----------



## moyekj

Attached zip file has updated player.js with some minor changes/fixes + capability to arbitrarily jump n minutes forwards or backwards.
With this enhancement, to jump n minutes forwards you enter # minutes desired for the jump with remote followed by FF press.

Examples:
To jump 20 minutes ahead on remote enter:
2,0,FF

To jump 8 minutes backwards on remote enter:
8,REW

You can enter a max of 3 digits, and entry times out after 5 seconds.

Skipping backwards during my brief testing sometimes causes video playback to just freeze and not recover, and other times seeking can take several seconds. It may be nice to put up some kind of seeking message while video seek is in progress, but I couldn't figure out good way to do that.

If you prefer code contributions more directly via email PM your email address and we can communicate that way.

EDIT: More changes made and player.zip file re-attached:
* Pause toggle
* Detects end of play and returns screen to video info page instead of just sitting frozen of last video frame
* Removes leading hour 00: characters in current time + duration since it takes unnecessary space for shorter clips
* Make use of existing timer function for my changes instead of registering video events as I was doing previously

EDIT 2: Remove zip file here - merged changes into Git instead.


----------



## moyekj

FYI, I tried TiVoConnect XML but even the TiVo sample doesn't run since you have to have your TiVo test platform authorized to allow it to run, and my Roamio Pro isn't authorized. (I can get the launch icon to show up under Apps & Games, but launching gives V401 error message).
So another locked door by TiVo. Launching via HME is the most likely next best option short of Opera TV submission.


----------



## moyekj

Another minor change to the code is to make Pause a toggle. i.e. If in pause mode then switch to play mode and vice-versa. Easy enough to implement and I can pass along the easy code changes if wanted.
I registered my Mini as a developer device today and verified it seems to work OK.
(NOTE: There's something wrong with the virtual keyboard that comes up when asking to enter Plex server URL as left/right arrows skip a column making it a challenge to enter the server URL).

I experimented today a little with fast forward and rewind (-1 < speed > 1) but that didn't work for me.


----------



## moyekj

FYI, I re-attached updated player.zip file in post above with more changes/cleanup as summarized in post.


----------



## ntlord

Great. I'll try to merge in the changes later today. 

Just as an FYI, I'm going to be pretty busy this week with work stuff, so I won't have much time to work on this. If you'd like I can give you guys access to the github repository. You can check changes in directly. Alternatively, you can fork it, and I can merge in the changes from your fork. 

Just signup for an account on github, and tell me the user name.

Edit: I also recognize some people won't want to have the DNS client, but for me running it 24/7 doesn't really matter, but having a menu item would be nice. Maybe we can make that piece optional. The other benefit the DNS client would give is the ability to have some server-side rendering baked in with minimal effort (I'm not saying we couldn't do that without the dns client, it would just be a pain). 

I also know the dash client also still have some stability issues when seeking. I'm not precisely sure why though. As far as I can tell, the buffer just stalls some times. Any help with debugging that would be much appreciated. FYI, you can use "jsconsole.com" for remote debugging on the Tivo


----------



## moyekj

OK, github account created. Username is same as here: moyekj
If you like I can try and merge in my changes over current git version once you give me permissions.


----------



## ntlord

Ok, you should have access now. Go ahead and merge in what you got.


----------



## ntlord

moyekj said:


> It may be nice to put up some kind of seeking message while video seek is in progress, but I couldn't figure out good way to do that.


There is some notion of that built in currently, but I have it disabled. You can see it down in the "resume" code that is called when you resume a video from a particular spot.

I disabled it because it would just say seeking, and then wouldn't go away. I think that is because we just need to have some code that removes it on the backside during an "OnProgress" event or something.


----------



## moyekj

OK, my changes so far merged into Git. I'll look into the seeking issue some more as time permits.


----------



## moyekj

ntlord said:


> There is some notion of that built in currently, but I have it disabled. You can see it down in the "resume" code that is called when you resume a video from a particular spot.
> 
> I disabled it because it would just say seeking, and then wouldn't go away. I think that is because we just need to have some code that removes it on the backside during an "OnProgress" event or something.


 OK, I just checked in changes such that the "Seeking" dialog is displayed on skip and then is hidden once video playback resumes.

One annoying behavior I'm seeing with Plex server, is that if I stop watching a video that was being transcoding, the transcoder process continues running. And then if I connect back to Plex and try and play that video it fails. I have to 1st go to Task Manager to kill the transcoding process to get back to normal behavior. Do you know if there is a way to tell Plex to kill transcoder when it's no longer needed?


----------



## ntlord

I'll look into it later this week. One thing it could be is the code I have commented out in player that sends events to plex server. I think this is the part that tell the plex server how much you watched of the video. Don't know if that also ties it to transcoder


----------



## moyekj

I don't think it's a PlexTiVo specific issue. With Plex client on my iPad air the issue also happens - the transcoding process continues running after I've stopped watching. But I was hoping even if it is a server side issue that there was a way to force kill transcoding from the client side.

BTW, the resume feature does seem to be working with PlexTiVo as for a long title if I stop watching half way through then select to watch that title, I get the menu asking whether to resume playback or start at the beginning.


----------



## ntlord

So just to verify, because I don't seem to have noticed exactly the same problem. When you play a video, then stop, and then try to play it again, it fails? Then you kill the transcoder, and it works fine?

For me, I've noticed this issue from time to time, but not every time. Just want to make sure I'm not missing anything. If it is an occasional thing, I believe this is just a plex issue, since I've seen this issue on multiple devices.


----------



## moyekj

The failure to play again I think is just an occasional issue - it's not 100% repeatable. I'm not sure if killing the running transcoder process is a fix for that or not. But the issue with the transcoder continuing to run after I exit playback is 100% repeatable for me.

I think both of these are Plex server related issues, so what I was trying to do to workaround the issue is add some code to player.js stop() function that instead of just pausing video and backing up history would go further and kill off the transcoder process if it is running. I've tried a few things but so far no luck in getting the transcoder process to die, and I don't even know if it's possible to influence from client side.

About the only workaround I've come up with so far that works most of the time, is setting this.media.currentTime = this.media.duration - 1 in the stop function. That trick then takes transcoding process to the end of the video and lets it thus terminate normally. But that's a pretty bad hack and will also mean the "pause point" won't be saved properly.

From my Google searches on Plex I don't think it's normal/expected behavior for transcoder to continue to run when no longer needed. Even if by chance that is by design, I would like for it not to do that.


----------



## ntlord

Some quick research looks like this is possible:

This is the relevant code from PlexConnect:



Code:


 loadPage(baseURL + '/video/:/transcode/universal/stop?session=' + atv.device.udid)

;

Still stuck at the office, so I can't work on this tonight.

Btw, it also does this (which I thought was what I commented out):



Code:


loadPage( baseURL + '/:/timeline?ratingKey=' + ratingKey + 
                      '&key=' + key +
                      '&duration=' + duration + 
                      '&state=stopped' +
                      '&time=' + lastReportedTime.toString() + 
                      '&X-Plex-Client-Identifier=' + atv.device.udid + 
                      '&X-Plex-Device-Name=' + encodeURIComponent(atv.device.displayName) +
                      token );


----------



## moyekj

Working late too today so didn't get to try it until recently. This does indeed seem to work to stop the transcoder called from the stop() function:


Code:


   var url = this.plex.getServerUrl() + '/video/:/transcode/universal/stop?session=' + this.plex.X_Plex_Client_Identifier;
   retrieveDASHManifest(url);

I'll have to experiment some more when I get time to see if there is any harm calling above for non-transcoding titles.


----------



## moyekj

After some testing using the above to stop transcoder seems to work well after adding a built in delay to the history.back call. So I've checked in changes to the stop() function and also added binding of 'A' remote button to stop() function since I got tired of having to scroll over to stop graphic to stop playback. I've checked in the above changes.


----------



## ntlord

Great. I'm going to work on subtitles and audiostream now. 

Next on my list is to see if I can optimize the library display for larger libraries.


----------



## ntlord

OK, got subtitles and audio streams working. I also added an option for bandwidth selection. Right now, the option does nothing. But eventually I get that added into the transcoder.

I'm going to play around a bit with the dash.js player, to see if I can get that to work instead of my crappy dash code.


----------



## ntlord

With respect to the seeking issues, I have a sneaking suspicion that they are related to some "sloppy" math I'm doing in the code. There are a couple of places where I just round down some numbers or round them up. I'll take a closer look at this tomorrow.


----------



## moyekj

ntlord said:


> OK, got subtitles and audio streams working. I also added an option for bandwidth selection. Right now, the option does nothing. But eventually I get that added into the transcoder.
> 
> I'm going to play around a bit with the dash.js player, to see if I can get that to work instead of my crappy dash code.


 I've got several titles that have EIA 608 captions (from TiVo downloads) in video stream but I'm not able to get subtitles working. Is the subtitles feature supposed to be able to render captions as well? From the video info page when I click on the subtitles graphic my only choices are "Disable" and "Close" for everything. Maybe I'm just having the stupid caching problem again.

EDIT: I generated .srt subtitle files using ccextractor (via kmttg) and see that those do show up as selectable to enable/disable, so I guess Plex doesn't support EIA 608 captions. Anyway, I confirmed the subtitle selection and display seems to be working great in PlexTivo once I got srt files in place.


----------



## ntlord

Is the display off a little bit on the mini for you? For me, it seems to cut off a bit. It's most noticeable in the top left corner by the play button on the item screen.

Just want to make sure its not my TV.


----------



## moyekj

ntlord said:


> Is the display off a little bit on the mini for you? For me, it seems to cut off a bit. It's most noticeable in the top left corner by the play button on the item screen.
> 
> Just want to make sure its not my TV.


 I don't recall seeing a problem, but will check tonight. I use my Mini these days as my Slingbox source so don't normally use it directly on a display, but I do have it on alternate TV input so will check it tonight.


----------



## moyekj

I'm not seeing issues with Mini. Here's a snapshot from Slingbox capture of the Mini (looks the same directly on my TV):


----------



## bradleys

:up:


----------



## moyekj

For the seeking issue I noticed something tonight while watching transcoder running via Windows Taskmanager. For a transcoding title, when you perform a skip the transcoder runs as follows:
PlexNewTranscoder.exe -ss 600 ....
where 600 in above example is # seconds to seek to.
For a skip that works properly, the transcoder is killed and a new one starts with a new starting seek point, such as:
PlexNewTranscoder.exe -ss 900 ....

What's interesting is that sometimes when performing a seek and watching Taskmanager, I see 2 or more alternating PlexNewTranscoder.exe commands being run with different -ss arguments, almost like Plex is confused or something. Then if I force it to seek again if it works then taskmanger shows only 1 PlexNewTranscoder.exe with correct -ss argument, not alternating as in case when it doesn't work. Don't know if that helps or not, but I thought it was interesting.

EDIT: I haven't gone through the code carefully, but I remember making at least 1 fix previously where milliseconds were being used instead of seconds (presumably because the original code was using all milliseconds), so one thing to do is go through the code and make sure there's no millisecond vs seconds mismatch happening anywhere.


----------



## bradleys

Cart before the horse...

Since Plex has an IOS app with Chromecast already included... is there a technical reason why this wouldn't work with TiVoPlex client?


----------



## ntlord

moyekj said:


> For the seeking issue I noticed something tonight while watching transcoder running via Windows Taskmanager. For a transcoding title, when you perform a skip the transcoder runs as follows:
> PlexNewTranscoder.exe -ss 600 ....
> where 600 in above example is # seconds to seek to.
> For a skip that works properly, the transcoder is killed and a new one starts with a new starting seek point, such as:
> PlexNewTranscoder.exe -ss 900 ....
> 
> What's interesting is that sometimes when performing a seek and watching Taskmanager, I see 2 or more alternating PlexNewTranscoder.exe commands being run with different -ss arguments, almost like Plex is confused or something. Then if I force it to seek again if it works then taskmanger shows only 1 PlexNewTranscoder.exe with correct -ss argument, not alternating as in case when it doesn't work. Don't know if that helps or not, but I thought it was interesting.
> 
> EDIT: I haven't gone through the code carefully, but I remember making at least 1 fix previously where milliseconds were being used instead of seconds (presumably because the original code was using all milliseconds), so one thing to do is go through the code and make sure there's no millisecond vs seconds mismatch happening anywhere.


Thanks, with respect to ms vs. s, I'll keep that in mind. One thing I haven't looked at is whether you need to send a separate command to plex for seeking when using the transcoder. As of now, what happens is that PlexTivo requests the proper segment, and it almost always fails the first time. So I have it enabled to retry the request. On the second request, it usually works.

The other thing I'm unclear amount is whether the init segment needs to be put back in the buffer on a seek. Based on the original code, it seems so. But, when I tried that it always failed.


----------



## ntlord

bradleys said:


> Cart before the horse...
> 
> Since Plex has an IOS app with Chromecast already included... is there a technical reason why this wouldn't work with TiVoPlex client?


I'm not sure quite what your asking. But, chromecast support on the Tivo isn't really realistic without Tivo's intervention. It's not impossible, but it would take significant effort, and would be a subpar experience.

If you're asking about letting the iOS app control PlexTivo, that might eventually be possible if we can get the HME launching working


----------



## bradleys

Sorry, yes - I wasn't very clear... Sounds great - I will let you guys get back to your research.


----------



## ntlord

Just did a wireshark analysis, and PlexWeb stops and reinitializes the transcoder for each seek. 

I wonder what PlexConnect does. I tried looking at the code, but couldn't figure it out.


Edit: This should be pretty easy to get working. I hopefully can work on it tommorow, was stuck again late at the office tonight


----------



## moyekj

ntlord, since you seem to have good wireshark skills, I wonder if you can sniff out what the URL launcher is doing to be able to launch web pages on TiVo Opera browser? I'm wondering if it's using some kind of redirection which we could replicate to use for HME launching.


----------



## ntlord

I assume that because it is opened from within the Opera Store, it is just doing a javascript redirect. No need to do any HME stuff, since it lives within Opera. But, I'll check in a bit.


----------



## moyekj

That's a good point and most likely what it does. I forgot the URL launcher itself is already running in TiVo's Opera browser to begin with.


----------



## bradleys

ntlord said:


> I assume that because it is opened from within the Opera Store, it is just doing a javascript redirect. No need to do any HME stuff, since it lives within Opera. But, I'll check in a bit.


I hope you don't mind me commenting - I kind of feel like the chatty kid that isn't really contributing.

But I do love the idea of launching this outside of the Opera store. That would be *Apps & Games >> My Opera Apps >>TiVoPlex* - awfully deep and hard to discover.

If we can have an HME redirect then *Apps & Games >>TiVoPlex*, easier... If I could wave my magic wand, I would love to see it listed (or redirected) from *My shows* under either Video Providers or Devices


----------



## ntlord

Ok. I decided to switch back to HLS. I now have seeking working with it. I also have the aspect ratio working too. *Edit: The aspect ratio is probably only mostly working, I need to do some more testing on this, but it will be very simple to get working*

The only thing I can't figure out how to do is center the video on the html page. My html/css skills are terrible.

I'm going to branch the dash version, then check in this code.

Its still a little preliminary. But its enough for someone to look at the centering thing. Once we get that sorted. I think we should be on our way.

I'm fairly certain that HLS is the way to go at this point. The seeking is super stable!


----------



## moyekj

Very nice work! Yes, while seeking seems to take longer, I jumped to lots of random points both forwards and backwards it worked as expected and didn't see any of the weird behavior I posted about yesterday, and didn't get any freezes, so a lot more stable.


----------



## ntlord

bradleys said:


> I hope you don't mind me commenting - I kind of feel like the chatty kid that isn't really contributing.
> 
> But I do love the idea of launching this outside of the Opera store. That would be *Apps & Games >> My Opera Apps >>TiVoPlex* - awfully deep and hard to discover.
> 
> If we can have an HME redirect then *Apps & Games >>TiVoPlex*, easier... If I could wave my magic wand, I would love to see it listed (or redirected) from *My shows* under either Video Providers or Devices


Not at all. All comments are welcome! My plan is to implement the HME launcher like you said (assuming it is possible). The tricky part is going to be the https certificates.

I'm also considering making the "recently added items" show up as a subfolder, so you can direct launch your media.


----------



## ntlord

moyekj said:


> Very nice work! Yes, while seeking seems to take longer, I jumped to lots of random points both forwards and backwards it worked as expected and didn't see any of the weird behavior I posted about yesterday, and didn't get any freezes, so a lot more stable.


I have it set right now to use HLS (so I can test in safari), but the Tivo also supports a different type of Plex transcoding known as HTTP. In effect, I think plex is just generating a single .ts file on the fly and pumping it out chunk by chunk when you request it.

This, during my testing, seemed to be a bit quicker on the seeking. You can test it out by changing the protocol under Plex.js/getHLSTranscoding to "http." Eventually I'll make it an option.


----------



## moyekj

ntlord, do you have any sense on how "smart" the Plex transcoder is? For example if I have a video that already has H.264 video and AAC audio, all that's needed is a simple remux, not a full transcode. Similarly if it's just the audio that needs to transcode, will it leave the video stream alone? I'm getting the impression based on CPU useage monitoring for sources with H.264 video and AAC audio that it's doing a full transcode, not just a simple remux.


----------



## ntlord

No idea. I have it running in a VM, and just let it sit. I suspect plenty of people have asked that question in the plex forums though. 

If there are any parameters to control it, I'd be interested. For example, there are parameters passed to the transcoder called "directPlay" and "directStream." No idea what those do. 

There is very little documentation that I have found about the plex transcoder parameters. If you could find that, I'd be interested too. 

Any luck on centering the video vertically? I feel like an idiot not being able to get it to work. I suspect someone with modest HTML skills could get it working quickly.


----------



## moyekj

I get the feeling we may have to build in more smarts into client side and use Direct Play when appropriate.

I haven't looked at any code since you made the switch back to HLS, but I'm an html/javascript/css amateur at best, so if you can't figure it out then I doubt I could either.

gonzotek who hopefully is still monitoring this thread may be much more of an expert and may be able to provide some advice?


----------



## moyekj

ntlord said:


> The only thing I can't figure out how to do is center the video on the html page. My html/css skills are terrible.


 Can you post an example? Several videos I've tried, including 720x480 resolution which doesn't fill vertically, look centered vertically to me on my Roamio Pro. I also just tried a calibration video I have which has a centering section that looks perfectly centered to me. The source of that video 1080p if that makes a difference.


----------



## moyekj

After some experimenting tonight I'm seeing the HLS video object currentTime is always at least about 10 seconds ahead of what it should be. When I start playing a title the displayed time starts around 10-11 seconds, and the ending time displayed is about that many seconds greater than the total duration, so there's an offset in currentTime that lingers throughout.


----------



## gonzotek

I have company staying over this weekend, but I'll take a look at the centering as soon as I get a chance.


----------



## moyekj

Thanks gonzotek. I think I misunderstood what page ntlord was talking about. I think perhaps the page he is talking about is the Home page that has a strip of thumbnails of the videos for each share. That strip of thumbnails is not centered vertically.


----------



## moyekj

ntlord said:


> I have it set right now to use HLS (so I can test in safari), but the Tivo also supports a different type of Plex transcoding known as HTTP. In effect, I think plex is just generating a single .ts file on the fly and pumping it out chunk by chunk when you request it.
> 
> This, during my testing, seemed to be a bit quicker on the seeking. You can test it out by changing the protocol under Plex.js/getHLSTranscoding to "http." Eventually I'll make it an option.


 I tried using "http" protocol instead of "hls" but this seems to force matroska container to be used by transcoder and hangs up the TiVo.
I couldn't seem to work around the HLS time offset problem so was looking for an alternative. MPEG-DASH overall seems to have worked the best so far though it sometimes has seeking issues.

EDIT: I saw that the Tivo.xml under my Plex installation had matroska set as container for http protocol so changed it to mpegts and re-started the Plex server and got the "http" protocol working with the TiVo (also using start.ts instead of start.m3u8). However, it suffers the same currentTime issue as HLS though seeking does seem faster.


----------



## ntlord

Ok. Big update. Sticking with HLS/HTTP for now. Dash is just too complicated to get working

Things fixed:


Video is now centered
Bandwidth controls added
Window size controls added <-doesn't do much right now
Can switch between HLS/HTTP in the options menu
Refactored the code a bit too. 
Sends updates to plex server to save progress while watching video

Let me know what you think.

You will need to use the Tivo.xml file in the Profiles folder


----------



## ntlord

moyekj said:


> Thanks gonzotek. I think I misunderstood what page ntlord was talking about. I think perhaps the page he is talking about is the Home page that has a strip of thumbnails of the videos for each share. That strip of thumbnails is not centered vertically.


No, I was talking about the video playing. On my Roamio. The video was always stuck at the top of the screen, with huge black bars at the bottom. It should be fixed now though.


----------



## ntlord

moyekj said:


> After some experimenting tonight I'm seeing the HLS video object currentTime is always at least about 10 seconds ahead of what it should be. When I start playing a title the displayed time starts around 10-11 seconds, and the ending time displayed is about that many seconds greater than the total duration, so there's an offset in currentTime that lingers throughout.


I should be able to deal with this. I wonder if it is the same with http though.


----------



## moyekj

ntlord said:


> I should be able to deal with this. I wonder if it is the same with http though.


 Haven't tried your update yet, but as I posted the http protocol had the same currentTime offset as hls.


----------



## ntlord

I made one quick fix. Opera chokes on the highest bandwidth setting and a video that is originally 1080p. I hardcoded the resolution to 1280x720 for now.

The currentTime thing is not really a big deal as far as I consider. If I have to I'll subtract 10 from currentTime, and the problem will be solved.

Edit: my tivo seems to be crashing now when I play videos. It might have been a weird caching thing where I thought it was working but it really wasn't.


----------



## moyekj

With the latest update I'm getting audio but black screen for video - probably a sizing related problem. Whatever you did to fix your troubles with centering video (which was working for me previously) must be affecting my setup now somehow.
NOTE: I have video output of TiVo set to 1080p fixed and that was working with previous versions.

EDIT: The problem was this in player.js:
self.setVideoSize(self.media, self.aspectRatio, self.windowHeight, self.windowWidth);
Both self.windowHeight & self.windowWidth are null for me.


----------



## ntlord

Try commenting out: the self.setVideoSize() function call at roughly line 210 in Player.js. See if that fixes your problem.

I probably won't be able to work on any of this until later tommorow night


----------



## moyekj

OK, checked in a few changes:
Workaround to currentTime offset issue.
Prevent video sizing with null values.
Fix to onPause function to use proper duration.
Fix to plex setup for http protocol.


----------



## ntlord

moyekj said:


> OK, checked in a few changes:
> Workaround to currentTime offset issue.
> Prevent video sizing with null values.
> Fix to onPause function to use proper duration.
> Fix to plex setup for http protocol.


Thanks, I think we are really getting there. Not too many things left to do. Quick question, did you look into why the windowHeight was returning null?

Are you getting null for the "window.innerHeight" property? It's just odd that it works on my Tivo, but not yours.

Also, just FYI on dash. I get the impression that plex's dash support is not great. Based on my debugging I think the reason why the seeking was so unstable before was because the Plex server was not working correctly, and was really unstable when you request segments out of order. Further, DASH doesn't support the offset parameter on the transcode URL. I recognize seeking is a little slow, but its not much slower than any of the other Plex applications that rely on transcoding. So I think we stick with HLS/HTTP, and just deal with the weirdness on currentTime and video sizing.

I looked at chromecast and web with wireshark, and they both do seeking, but reinitiating the video, which means they are slow.

With respect to the video sizing, I was seeing the issue on a video that has a height of 536px. So i think the oddness of that was why it was messed up. You should also take a look at my video sizing code, I kind of just made it up on-the-fly, so it might not be right.


----------



## moyekj

I'll look at video sizing tomorrow, but I just checked in improved version of currentTime offset workaround which instead of hardcoding a fixed offset actually dynamically calculates it. I think the time offset is actually the difference in time between when the transcoder starts vs when it starts playing on the TiVo, and that can vary from title to title. I think the new code I just checked in deals with it properly based on testing with several different titles.


----------



## ntlord

Great. Looks like it is working for me. 

At some point, I'll fix the bandwidth control. Right now, that code is a little sloppy. 
The other two things on my list are fixing the rendering for large libraries. The tivo tends to choke while it is rendering. I'm envisioning some sort of lazy rendering using setTimeout. 

Second, I'm going to start looking into the HME launching stuff.


----------



## moyekj

A few more changes checked in:
My time offset code updated to deal with resume play.
Resume dialog and seek related fixes to prevent multiple transcoder jobs running.
setVideoSize updated to use window.innerHeight/Width if passed in height/width null.


----------



## ntlord

Awesome. Thanks. The other thing that we need to do is capture back events on the player, and make sure we kill the transcoder. 

What was the deal with the innerHeight/Width?


----------



## moyekj

OK I figured out the sizing issue.
plex.js getPlexHeight & getPlexWidth functions were doing this to test for null:
if (height == "null")
if (width == "null")

The null tests should be without the quotes. I've checked in fix for that and reverted setVideoSize back to what it was.


----------



## moyekj

A longer term issue I want to look into is transcoder options. DVD movies with 24 fps are very visibly jerky during panning scenes. It looks horrible on the TiVo via plex vs watching the original mpeg2 video directly on the TiVo (via streambaby or pyTivo transfer).


----------



## ntlord

moyekj said:


> OK I figured out the sizing issue.
> plex.js getPlexHeight & getPlexWidth functions were doing this to test for null:
> if (height == "null")
> if (width == "null")
> 
> The null tests should be without the quotes. I've checked in fix for that and reverted setVideoSize back to what it was.


Ok. I think we should check for null and "null". The reason I switched it the string "null" was because when it was reading out of the local storage it was returning the string "null."


----------



## ntlord

moyekj said:


> A longer term issue I want to look into is transcoder options. DVD movies with 24 fps are very visibly jerky during panning scenes. It looks horrible on the TiVo via plex vs watching the original mpeg2 video directly on the TiVo (via streambaby or pyTivo transfer).


Ok. I'm sure we can get that fixed up. Try upping the bandwidth option, and see what happens. Frankly, I haven't watched a video long enough to look at that. I also wonder if the video element resizing has anything to do with it. Presumably, the browser must do some kind of scaling, which I would imagine is pretty processor intensive.


----------



## moyekj

Regarding the transcoder, I was able to pull the full transcoder command from Plex logs so that I can run it from command line to make it easier to experiment with. I also made a short mpeg2 clip that has a panning scene of interest to look at. Running the command line transcoder and transferring the resulting ts container video to TiVo pyTivo and ts=on setting allows me to view the clip on the TiVo. I notice the same jerky movement that way. So the good news is that I don't think the Opera Browser scaling has anything to do with it, rather the transcoder is to blame. I'll have to play around with transcoder options to see if I can improve output at all, and then hopefully find a way to pass along the options to Plex setup.

EDIT: The resulting video played using VLC looks fine - not jerky. So it looks like it's TiVo decoder that has a problem with it. So this may be harder problem to fix than I thought.


----------



## ntlord

Does the same problem exist on the dash player? Not that I really want to switch back to that. But, in general, the MP4 support seems better on the Tivo. 

I would also mess around with the plex quality settings. See if lower quality/bitrate works, or if passing in the exact resolution or bitrate of the video helps. 

Also, check HLS vs. HTTP, not that I'm expecting that to matter. I would think HTTP would be better anyway because it is theoretically less overhead. 

The good news is that if you find a ffmpeg setting that works, we can tweak the Plex Profile to pass it in. What is PyTivo doing? Perhaps we just change to that.


----------



## moyekj

pyTivo with ts=on setting transfers mpegts container with h.264 & ac3 audio untouched back to the TiVo. So I adjusted Plex profile to spit out ac3 for audio instead of aac so I could transfer back encoding directly to TiVo as is.

What I've found so far is that all H.264 encodings I've generated so far using multiple kmttg ffmpeg encoding profiles (some high quality) all result in jerky video, so this may just be a general issue with TiVo H.264 decoder, since VLC plays back the same videos fine.

It would be great if the Opera browser supported mpeg2 video since the TiVo seems to handle mpeg2 decoding a lot better than H.264, and encoding mpeg2 is a lot less CPU intensive as well.


----------



## ntlord

Hmm....this could be a showstopper.


----------



## moyekj

ntlord said:


> Hmm....this could be a showstopper.


 It may not be much of an issue for non-videophile users, but I tend to notice things like this a lot... I should also try playback on my Mini just to see if it is any different.

EDIT: Mini playback has same issues as my Roamio Pro AFAICT.


----------



## ntlord

Ok. I just checked in a cleaner version of the bandwidth control code. I also disabled the 1080p transcoding, since I think the browser window is only 720p.


----------



## moyekj

After some more encoding experimentation, I find Handbrake encodings are MUCH better compared to ffmpeg. So it looks like it is possible to generate non-jerky H.264 encodings for TiVo. It may just be a matter of trying to replicate exactly in ffmpeg the settings I'm using in Hanbrake, if possible.


----------



## moyekj

I should have picked up on this a lot sooner. The big difference between Handbrake and ffmpeg, is Handbrake keeps the video frame rate at the original 23.976 fps, where ffmpeg is converting to 29.97 fps. That is what makes the picture jerky. I took the original Plex transcoding options and added -r 23.976 and that made all the difference.

So it may just be a question of telling the Plex transcoder to use 23.976 fps for source videos at 23.976 fps, or better yet just to preserve the source video fps if there is such an option.


----------



## ntlord

First, I made a quick update to make the media loading slightly faster.

Second, this should be possible. At a most, we might just need separate transcoding profiles, and we switch the device ID for the different FPS.


----------



## ntlord

Ok. The plex media items returns the frame rate. Either NTSC, 24p, PAL. It's under the "videoFrameRate" attribute of the video element. We should be able to use the Plex Profiles to solve this.

I'm fairly certain you can pass custom parameters in them

Take a look at this:

https://forums.plex.tv/index.php/topic/73702-writing-profiles-for-dlna-devices/

It looks like VideoEncodeFlags is what we need. We might even be able to pass that on the URL.

Basically, all we need to do is add a few more client profiles in the Plex.XML I have. Parse the framerate from the Plex.XML and select the right profile in the HLSTranscoding function based on the framerate. Just add it right onto the options array that's passed to the function.

I'll leave it to you, since I can't tell the difference


----------



## moyekj

I'm not seeing your commits in GIT yet. Can you push them through?


----------



## ntlord

should be in now


----------



## moyekj

OK, I created a new Tivo_24fps.xml profile and added associated code changes to change device name if source video is 24fps. My 24fps DVD sources play much smoother now.
I would have preferred a more direct way to specify target frame rate in the URL, but I can't find any documentation on Plex transcode URL to see if there is one, and several guesses yielded no results, so I guess for now we'll have to stick with above method. Changes are checked in.


----------



## ntlord

Can you add it in the same Tivo.xml file? I thought you might be able to by adding another element.


----------



## moyekj

ntlord said:


> Can you add it in the same Tivo.xml file? I thought you might be able to by adding another element.


 I don't see how. It looks like these are referenced based on protocol, so how do you have more than 1 of same protocol in same file? Going through the post you have above didn't help me as there were no examples of multiple items with same protocol.


----------



## ntlord

I mean putting two client tags in one file. For example:

<client name= tivo>

</cient>

<client name ="tivo-24fps">

</client>


----------



## moyekj

In document you link to above it says:


> Elements of a client profile
> 
> A client profile consists of the following elements:
> 
> 1. Name: how Plex Media Server refers to the profile. *Must be identical to the profile's file name*.


Plus I looked at several profiles under PMS and didn't see any with more than 1 client tag.
The URL parameters we have associated with name are:
X-Plex-Product, X-Plex-Device, X-Plex-Platform, X-Plex-Device-Name
I don't know which if any of those associate to a particular tag inside an xml profile. I'm not even sure which of them tells PMS to look for an xml file of the same name.

It would be better to have 1 xml file, but I couldn't find enough information on how to do it.
Better yet would just be a URL parameter indicating frame rate wanted instead of hard-coding inside a profile, but I couldn't find such a beast, and doesn't look like there's source code available to go digging.


----------



## ntlord

No problem. I haven't tried it, but that was what I was thinking. Oh well.


----------



## moyekj

Looks like another thing that needs attention is directPlay. I have a few sample videos that should be compatible (mp4 container, h.264 video, aac audio) but looks like get transcoded anyway even when I force set directPlay option to "1" in plex.js. Also I think the Tivo.xml file directPlay section can be expanded to include mpegts container with h.264 video and aac audio.


----------



## ntlord

I'm thinking re: direct play that we just determine if it is an mp4 with h.264 and aac from the plex media XML, and grab the file directly instead of using the transcoder. 

That reminds me, I haven't tried it yet, but I suspect that a multi-part video doesn't work.

Edit: Unless the DirectPlay section really works. But, I'm dubious.


----------



## moyekj

ntlord said:


> I'm thinking re: direct play that we just determine if it is an mp4 with h.264 and aac from the plex media XML, and grab the file directly instead of using the transcoder.


 That sounds good. So the URL in that case is just a straight pointer to the Plex file URL instead of a transcoder URL right? Do you want me to work on that or are you?


----------



## ntlord

I probably won't be able to get to it until the weekend. Busy week at work.


----------



## moyekj

ntlord said:


> I probably won't be able to get to it until the weekend. Busy week at work.


 OK, I may take a stab at it one of these nights if I get a chance.


----------



## moyekj

Checked in update to player.js to not transcode compatible videos.


----------



## ntlord

moyekj said:


> Checked in update to player.js to not transcode compatible videos.


Seek wasn't working. Got it fixed. Moved the frame rate options set into the getTranscodingOptions function.

Edit: Next up for this weekend (assuming I have time).

Multi-part video
MyPlex integration

As an aside, I'm guessing this app will never fly in Opera App store with the profiles that need to be installed on Plex


----------



## moyekj

ntlord said:


> Seek wasn't working. Got it fixed. Moved the frame rate options set into the getTranscodingOptions function.
> 
> Edit: Next up for this weekend (assuming I have time).
> 
> Multi-part video
> MyPlex integration
> 
> As an aside, I'm guessing this app will never fly in Opera App store with the profiles that need to be installed on Plex


 I don't see any seeking related changes checked in. Seeking seems to work for me with compatible videos and is almost instantaneous from my testing with mp4,h264,aac videos.


----------



## ntlord

The problem was that the seek function was calling getTranscodingOptions, but was not adding the framerate option to getHLSTranscoding for seeking. You were only adding the framerate option in the openMedia function.

I moved the adding of the framerate option into getTranscodingOptions, so now it happens for both seeking and initial play.

edit, here is the change:

Player.prototype.getTranscodingOptions = function () {
var bandwidthArray = this.plex.getAvailableBandwidths();

var options = {};
var bandwidth = localStorage.getItem(this.PLEX_OPTIONS_PREFIX + "bandwidthSelection");
if (bandwidth !=null && bandwidth != "null") {
var bwidthvars = bandwidthArray[Number(bandwidth)];
options.videoResolution = bwidthvars[2];
options.videoQuality = bwidthvars[3];
options.maxVideoBitrate = bwidthvars[4];
}
var httpEnabled = localStorage.getItem(this.PLEX_OPTIONS_PREFIX + "enableHttpTranscoding");
console.log("Enable HTTP:" + httpEnabled);
if (httpEnabled == "1") {
options.protocol = "http";
}
*options.frameRate = this.frameRate;*
return options;
};


----------



## moyekj

Oh OK got it, thanks. I thought you were talking about seeking for compatible videos which simply sets currentTime.


----------



## moyekj

ntlord said:


> As an aside, I'm guessing this app will never fly in Opera App store with the profiles that need to be installed on Plex


 Guess we'll have to see if we can do without it, or submit the profiles to Plex for approval, though having a separate profile for 24fps isn't going to fly there either.


----------



## ntlord

Along those lines do you have any source code for SWF files that works. I tried to mess around with it, but couldn't get anything to work on the tivo.

I'm hoping, albeit I recognize it is a super super long shot, that if we do a simple HTTP redirect in an SWF file that it will kick the tivo into opera. 

I think it is at least in theory possible to do this because the Netflix app seems to be some sort of hybrid.

But, I haven't lost hope yet. It looks like the DNS idea might work, if we have a smart DNS redirector. From what I can tell in my wireshark logs, at some point many of the apps switch back to HTTP after the initial launch. So perhaps, we can work with something there. 

I'm going to play around with it later tonight and this weekend.

Finally, are there any major things left on the list that you can see, that still aren't working?


----------



## moyekj

ntlord said:


> Along those lines do you have any source code for SWF files that works. I tried to mess around with it, but couldn't get anything to work on the tivo.
> 
> I'm hoping, albeit I recognize it is a super super long shot, that if we do a simple HTTP redirect in an SWF file that it will kick the tivo into opera.
> 
> I think it is at least in theory possible to do this because the Netflix app seems to be some sort of hybrid.
> 
> But, I haven't lost hope yet. It looks like the DNS idea might work, if we have a smart DNS redirector. From what I can tell in my wireshark logs, at some point many of the apps switch back to HTTP after the initial launch. So perhaps, we can work with something there.
> 
> I'm going to play around with it later tonight and this weekend.
> 
> Finally, are there any major things left on the list that you can see, that still aren't working?


 Find in attached zip file the as3 source code (keyboard.as) and the compiled flash file (keyboard.swf) that I wrote a couple of years back and confirmed still runs on my Roamio.
You can use my python HME web launcher utility and change x-tivo:web to x-tivo:flash to launch flash pages such as the .swf in the zip file.

As for compiling AS3, here is a post from a while back where I detailed what specific SDK I used to compile from source that worked for TiVo.
http://www.tivocommunity.com/tivo-vb/showthread.php?p=9328863#post9328863

It would be good to have others that may be monitoring this thread just as gonzotek try out what has been put in place so far as there are probably a few bugs left to work out still. But the major project left of course is figuring out how to launch it without going through Opera TV route.


----------



## moyekj

FYI, I think the code above is as2 which compiles more easily for TiVo. If you need as3 for some reason, here's very simple example Hello World example I used to 1st test if I could compile as3 for TiVo:


Code:


package 
{
	import flash.display.Sprite;
	import flash.text.TextField;
	
	public class Main extends Sprite 
	{		
		public function Main():void 
		{
			var mytextfield:TextField = new TextField();
			mytextfield.text = "Hello World";
			addChild(mytextfield);
		}
		
	}
	
}

If you still have trouble, let me know what you mean by "simple http redirect" in flash as I don't know what that means.


----------



## ntlord

I meant this:



Code:


navigateToURL(new URLRequest("http://www.somewebsite.com"));

I recognize its a longshot

I think the issue is that I use Macs. I'll try flashdevelop.

As for launching, I've been using an old version of your software, which seems to do the trick for flash stuff.

I did some more debugging on the DNS route. I'm not sure that is going to work, at least simply. It may be possible for the AOL based apps to get it to work, but I think at a minimum, we would have to run a transparent proxy that filters certain HTTP urls. In other words, that's a whole lot of effort. I'd also be concerned about performance issues too.

It is really too bad that Tivo blocked the web launches.


----------



## moyekj

ntlord said:


> I meant this:
> 
> 
> 
> Code:
> 
> 
> navigateToURL(new URLRequest("http://www.somewebsite.com"));
> 
> I recognize its a longshot
> 
> I think the issue is that I use Macs. I'll try flashdevelop.
> 
> As for launching, I've been using an old version of your software, which seems to do the trick for flash stuff.
> 
> I did some more debugging on the DNS route. I'm not sure that is going to work, at least simply. It may be possible for the AOL based apps to get it to work, but I think at a minimum, we would have to run a transparent proxy that filters certain HTTP urls. In other words, that's a whole lot of effort. I'd also be concerned about performance issues too.
> 
> It is really too bad that Tivo blocked the web launches.


I tried as2 equivalent since it's much easier to compile, but it all I get is a white canvas on the TiVo (didn't expect to work but worth a shot)...


Code:


getURL("http://www.google.com", "_self");


----------



## sirfergy

On my mini, I'm trying to enter the address of my Plax server and the numbers are really hard to enter, as if the tab order is wrong. Unfortunately it also appears to not enter correctly, since I can only see three numbers on the screen at a time.

Lastly, is the only way to get to the app from Opera -> Developer -> URL Loader?


----------



## ntlord

sirfergy said:


> On my mini, I'm trying to enter the address of my Plax server and the numbers are really hard to enter, as if the tab order is wrong. Unfortunately it also appears to not enter correctly, since I can only see three numbers on the screen at a time.


Ok, I'll take a look at that over the weekend. My remotes are slideout keyboard type, so its a non-issue for me. Try using the numbers on the remote, see if that is easier.



> Lastly, is the only way to get to the app from Opera -> Developer -> URL Loader?


Basically, yes. You could create a test app. But two things I've figured about that so far. Link needs to be https, and it needs to be on the Internet (i.e. non-local).


----------



## sirfergy

Thanks for the reply. I initially tried using the numbers on my remote but that didn't do anything. I'll try tomorrow on my Roamio with the slide remote.


----------



## moyekj

I'd forgotten about the issue entering Plex server address. Yes the keyboard navigation using arrow keys is very funky and skipping columns. I had to play games to enter my IP as well on my Mini.


----------



## moyekj

In the spirit of perhaps getting some more people to help test this application, here's an initial draft to get you going running this application. Suggestions/clarifications/corrections welcome.

*A - PREREQUISITES*
1. Series 4 or later TiVo and/or Mini.
2. Need to sign up as a developer for Opera TV:
https://publish.tvstore.opera.com/
3. Need to run your own web server (instructions below for that for Windows if you don't already have one)
4. Plex Media Server (obviously)

*B - REGISTERING A TIVO OR MINI WITH OPERA TV*
1. Start Opera TV on your TiVo: Apps & Games--Opera TV Store
2. Navigate to and press Menu button
3. Select About
4. Navigate to and select ID FOR DEVELOPERS
5. Make note of the 4 digit ID provided
6. In a web browser login to the Opera TV Pairing URL:
https://publish.tvstore.opera.com/paired_devices/
7. Enter TiVo name and corresponding ID
8. Back on TiVo choose Yes to accept pairing request
9. On TiVo now when you go to home page of Opera TV store there will be a "Develop" entry on top left
10. Navigate to and select "Develop"
11. Arrow down to "URL Loader" to launch the URL loader

*C - INSTALL PLEX MEDIA SERVER IF YOU DON'T ALREADY HAVE IT RUNNING*
1. Download from here:
https://plex.tv/downloads
2. Getting started documentation here:
https://support.plex.tv/hc/en-us/categories/200007268-Getting-Started

*D - TIVO PLEX CLIENT INSTALLATION*
1. Latest ntlord TiVo Plex client code can be downloaded from here:
https://github.com/ntlord/PlexTivo
2. Grab the zip file and unpack it to a fresh directory
3. The Tivo.xml & Tivo_24fps.xml files need to be copied over to Plex Media Server Profiles folder. On Windows for example this will usually be something like:
C:\Program Files (x86)\Plex\Plex Media Server\Resources\Profiles
OR
Make a folder:
C:\Users\<USERNAME>\AppData\Local\Plex Media Server\Profiles
and put copies of the .xml files there.
NOTE: Files you put in this location override the ones in the original Plex installation Profiles folder.
4. After doing that then you need to stop and restart Plex.

*E - RUN A WEB SERVER ON YOUR COMPUTER*
1. Setup web server. A light weight simple one (with an available Windows binary) is mongoose which you can download from here:
http://code.google.com/p/mongoose/
2. Run mongoose and give firewall permissions and then bring up settings. In Windows right click on the tray icon and select "Edit Settings" and if desired change the "document root" to point to the root folder where you installed PlexTivo (where the index.html file lives). Also set "listening ports" to 80 instead of the default 8080 so that you don't need to add :8080 in the URL which the Opera URL launcher app doesn't support.
NOTE: If only purpose of webserver is for running PlexTivo then easiest thing to do is copy over the mongoose executable to the PlexTivo installation folder and put it where the index.html file lives.
NOTE: You should also make sure you don't already have something else using port 80 on your computer.
3. You need to make note of the IP of the computer running your webserver, as you will need to use it in the Opera URL launcher.
You should test the webserver by typing in your computer IP into a browser to see if it responds. i.e. Open up a browser and test using using this URL (In this example IP of computer running webserver is 192.168.1.100): http://192.168.1.100

USING PYTHON SIMPLE WEBSERVER
Alternatively, you can install python on your computer if not already installed, then use SimpleHTTPServer module as a webserver. From command line go to folder where you unpacked PlexTivo and index.html file lives, then execute following python command:
On Windows something like:
c:\python\python.exe -m SimpleHTTPServer 80
(You should then grant firewall permission to execute)

On Mac and/or Linux (in this example assuming PlexTiVo zip file was unzipped under /home/user):
cd /home/user/PlexTivo-master
sudo python -m SimpleHTTPServer 80

(In "cd" command above obviously adjust the actual path to match where you unpacked the PlexTiVo zip file).

*F - READY TO RUN*
After all of the above you are now ready to run:
For this example, 192.168.1.100 and port 80 is my webserver, and 192.168.1.100 and port 32400 is my Plex server.
1. On your TiVo which you registered with Opera TV launch URL loader: Apps & Games--Opera TV Store--Develop--URL Loader
2. Type in your webserver IP and path to index.html in the launcher. For this example: http://192.168.1.100/index.html
3. You will be asked to enter your Plex server IP the 1st time you launch. In this example: 192.168.1.100:32400
NOTE: The easiest way to enter the IP is using arrow keys with your TiVo remote put the focus on the input field (above where the 7 8 9 numbers are) such that a virtual keyboard shows up on the bottom over the page. Now you can use the virtual keyboard to enter the IP, or if you have a remote with keypad you can use that.
Trying to enter the numbers using the PlexTivo keypad doesn't currently work well which is why I suggest above method.
4. After entering the Plex server IP navigate to and select the "Save" button
5. At this point you should be seeing the top level Plex view and should have access to all your Plex videos


----------



## ntlord

You also need to copy over the two XML file provided into the "Profiles" directory of the Plex server, and then restart Plex


----------



## moyekj

OK thanks. Added that and added more detail and polish. I think the keypad entry arrow navigation for the Plex Media Server URL needs to be fixed and then I think we'll be ready to invite some people to test it out.


----------



## Jace

Is it possible to run the web server on a Mac Mini ? I have my Plex Server running on a Mac Mini, would be nice not to have to stand up another machine.

or perhaps I could run the web server on VMWare / Win7 on the Mac Mini -- but that could kill the performance of the Plex Server.


----------



## moyekj

Don't see why not. All you need is a very light weight web server to run PlexTivo.


----------



## ntlord

Very simple to get working on a mac:

On my mac I use this command in the directory where the files are posted:

sudo python -m SimpleHTTPServer 80


----------



## Jace

moyekj said:


> Don't see why not. All you need is a very light weight web server to run PlexTivo.


Any suggestions on what web server to run on the Mac Mini?


----------



## moyekj

See ntlord post right above yours (requires python to be installed if you don't have it already). Execute that command in the folder where you unpack the PlexTivo zip file - where the index.html file lives.


----------



## ntlord

Ok. I made some progress on the myplex stuff. It's pretty much working. I just need to iron some of the kinks. 

moyekj, hold off on checking anything in until I've got this stuff in, so we can merge appropriately. It will probably take me through the weekend to iron out the rest of the kinks.


----------



## innocentfreak

What is supposed to happen after



> F - READY TO RUN
> After all of the above you are now ready to run:
> For this example, 192.168.1.100 and port 80 is my webserver, and 192.168.1.100 and port 32400 is my Plex server.
> 1. On your TiVo which you registered with Opera TV launch URL loader: Apps & Games--Opera TV Store--Develop--URL Loader
> 2. Type in your webserver IP and path to index.html in the launcher. For this example: http://192.168.1.100/index.html
> 3. You will be asked to enter your Plex server IP the 1st time you launch. In this example: http://192.168.1.100:32400


I am prompted to enter the IP and port of the PMS, but nothing happens when I hit save. I even tried scan and got nothing.


----------



## moyekj

It's supposed to then either give you an error message that fades away at the bottom if it can't connect, or take you to the PMS home page. Have you tried re-launching URL Loader and trying again? When you re-launch does it remember your prior entry or is it reset?

Try executing the following in a browser to see if your PMS server is responding (should return some XML with 1 or more Directory tags with a MediaContainer tag):


Code:


<PMSIP>:32400/library/sections


----------



## innocentfreak

Update:It works in Chrome, but doesn't work in Firefox for some reason for me.

I get this XML when I use that link.



> <MediaContainer size="2" allowSync="0" identifier="com.plexapp.plugins.library" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1406945578" title1="Plex Library"><Directory allowSync="0" art="/:/resources/movie-fanart.jpg" filters="1" refreshing="0" thumb="/:/resources/movie.png" key="2" type="movie" title="Movies" composite="/library/sections/2/composite/1409413151" agent="com.plexapp.agents.imdb" scanner="Plex Movie Scanner" language="en" uuid="6da2e9cd-a3fe-4ad4-8bae-f2413c9c2516" updatedAt="1409413151" createdAt="1409413151"><Location id="3" path="M:\"/></Directory><Directory allowSync="0" art="/:/resources/show-fanart.jpg" filters="1" refreshing="0" thumb="/:/resources/show.png" key="1" type="show" title="TV Shows" composite="/library/sections/1/composite/1409413140" agent="com.plexapp.agents.thetvdb" scanner="Plex Series Scanner" language="en" uuid="4c84f609-de06-4c59-afae-cd1e1351c8c2" updatedAt="1409413140" createdAt="1409413140"><Location id="1" path="T:\TV Shows"/><Location id="2" path="U:\TV Shows"/></Directory></MediaContainer>


----------



## moyekj

OK, so that means server seems OK (strange though, since I use firefox and it works OK for returning XML).

Per my question above, what happens when you re-launch URL Loader and try again. Is your previously entered PMS IP still there or is it reset? Also, what model TiVo are you running this on? (So far I've run it on Roamio Pro & Mini).

Another thing to do is to go check the Plex Logs to see if the Plex server is actually communicating at all with your TiVo, and if so, if any error messages are coming up. On Windows, the Plex logs dir is here for me:
C:\Users\<USERNAME>\AppData\Local\Plex Media Server\Logs


----------



## sirfergy

Works great on my Mini with the tip for using the onscreen keyboard.

How do I determine what's being transcoded? I see CPU usage ranging from 2-80% while watching a 1080p MP4 + AC3, and it looks great, so I doubt it's transcoding the video in real time but I'm curious.

Also, have you played with the DirectPlay profiles? Any luck?


----------



## minimeh

Just ringing in to say nice work, gents! 

I've installed this on my Win8 box with an Intel i7-3770 CPU @ 3.40GHz (4 Cores) with 16G of memory. I am experiencing some stuttering on videos. The PMS and Apache web server are both on the box. The box is connected by Ethernet to the Tivo. I doubt that it is the transcoding process or data transfer, but suspect that it is because the Tivo is a Premiere XL4 and not a Roamio. How are others seeing the Premiere work with this?

Anyway, just got it up and running and look forward to following the progress.


----------



## ntlord

minimeh said:


> Just ringing in to say nice work, gents!
> 
> I've installed this on my Win8 box with an Intel i7-3770 CPU @ 3.40GHz (4 Cores) with 16G of memory. I am experiencing some stuttering on videos. The PMS and Apache web server are both on the box. The box is connected by Ethernet to the Tivo. I doubt that it is the transcoding process or data transfer, but suspect that it is because the Tivo is a Premiere XL4 and not a Roamio. How are others seeing the Premiere work with this?
> 
> Anyway, just got it up and running and look forward to following the progress.


Try adjusting the bandwidth settings. I experience this problem while running 1080p at full bitrate on the Roamio. Perhaps you just need to lower the bitrate.


----------



## ntlord

sirfergy said:


> Works great on my Mini with the tip for using the onscreen keyboard.
> 
> How do I determine what's being transcoded? I see CPU usage ranging from 2-80% while watching a 1080p MP4 + AC3, and it looks great, so I doubt it's transcoding the video in real time but I'm curious.
> 
> Also, have you played with the DirectPlay profiles? Any luck?


It can only direct play .mp4 with h264 and aac. Everything else is transcoded.

Theoretically, although I don't think we have implemented this, it can also direct play .ts with h264 and aac, but nobody has that, so it is pretty moot.


----------



## innocentfreak

moyekj said:


> OK, so that means server seems OK (strange though, since I use firefox and it works OK for returning XML).
> 
> Per my question above, what happens when you re-launch URL Loader and try again. Is your previously entered PMS IP still there or is it reset? Also, what model TiVo are you running this on? (So far I've run it on Roamio Pro & Mini).
> 
> Another thing to do is to go check the Plex Logs to see if the Plex server is actually communicating at all with your TiVo, and if so, if any error messages are coming up. On Windows, the Plex logs dir is here for me:
> C:\Users\<USERNAME>\AppData\Local\Plex Media Server\Logs


Sorry to be more clear. I can get XML responses on all three browsers if I go to IP:32400.

Firefox refuses to save the PMS IP to go past that initial screen when going to IP:80. It works in both Chrome and IE, but both of them go to the gray background with a loading box in the bottom right which never goes away.

TiVo URL launcher on the Roamio Pro just goes to a black screen after I enter the IP similar to how the browsers are stuck in loading.

Checking the logs I do see what appears to be a bunch of errors.
[PLT_HttpServerSocketTask::Read] (4496) WARNING: NPT_CHECK failed, result=-20801 (NPT_ERROR_HTTP_INVALID_REQUEST_LINE) [(res)]
[PLT_Service::SetSCPDXML] (4912) FATAL: NPT_CHECK failed, result=-20602 (UNKNOWN) [(res)]
[PLT_Service::SetSCPDXML] (4912) FATAL: Failed to parse scpd: 
[PLT_CtrlPoint:rocessGetSCPDResponse] (4912) SEVERE: NPT_CHECK failed, result=-1 (FAILURE) [(res)]

These are just some of them.

If I go to Plex directly, I can see and play my media and it works fine on my Roku so not sure what is going on. I even tried a fresh setup on a different PC with only a handful of titles to make sure it wasn't timing out due the size of the library.


----------



## moyekj

ntlord said:


> It can only direct play .mp4 with h264 and aac. Everything else is transcoded.
> 
> Theoretically, although I don't think we have implemented this, it can also direct play .ts with h264 and aac, but nobody has that, so it is pretty moot.


 Yes, mpegts with h264 and aac is checked for as well and treated as direct play, along with mp4 with h264 and aac or mp3:


Code:


if ((container == "mp4" || container == "mpegts") && vcodec == "h264" && (acodec == "aac" || acodec == "mp3"))




sirfergy said:


> Also, have you played with the DirectPlay profiles? Any luck?


 Eveything that can be played directly is played directly. Note that the codecs that can be played directly are different than what the TiVo can handle itself directly. These are codecs that can be played by the TiVo Opera browser, which unfortunately doesn't include AC3 audio or mpeg2 video, so those have to be transcoded. Technically, though, there must be a way around that limitation as I think Netflix app gives us AC3 audio somehow. So I think there must be a way to launch the TiVo native decoder rather than going through the TiVo Opera browser to play videos, but obviously TiVo hasn't shared how to do that with us.


----------



## moyekj

innocentfreak said:


> Firefox refuses to save the PMS IP to go past that initial screen when going to IP:80. It works in both Chrome and IE, but both of them go to the gray background with a loading box in the bottom right which never goes away.
> 
> TiVo URL launcher on the Roamio Pro just goes to a black screen after I enter the IP similar to how the browsers are stuck in loading.
> 
> Checking the logs I do see what appears to be a bunch of errors.
> [PLT_HttpServerSocketTask::Read] (4496) WARNING: NPT_CHECK failed, result=-20801 (NPT_ERROR_HTTP_INVALID_REQUEST_LINE) [(res)]
> [PLT_Service::SetSCPDXML] (4912) FATAL: NPT_CHECK failed, result=-20602 (UNKNOWN) [(res)]
> [PLT_Service::SetSCPDXML] (4912) FATAL: Failed to parse scpd:
> [PLT_CtrlPoint:rocessGetSCPDResponse] (4912) SEVERE: NPT_CHECK failed, result=-1 (FAILURE) [(res)]
> 
> These are just some of them.
> 
> If I go to Plex directly, I can see and play my media and it works fine on my Roku so not sure what is going on. I even tried a fresh setup on a different PC with only a handful of titles to make sure it wasn't timing out due the size of the library.


 FYI, I can't get any Windows based browsers to work using IP:80 route either. I tried Firefox, IE and Chrome as well. That made it frustrating trying to make code changes and having to test via TiVo rather than directly through a browser. I think ntlord is able to do it on his Mac with Safari. But my Roamio Pro and Mini do work. Thanks for posting the log entries as that must provide some clue to the problem. Doesn't mean much to me right now, but perhaps ntlord may have a clue as to what is going on? Perhaps the problem with these browsers not working and your Roamio Pro not working are one and the same and would be a good problem to solve. I'm going to check if I get similar error messages in my Plex log using browsers.


----------



## ntlord

I'm not sure I understand the problem.

Are you saying that it is not able to access the web server hosting PlexTivo when it is on port 80? 

Or are you saying that you have plex running on port 80 instead of 32400?

I run my PlexTivo on apache. Although, I also have hosted it locally using the python trick I posted earlier. 


I'm totally confused.


----------



## moyekj

ntlord said:


> I'm not sure I understand the problem.
> 
> Are you saying that it is not able to access the web server hosting PlexTivo when it is on port 80?
> 
> Or are you saying that you have plex running on port 80 instead of 32400?
> 
> I run my PlexTivo on apache. Although, I also have hosted it locally using the python trick I posted earlier.
> 
> I'm totally confused.


 He's saying that when he uses a web browser to run PlexTivo (on webserver port 80), that he can't get things to work. It works to the point of entering Plex IP and port, but nothing after that. I have exactly same problem there trying to use Firefox, Internet Explorer and Chrome. I just tried Firefox again and looking at the Plex log file and there is no Plex server side error happening:

Aug 31, 2014 08:56:24:219 [4412] DEBUG - Device: Microsoft PC
Aug 31, 2014 08:58:21:024 [3764] DEBUG - Request: [127.0.0.1:53565] GET /servers (2 live)
Aug 31, 2014 08:58:21:025 [3764] DEBUG - It took 0.000000 sec to serialize a list with 1 elements.
Aug 31, 2014 08:58:21:033 [4532] DEBUG - Request: [192.168.1.226:53566] GET /library/sections (3 live)
Aug 31, 2014 08:58:21:034 [4532] DEBUG - It took 0.000000 sec to serialize a list with 3 elements.
Aug 31, 2014 08:58:21:041 [3500] DEBUG - Request: [192.168.1.226:53567] GET /channels/all (4 live)
Aug 31, 2014 08:58:21:041 [3500] DEBUG - It took 0.000000 sec to serialize a list with 2 elements.

i.e. I'm not getting any errors, and executing the above requests directly in browser does return valid XML:
PMSIP:32400/servers
PMSIP:32400/library/sections
PMSIP:32400/channels/all

So I think the issue with browsers is not some Plex related issue, but rather the PlexTivo html not being compatible, though obviously it seems to work for you using your Mac and Safari. Would be interesting to see what happens if you try and use Firefox on your Mac.

NOTE: innocentfreak's error messages he posted from Plex logs are when he is trying to use his Roamio Pro, so that seems to be a different problem entirely unrelated to specific browsers.


----------



## ntlord

It may be a cross origin thing. Can you fire up the chrome devel console, and see if you have any errors?


----------



## innocentfreak

moyekj said:


> He's saying that when he uses a web browser to run PlexTivo (on webserver port 80), that he can't get things to work. It works to the point of entering Plex IP and port, but nothing after that. I have exactly same problem there trying to use Firefox, Internet Explorer and Chrome. I just tried Firefox again and looking at the Plex log file and there is no Plex server side error happening:
> 
> Aug 31, 2014 08:56:24:219 [4412] DEBUG - Device: Microsoft PC
> Aug 31, 2014 08:58:21:024 [3764] DEBUG - Request: [127.0.0.1:53565] GET /servers (2 live)
> Aug 31, 2014 08:58:21:025 [3764] DEBUG - It took 0.000000 sec to serialize a list with 1 elements.
> Aug 31, 2014 08:58:21:033 [4532] DEBUG - Request: [192.168.1.226:53566] GET /library/sections (3 live)
> Aug 31, 2014 08:58:21:034 [4532] DEBUG - It took 0.000000 sec to serialize a list with 3 elements.
> Aug 31, 2014 08:58:21:041 [3500] DEBUG - Request: [192.168.1.226:53567] GET /channels/all (4 live)
> Aug 31, 2014 08:58:21:041 [3500] DEBUG - It took 0.000000 sec to serialize a list with 2 elements.
> 
> i.e. I'm not getting any errors, and executing the above requests directly in browser does return valid XML:
> PMSIP:32400/servers
> PMSIP:32400/library/sections
> PMSIP:32400/channels/all
> 
> So I think the issue with browsers is not some Plex related issue, but rather the PlexTivo html not being compatible, though obviously it seems to work for you using your Mac and Safari. Would be interesting to see what happens if you try and use Firefox on your Mac.
> 
> NOTE: innocentfreak's error messages he posted from Plex logs are when he is trying to use his Roamio Pro, so that seems to be a different problem entirely unrelated to specific browsers.


Sorry my errors were from the DLNA log, I missed that there were three separate current logs.

Good to know I am not alone on the browser issue.

In the actual server logs I don't see anything that is jumping out at me as an error. I tried to access both Plex Servers and I get the same black screen when launching the IP via TiVo.


----------



## ntlord

See if you can fire up Firefox or chrome JavaScript console. Post what it says


----------



## moyekj

ntlord, the fatal error I'm getting using Firefox is:

ReferenceError: event is not defined index.js:1021

So looks like event.preventDefault() is not working for Firefox.

EDIT: I see the problem. In line 1020 the event argument is missing:
$("#save").click(function () {
I changed to this and now it's working!
$("#save").click(function (event) {

innocentfreak, edit line 1020 in system/script/index.js to make above fix.
You should also edit index.html and change:
system/script/index.js?v=17
TO:
system/script/index.js?v=18
(This is to try and workaround the stupid TiVo Opera browser cache problem)

So I guess Safari and TiVo Opera browsers must be very lax in honoring code correctly since they didn't have this problem. Odd though if this does turn out to be the problem that different TiVo Opera browsers behave differently.


----------



## ntlord

I'll make this change when I check in the myplex code.


----------



## moyekj

Note to innocentfreak and others. If testing with Firefox, note that only non-transcoded videos (mp4 with h.264 video and aac audio) will play in Firefox since Firefox doesn't support the transcoding formats being used necessary to work with TiVo Opera browser.


----------



## innocentfreak

The fix let me get past the save option.

I figured out what is happening after looking at the javascript console in chrome. For some reason when I enter the IP and port on my machine, there are a ton of empty spaces after the port which results in seeing 20% listed repeatedly after the port.



> XMLHttpRequest cannot load http://PMSIP:32400 %2&#8230; /library/sections. Cross origin requests are only supported for HTTP. PMSIP/:1
> Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://PMSIP:32400%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2&#8230;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20/library/sections'.


I was able to delete them in Firefox by wiping the conf file for mongoose so I could start from scratch. It still seems to carry the issue back over to Chrome though.

It only seems to work initially and then stop so I may have something else going on.


----------



## ntlord

innocentfreak said:


> The fix let me get past the save option.
> 
> I figured out what is happening after looking at the javascript console in chrome. For some reason when I enter the IP and port on my machine, there are a ton of empty spaces after the port which results in seeing 20% listed repeatedly after the port.
> 
> I was able to delete them in Firefox by wiping the conf file for mongoose so I could start from scratch. It still seems to carry the issue back over to Chrome though.
> 
> It only seems to work initially and then stop so I may have something else going on.


Clear your browser cookies and storage


----------



## innocentfreak

I mistakenly only cleared the last hour so it didn't clear it enough originally. 

I tested one video real quick and it worked on the TiVo. 

I will play around with it more tonight.


----------



## ntlord

Ok. I fixed a number of things:

1. The IP address entry keypad is now fixed.
2. I merged in moyekj fix
3. I added myplex functionality

Right now my plex account is locked from all of the invalid login attempts during testing 

I will do a bit more testing in the morning, and check everything in.


----------



## minimeh

minimeh said:


> I am experiencing some stuttering on videos.





ntlord said:


> Try adjusting the bandwidth settings. I experience this problem while running 1080p at full bitrate on the Roamio. Perhaps you just need to lower the bitrate.


Adjusting the bandwidth settings did the trick. Looking good now!


----------



## ntlord

Ok. I checked in the latest version.

It includes myplex
It fixed the server entry keyboard
It also includes the bug identified by moyekj

One word on myplex. I hacked this in with basically no consideration of security. Your password is stored in plaintext in local storage. Keep that in mind when you test it. 

Also, I tried to do my best when testing it. But it is likely still a little buggy, especially involving the GUI entry stuff.


----------



## sirfergy

Cool! On my mini it looks like the html is being cropped, so I don't see the content around the edges. Video doesn't appear to be cropped though.


----------



## ntlord

sirfergy said:


> Cool! On my mini it looks like the html is being cropped, so I don't see the content around the edges. Video doesn't appear to be cropped though.


Yea. That is a known issue. I'm not quite sure why it is happening. Eventually, I'll probably just add in some offsets that are programmable to solve the problem.


----------



## bradleys

> 2. Type in your webserver IP and path to index.html in the launcher. For this example: http://192.168.1.100/index.html


I am having difficulty getting my web server to bind to port 80, but I can bind it to another arbitrary port - say 81 or 1024

The IP address of the computer I am running the web server on is 192.168.1.2, so I enter into the Opera URL loader http://192.168.1.2:81/index.html

Of course this isn't working - anybody want to help? 

I am sure i am doing something stupid.

////////

Interesting, when I clicked on the URL above on my iPad I get the following: looks like my web server is working fine - maybe the Opera browser cannot resolve the colon.










Little more testing - running this in IE and it seems to work quite well, the TiVo just seems to have difficulty resolving the web server URL.


----------



## ntlord

What OS are you running? Windows?

if windows run this command:

Netstat -a -n -o

That should tell you what ports you are using. 

Figure out the PID (process ID) that is using port 80. Then correlate that to a program in taskmanager.

That should at least tell you what is using port 80.


----------



## moyekj

Yes, it's pretty stupid that the Opera URL Launcher doesn't let you enter a port, so they assume you are going to use port 80 always...


----------



## bradleys

Interesting, I entered the URL without the /index.html and it found my web server fine - and gave me the Plex login page. Success!

Working!


----------



## bradleys

sirfergy said:


> Cool! On my mini it looks like the html is being cropped, so I don't see the content around the edges. Video doesn't appear to be cropped though.


I am having the same issue - I cannot see the menu options on the left hand side. Other then that, it is working ver nicely!


----------



## moyekj

bradleys said:


> I am having the same issue - I cannot see the menu options on the left hand side. Other then that, it is working ver nicely!


 I don't have trouble with that at all with my Mini. I'm using component output to TV rather than HDMI (because Mini feeds a Slingbox), so I wonder if it's an HDMI related issue? (Also I make sure my TV is set to no overscan).


----------



## bradleys

It does seem a little clipped. Arrow return on the main page is clipped, clock is clipped, rating and year are clipped...

But the big issue is - no visible play menu. On the tv I can see a little highlight off the edge of the screen and with trial and error figure out which one is play.


----------



## moyekj

bradleys said:


> It does seem a little clipped. Arrow return on the main page is clipped, clock is clipped, rating and year are clipped...
> 
> But the big issue is - no visible play menu. On the tv I can see a little highlight off the edge of the screen and with trial and error figure out which one is play. On IE I can see that it is referencing glyphicons - but isn't displaying them.


As I posted in post #133, this is what I see for my Mini component output which looks fine:


----------



## innocentfreak

bradleys said:


> It does seem a little clipped. Arrow return on the main page is clipped, clock is clipped, rating and year are clipped...
> 
> But the big issue is - no visible play menu. On the tv I can see a little highlight off the edge of the screen and with trial and error figure out which one is play.


Did you check your TV just to make sure the crop setting didn't change? My TV has a setting where I can zoom in a touch to crop the edges in case the local broadcast isn't framed right.


----------



## bradleys

innocentfreak said:


> Did you check your TV just to make sure the crop setting didn't change? My TV has a setting where I can zoom in a touch to crop the edges in case the local broadcast isn't framed right.


I can try that tonight. I do not notice a problem with any other programming or TiVo menus on my TV - and I do not want to introduce any problems either! 

I can set my Mini up as a test platform as well, and see if it gets reproduced on that platform.


----------



## ntlord

The problem occurs on my Mini too. It also occurred on another Roamio I was messing around with this past weekend. 

I think we need to add some sort of padding mechanism (which is easier said then done).


----------



## innocentfreak

bradleys said:


> I can try that tonight. I do not notice a problem with any other programming or TiVo menus on my TV - and I do not want to introduce any problems either!
> 
> I can set my Mini up as a test platform as well, and see if it gets reproduced on that platform.


It is very minor so if anything on the TiVo you will see a little more blue past the options. I run mine zoomed all the way out.

It very well could be a mini display thing though.


----------



## ntlord

just checked in a change that fixes the extra spaces in keypad input


----------



## ntlord

I just checked in a new version that includes padding. You can find it under the options menu. (on main screen, tap left, then select options)

On my mini, 25 of left padding and 35 of right padding did the trick.

Edit: you'll have to play around with the padding a bit. Because now, I'm finding 0 on left, and 35 on right works best

Edit 2: One thing I've noticed is that after you a play certain videos, things appear to be the originally correct size (i.e. no padding needed). I have no idea why this is. It is only happening for me on certain videos.


----------



## bradleys

Installed it, yeah - I am just about at the same settings 25/35 (maybe 40)

I notice the padding doesn't affect the first main screen or the video play screen. Video seems fine but the return icon at the bottom left is still cut off.

Does it seem slightly cropped from the top as well?

And just because this is testing - most of the "s" in the dialog "All Movies" is still cut off. It doesn't seem impacted by the padding changes at all.

Also when you expand the Views menu, that also seems like it is not impacted from the padding and is still cut off.

Good work, thanks!


----------



## ntlord

I only added the padding to certain elements of certain pages, so that explains the inconsistencies. I can add it to the elements you mentioned above too.


----------



## rfryar

Got it working, great job so far! I need to adjust the padding as well.. HDMI, 720p tv on this particular mini. Will see what settings work for me.

Thanks again!

Rick


----------



## avmike

I never get the prompt for the IP address of my Plex server. All I get is the following screen, with no way to navigate any of the options on the screen.


----------



## avmike

I never get the prompt for the IP address of my Plex server. All I get is the following screen (attached), with no way to navigate any of the options on the screen.

Any ideas?


----------



## bradleys

avmike said:


> I never get the prompt for the IP address of my Plex server. All I get is the following screen (attached), with no way to navigate any of the options on the screen.
> 
> Any ideas?


Is this from your browser of from your TiVo?

I had the same issue trying to view thane via Fiefox, but it works fine via IE. And of course through the opera browser.


----------



## avmike

Both.


----------



## ntlord

How are you hosting it? Are you accessing from a web browser or the Tivo?

edit: What web browser? If chrome, fire-up the developers console, and let me know what errors it is saying.


----------



## avmike

I was first hosting it on an IIS server I have running, then tried Mongoose. Same results. I see the same thing if it hit it from IE, Firefox, or Tivo. I don't have Chrome installed.


----------



## ntlord

avmike said:


> I was first hosting it on an IIS server I have running, then tried Mongoose. Same results. I see the same thing if it hit it from IE, Firefox, or Tivo. I don't have Chrome installed.


Firefox is fine. Fire up the web console under developer tools, and let me know what errors you see.


----------



## avmike

ntlord said:


> Firefox is fine. Fire up the web console under developer tools, and let me know what errors you see.


Thanks. Found the issue. Needed to register .JSON MIME type. Works now.


----------



## avmike

Incidentally, I also have the screen cut off on the left and maybe the top on my Tivo Mini. Will try directly on the Tivo tomorrow.


----------



## ntlord

I added a padding feature to solve this in the options.


----------



## bradleys

What you did works very well. 

You talked about making the padding global - front page, player page, overlaps and possible top padding- is that still in the plan?

Any traction on taking this into production?

I like it a lot and have been using it quite a bit as it currently exists.


----------



## avmike

ntlord said:


> I added a padding feature to solve this in the options.


Is that the Width and Height setting in the Options? When I adjust that, it only seems to adjust the actual playback window. My overscan issue is only on the menus, prior to playing back the video. Is there a place to adjust that?

Thanks,
Mike


----------



## ntlord

You need to update to the latest version 

edit: sorry this was ambiguous I was talking to avmike


----------



## bradleys

I did, last update was 5 days ago.

Do I need to clear the cache somehow?


----------



## ntlord

bradleys said:


> What you did works very well.
> 
> You talked about making the padding global - front page, player page, overlaps and possible top padding- is that still in the plan?
> 
> Any traction on taking this into production?
> 
> I like it a lot and have been using it quite a bit as it currently exists.


As soon as I get a chance, I'll add that. I also plan to add multi-part videos.

My problem is that my dayjob is pretty demanding (it involves long hours and frequent travel), so I don't often have that much free time. As of now, I don't really have any major plans to bring this to production (i.e. submit to opera tv store) because of my limited time. That said, nothing is stopping anybody else from attempting to submit this to the opera store or something.

I'm certainly willing to help, but I'm not sure I can really take on something like this full time.

Edit: If someone can figure out a way to launch this without using the Opera store, let me know though. That might change things for me.


----------



## bradleys

Thanks ntlord - it is a great tool and we all appreciate the effort.


----------



## avmike

ntlord said:


> You need to update to the latest version
> 
> edit: sorry this was ambiguous I was talking to avmike


Thanks ntlord. I could have sworn I was running the latest version, but alas, I was not. Updated to the latest version, padded 24 on the left and the right. All is well on the mini!

Congratulations, you got us a functional Plax client on Tivo faster than the one in development for the Xbox One. Granted, I'd prefer to have the hardware of the Xbone so I could possibly play my BD's ripped to MKV at full resolution and bitrate - but this will work for now! 

Thanks,

Mike


----------



## ZeoTiVo

bradleys said:


> Any traction on taking this into production?


I second this. I got it working but am now looking for a way to be able to use it without going to URL loader so my family can use it as well.

am I missing something or do we need for it to become part of Opera Store before it can be used more easily


----------



## moyekj

ZeoTiVo said:


> I second this. I got it working but am now looking for a way to be able to use it without going to URL loader so my family can use it as well.
> 
> am I missing something or do we need for it to become part of Opera Store before it can be used more easily


 That's the hard part. It used to be possible to launch arbitrary web pages on the TiVo Opera browser until 20.4.1 software update where TiVo intentionally took away that capability (thanks TiVo as always for trying to stop 3rd party development). So now it looks like the only way to make this easier to launch would be a formal submission through Opera TV which sounds like could be a pretty daunting process and most likely would require pretty intense further development and support to achieve. As ntlord stated, he doesn't have the time to deal with that, and I wouldn't want to deal with that either. So unless we can find someone willing to step up and go down that path we're stuck with the current limiting way of launching this app for now.


----------



## ntlord

In theory, you can create a sample app in the submission portal. The tricky part is that it must be pointed to an external URL, which means it must be hosted externally.

But this works, and will give you nearly identical functionality as if it was submitted to the portal. The only difference being you need to go to the develop category.


----------



## moyekj

ntlord said:


> In theory, you can create a sample app in the submission portal. The tricky part is that it must be pointed to an external URL, which means it must be hosted externally.
> 
> But this works, and will give you nearly identical functionality as if it was submitted to the portal. The only difference being you need to go to the develop category.


 But doesn't that mean anyone who wants to use it still has to sign up as a developer?


----------



## ntlord

moyekj said:


> But doesn't that mean anyone who wants to use it still has to sign up as a developer?


Yes it does. They just don't have to use URL loader. I really wish Tivo would open up the RPC call for websites. I just don't understand why they are so hostile to developers.


----------



## HarperVision

Thanks for the assistance with Python in the other thread ntlord, I'm all up and running now, you're awesome!!!

I actually came to this thread to check into this very thing (to see if there's a way to just open the app without going to URL loader), and see it's not so easy. What a shame, I was going to use this for the whole family, but I'm sure they'll balk at having to do it this way. 

Quick question. In my testing I ended up putting in a whole buttload of URLs into the URL loader app. Is there a way to delete the ones I don't need anymore so it only leaves the one pointing to the Plex server, so at least that part is easy for the family?


----------



## bradleys

Forgive me if this is a neophyte question - However, davidblackledge has been working on a WEBZ browser that I assume uses the old HMO protocols. 

I don't suppose we could use that approach as a wrapper around the PLEX application?


----------



## moyekj

bradleys said:


> Forgive me if this is a neophyte question - However, davidblackledge has been working on a WEBZ browser that I assume uses the old HMO protocols.
> 
> I don't suppose we could use that approach as a wrapper around the PLEX application?


 davidblackledge is using all HME. He's not using the TiVo Opera browser. The challenge is to launch a custom URL on the TiVo Opera browser which used to be easy via RPC (I even had an HME way of launching a web page), but then TiVo cut us off.


----------



## bradleys

moyekj said:


> davidblackledge is using all HME. He's not using the TiVo Opera browser. The challenge is to launch a custom URL on the TiVo Opera browser which used to be easy via RPC (I even had an HME way of launching a web page), but then TiVo cut us off.


You guys were discussing the possibility of a URL redirect a while back, any traction on that idea?

Can we run a local process that will redirect the link for AOL.on to Plex?


----------



## ntlord

HarperVision said:


> Thanks for the assistance with Python in the other thread ntlord, I'm all up and running now, you're awesome!!!
> 
> I actually came to this thread to check into this very thing (to see if there's a way to just open the app without going to URL loader), and see it's not so easy. What a shame, I was going to use this for the whole family, but I'm sure they'll balk at having to do it this way.
> 
> Quick question. In my testing I ended up putting in a whole buttload of URLs into the URL loader app. Is there a way to delete the ones I don't need anymore so it only leaves the one pointing to the Plex server, so at least that part is easy for the family?


Not that i know of.

The best route is to create a custom application on the Opera Submission Portal. Then instead of using the URL loader, you just click on a Plex Icon that you can create. The problem with this is that the app must be hosted on the Internet for this to work. This is a relatively family-friendly solution.

I think the easiest option here is someone can find a free way to host this on the internet that will work with Opera submission portal. I tried dropbox, which in theory should work, but it didn't work.


----------



## ntlord

bradleys said:


> You guys were discussing the possibility of a URL redirect a while back, any traction on that idea?
> 
> Can we run a local process that will redirect the link for AOL.on to Plex?


Good thought. The problem with this is that Tivo, as far as I know, uses https to launch all of its apps, which in effect makes this idea a non-starter because even if you spoof the DNS, the opera browser is smart enough to check the https certificate.

The way the apple tv guys (PlexConnect) got around this is by installing a custom certificate authority on the apple tv. Unfortunately, I'm aware of no way of doing this with the Tivo.

Basically, our only hope is that: (1) Tivo is dumb enough to eventually let an app go through that is not launched via HTTPS; (2) they reenable the RPC call, or someone can come up with a way to generate the proper permissions that will allow the RPC call (3) someone figures out another way to launch Opera (i.e. through flash or HME); or (4) someone "jailbreaks" the tivo.

The last option isn't as hard as it seems. Afterall, the Tivo does have flash, one of the most exploited and insecure frameworks out there. But, even if it were possible to gain root access to the Tivo, we would just be playing wack-a-mole with them, which isn't worth it.


----------



## davidblackledge

bradleys said:


> Forgive me if this is a neophyte question - However, davidblackledge has been working on a WEBZ browser that I assume uses the old HMO protocols.
> 
> I don't suppose we could use that approach as a wrapper around the PLEX application?





moyekj said:


> davidblackledge is using all HME. He's not using the TiVo Opera browser. The challenge is to launch a custom URL on the TiVo Opera browser which used to be easy via RPC (I even had an HME way of launching a web page), but then TiVo cut us off.


My ears were burning.

The only related hope is that we know it's somehow possible to launch a Flash app from HME as shown by the EWz "TiVo's Hidden Apps" page when you try to launch a few key apps that in turn redirect to the Flash version.

Perhaps whatever is done to launch the flash app could also be used for a web page. Or maybe there is access to launch the web page from Flash. It's a bit of a long shot, and currently none of us have a clue how to do it.


----------



## HarperVision

Excuse me for my ignorance, but didn't they switch from Flash to Haxe?


----------



## davidblackledge

HarperVision said:


> Excuse me for my ignorance, but didn't they switch from Flash to Haxe?


Somebody else can answer better than I can, but since I'm here...

I'm pretty sure they use Haxe, compiled to a Flash target. So it is technically Flash when it's running, but they program in Haxe so they can also compile to other targets without maintaining a whole bunch of different versions.

And that's just the UI... I don't know that the Youtube or Netflix apps are done that way... they may just be regular Flash.


----------



## moyekj

We tried the long shot of trying to launch html from Flash (since I can still launch arbitrary Flash pages via RPC) and it didn't work. Of course even if it did, then TiVo would just shut down ability to launch arbitrary Flash as well... It's quite amazing how almost openly hostile TiVo has become about 3rd party development. I'm still cringing at having to try and reverse engineer again an updated RPC certificate for kmttg since the one I'm using expires sometime next year.


----------



## bradleys

What about a URL redirect from within the Opera app store? That way we could select some arbitrary Opera app and people wouldn't have to sign up as developers.


----------



## ntlord

bradleys said:


> What about a URL redirect from within the Opera app store? That way we could select some arbitrary Opera app and people wouldn't have to sign up as developers.


This might be possible.


----------



## moyekj

Still, the problem with URL redirect = DNS spoofing means you need to run your own DNS server (running 24/7) and point your TiVo(s) at it, which I see as even less friendly than signing up to be an Opera developer and using URL launcher.


----------



## bradleys

ntlord said:


> In theory, you can create a sample app in the submission portal. The tricky part is that it must be pointed to an external URL, which means it must be hosted externally.
> 
> But this works, and will give you nearly identical functionality as if it was submitted to the portal. The only difference being you need to go to the develop category.


I have no issue signing all my TiVo's up as developer platforms, that was really pretty easy. The hard part will be finding a reliable hosting site...

I just think we need to find some solution if we really want this to be useful.

If it's just for the 5 of us, then I suppose it is fine as it as it is.

Anyone ever try one of these free hosting sites?

http://www.000webhost.com

http://www.freewebhostingarea.com


----------



## jmbach

What about Box or Google drive instead of Dropbox for hosting the app.


----------



## bradleys

Interesting, I didn't know google drive could do that...

http://www.labnol.org/internet/host-website-on-google-drive/28178/

Would this be an issue?

[*] Google Drive cannot be used for serving dynamic pages like those generated through PHP scripts on a WordPress website.


----------



## ntlord

bradleys said:


> Interesting, I didn't know google drive could do that...
> 
> http://www.labnol.org/internet/host-website-on-google-drive/28178/
> 
> Would this be an issue?
> 
> [*] Google Drive cannot be used for serving dynamic pages like those generated through PHP scripts on a WordPress website.


No. This is also done client side. No server side dynamic pages.


----------



## bradleys

ntlord said:


> No. This is also done client side. No server side dynamic pages.


So google sounds like a viable, free hosting space... That is cool.

Now, do we still have problems with the xml profiles? That and the user padding, where do those variables reside?


----------



## ntlord

I'm probably going to regret this :

try this:

http://plextivo.appspot.com

Edit: there are some limits. But I'm hoping that the app is so small its not going to matter.


----------



## bradleys

You started this whole thing! 

I will test it when I get home in a few minutes.


----------



## avmike

http://plextivo.azurewebsites.net

Sent from my Surface Pro 3 using Tapatalk


----------



## bradleys

Neither are working for me - I am sure it is something I am not doing correctly. 

I put the URL in the launcher - and that bring up the login properly. I enter the 192.168.0.2:32400 and it won't get past that page.

Do I need to make a firewall change?


----------



## ntlord

bradleys said:


> Neither are working for me - I am sure it is something I am not doing correctly.
> 
> I put the URL in the launcher - and that bring up the login properly. I enter the 192.168.0.2:32400 and it won't get past that page.
> 
> Do I need to make a firewall change?


You must use MyPlex if the website is hosted externally. It's a limitation of the opera browser on the tivo


----------



## bradleys

Yeah, I tried that too... It just clocks - and then goes back to the login screen.

I will play with it a little more tomorrow and see if I can figure it out.

Thanks


----------



## HarperVision

ntlord said:


> I'm probably going to regret this :
> 
> try this:
> 
> http://plextivo.appspot.com
> 
> Edit: there are some limits. But I'm hoping that the app is so small its not going to matter.





avmike said:


> http://plextivo.azurewebsites.net
> 
> Sent from my Surface Pro 3 using Tapatalk


They both work 100% fine on mine. 

CORRECTION: It isn't working when I try on my TiVo. The first time I tried in my Safari web browser, and it worked. On the TiVo I get the flash of it almost working, then this error message: "The PMS Server was not found on the address specified"


----------



## jmbach

Because this is an area of TiVo I really have not looked into, I am going to display my ignorance. In the app section of TiVo Central, you can add an app via IP address, either internal or external. Is this where a certificate and https is needed to launch the app. Or is there something more than that involved.


----------



## tatergator1

jmbach said:


> Because this is an area of TiVo I really have not looked into, I am going to display my ignorance. In the app section of TiVo Central, you can add an app via IP address, either internal or external. Is this where a certificate and https is needed to launch the app. Or is there something more than that involved.


I think the issue with that is the Apps section is for adding apps written for Tivo's HME. The current Tivo Plex implementation uses HTML5 and Tivo's Opera browser. There's no way to launch an arbitrary URL from an HME app.

I think moyekj indicated this was possible back before 20.4.1, but Tivo revoked that ability for subsequent versions.


----------



## ntlord

HarperVision said:


> They both work 100% fine on mine.
> 
> CORRECTION: It isn't working when I try on my TiVo. The first time I tried in my Safari web browser, and it worked. On the TiVo I get the flash of it almost working, then this error message: "The PMS Server was not found on the address specified"


Are you using MyPlex or an IP address? It will not work with an IP address. You must use MyPlex if you are using an external website


----------



## jmbach

This may have been already addressed but could Enter Webz be used to enter the URL needed.


----------



## jmbach

Or is that access limited to only Flash. The Opera browser then in not an app in the sense that Enter Webz is. If it was then opera would essentially be a translator from html5 to flash.


----------



## bradleys

ntlord said:


> Are you using MyPlex or an IP address? It will not work with an IP address. You must use MyPlex if you are using an external website


I am getting a similar result - login with user name and password and it clocks like it is looking for content. After a set period of time, it presents the login screen again.

When I have a chance, I am going to try temporarily turning off the firewall on my router to see if that has any impact.


----------



## HarperVision

ntlord said:


> Are you using MyPlex or an IP address? It will not work with an IP address. You must use MyPlex if you are using an external website


I tried both with the same result.


----------



## mr_pink

bradleys said:


> If it's just for the 5 of us, then I suppose it is fine as it as it is.


Make that 6 

Getting this going on my Roamio now - then will test the external URLs and report back. Awesome work ntlord.

So I follow - current track here is we find a stable external host that seems to be working then one person submits an opera app that is just a url link .. or am I misreading that and each of us will have to create our own opera app submission?

In any event I could host on one of my paid hosting plans for stability-sake if necessary.


----------



## bradleys

The idea is, that it is a lot easier to add an Opera app into the developer / test section than a fully approved app.

It would take a lot more development before this would pass opera store requirements.

So to make it usable for the community - and potentially encourage more community developers to take some interest - we would make it available via the developer section.


----------



## ntlord

HarperVision said:


> I tried both with the same result.


Try it in a web browser. Do you use my plex regularly? You need to forward ports in your firewall (32400 to Plex ip)


----------



## avmike

Hmm... Strange... It was working when I first set it up, and now it's not working for me either. I switched back to my local server for now. I'll see if I can figure it out tomorrow.



Sent from my Surface Pro 3 using Tapatalk


----------



## HarperVision

ntlord said:


> Try it in a web browser. Do you use my plex regularly? You need to forward ports in your firewall (32400 to Plex ip)


That's what I initially tried it on, and said it worked on Safari. Then I was like, Doh....I want it to work on my TiVo, and so tried it on my TiVo and it didn't work, so I reported that back with the correction.

I have never used MyPlex before this instance. I'll check the firewall and see what gives.

Does this error message give any clues?: "The PMS Server was not found on the address specified"


----------



## ntlord

HarperVision said:


> That's what I initially tried it on, and said it worked on Safari. Then I was like, Doh....I want it to work on my TiVo, and so tried it on my TiVo and it didn't work, so I reported that back with the correction.
> 
> I have never used MyPlex before this instance. I'll check the firewall and see what gives.
> 
> Does this error message give any clues?: "The PMS Server was not found on the address specified"


Not really. Make sure myplex is working in safari first. You need to make sure myplex is working properly (I.e. It is logged in on your server).

I think one way to check is to go to my.plex.tv, and making sure it can log into your server. You also need to forward 32400 to your Plex server in your router.

I had some problems too when I was initially working with this, but I thought it had to do with my firewall, I have a very complicated set up. I fixed it by tweaking some settings in my firewall. If nobody else can get it to work, I'll go back to the drawing board.

For those in the know. Basically what I'm doing is logging into myplex, grabbing the registered external ip and port, and using that as the Plex server. Perhaps there are different ways to get it to work.


----------



## ntlord

Does anyone want to take a shot at some logos? 

Starting first with the plex.png in the images folder?

Eventually, images for Opera Devel store would be nice too.


----------



## bradleys

I can - I won't be able to get to it until later this week.


----------



## ntlord

bradleys said:


> I can - I won't be able to get to it until later this week.


Great that works. I plan to release an update later this week too.

It will deal with multipart videos / duplicate copies.

I also plan to add pagination to the all movies page so that it loads quicker.


----------



## bradleys

Just a few minutes playing on my ipad.

It needs cleaning up, but just wondering if this is the kind of thing you were looking for. Will it be an issue to use the TiVo logo?


----------



## Worf

I would've just used the TiVo logo directly with the Plex logo rather than have TiVo written out as well. 

Of course, there ARE trademark issues with using both logos since it looks like it could be an official product of both Plex and TiVo.


----------



## wr0ngway

Awesome job with all the reverse engineering 

FYI, you could probably use github pages to host the app since it is a purely clientside app. Maybe have a build step that published the current version of the app to the pages repo, or just develop purely in there (but on branches so you don't break current releases). You'll get https for free, and can also map a custom domain to it if you desire (though then you'd have to buy a https cert as well as the domain)


----------



## ntlord

wr0ngway said:


> Awesome job with all the reverse engineering
> 
> FYI, you could probably use github pages to host the app since it is a purely clientside app. Maybe have a build step that published the current version of the app to the pages repo, or just develop purely in there (but on branches so you don't break current releases). You'll get https for free, and can also map a custom domain to it if you desire (though then you'd have to buy a https cert as well as the domain)


Good point. I'll look into it.


----------



## ntlord

Worf said:


> I would've just used the TiVo logo directly with the Plex logo rather than have TiVo written out as well.
> 
> Of course, there ARE trademark issues with using both logos since it looks like it could be an official product of both Plex and TiVo.


You raise a good point. Maybe it makes sense to just change the name completely to avoid any trademark issues. Certainly, if the plan is to eventually submit to Opera store, I think we will need to do this.

Any ideas on new names?


----------



## bradleys

I browsed around to see how Plex apps are branded on other systems and also how third paty apps are branded on TiVo.

They generally do not mix branding. I recommend staying with the simple Plex logo. As for the Plex logo itself, it is not displayed with the registered mark making it free use. I am looking for (and cannot find) specific guidelines from Plex, but frankly without the circle r...

As for TiVo, they are very clear on how and when you can use their trademark images. One specific restriction is combining the TiVo image with another brand - such as above.

You can use the "TiVo" proper noun as part of a description - so should be able use the "for TiVo" competent, but I really don't think that is necessary.

So, I think it is best not to try to brand this as a TiVo specific


----------



## HarperVision

ntlord said:


> You raise a good point. Maybe it makes sense to just change the name completely to avoid any trademark issues. Certainly, if the plan is to eventually submit to Opera store, I think we will need to do this. *Any ideas on new names?*


PleXo, PliVo, PleVo, TeX, TiLex?


----------



## jmbach

+1 PleVo


----------



## ntlord

So I reached out the Plex guys regarding their branding guidelines.

They were super cool about it all. But, basically it boils down to this. We can't use their name or logo. However, we can call our app something like "XYZ for Plex" as long as XYZ isn't something generic like Player for Plex or Remote Control for Plex.

More info can be found here:

https://plex.tv/legal (click on trademark tab)

So that being said any other ideas? I like PleVo, and I can run it by them. But I'd rather just stay completely clear of Plex or Tivo.

FYI: There are also working with me on the framerate issue (i.e. need for two profiles). So I'm hopeful we can solve that too.


----------



## davidblackledge

HarperVision said:


> PleXo, PliVo, PleVo, TeX, TiLex?


:up: PleXo
EDIT: nevermind... I posted 2 minutes too late.


----------



## davidblackledge

ntlord said:


> So that being said any other ideas? I like PleVo, and I can run it by them. But I'd rather just stay completely clear of Plex or Tivo.


AYVABTU: Plex for TiVo.
All Your Video Are Belong To Us.

Vexed

TVX


----------



## ntlord

New version checked in:

Added multi-part videos
Fixed a framerate bug where if the framerate was not listed in the first XML stream element it wouldn't work.


Let me know if this is working for everyone. Especially the framerate part.

Edit: I also updated the appspot app.


----------



## wr0ngway

I'm unable to get the app from appspot to work on my Roamio Pro.

The app launches ok, and I'm able to input the PMS ip, but it is unable to connect. I tried both with and without the port, same deal. The IP does get saved for subsequent relaunches of the app, and I do see the flash of "The PMS server was not found on the address specified!" when I click Save.

The appspot app does work from my laptop (where the PMS is located), as well as from my phone (on same wifi as laptop/tivo). I'm able to hit the tivo IP from my laptop, so I think my connectivity is ok. Nothing shows up in the PMS log when I try and connect from the tivo, so either it is not reaching it, or something funky is happening between input and http request. I tried clearing multiple times, etc, and doesn't seem to have any trailing spaces in input dialog when I reload after saving, so ...

Any ideas?


----------



## ntlord

wr0ngway said:


> I'm unable to get the app from appspot to work on my Roamio Pro.
> 
> The app launches ok, and I'm able to input the PMS ip, but it is unable to connect. I tried both with and without the port, same deal. The IP does get saved for subsequent relaunches of the app, and I do see the flash of "The PMS server was not found on the address specified!" when I click Save.
> 
> The appspot app does work from my laptop (where the PMS is located), as well as from my phone (on same wifi as laptop/tivo). I'm able to hit the tivo IP from my laptop, so I think my connectivity is ok. Nothing shows up in the PMS log when I try and connect from the tivo, so either it is not reaching it, or something funky is happening between input and http request. I tried clearing multiple times, etc, and doesn't seem to have any trailing spaces in input dialog when I reload after saving, so ...
> 
> Any ideas?


Yes. You have to use myplex.


----------



## jmcmeekan

I currently store all my media and run Plex Server on my machine running Windows Server 2012 essentials. However, port 80 already has a number of services listening to it, so does anyone have any ideas what I can do in this case. The PlexTivo or whatever it ends up being called sounds great but the local web server is the one thing holding me back from testing. Thanks.


----------



## HarperVision

jmcmeekan said:


> I currently store all my media and run Plex Server on my machine running Windows Server 2012 essentials. However, port 80 already has a number of services listening to it, so does anyone have any ideas what I can do in this case. The PlexTivo or whatever it ends up being called sounds great but the local web server is the one thing holding me back from testing. Thanks.


I just switched it to port 84 and it worked.


----------



## jmcmeekan

HarperVision said:


> I just switched it to port 84 and it worked.


Did you switch the port on the web server (are you running mongoose)? And if so, did you have to change anything in the TiVo Plex client in order for it to work? Thanks.


----------



## ntlord

jmcmeekan said:


> Did you switch the port on the web server (are you running mongoose)? And if so, did you have to change anything in the TiVo Plex client in order for it to work? Thanks.


Either 1. Put it in a subdirectory of the server you are running
2. Use myplex and the appspot URL I posted earlier in this thread


----------



## wr0ngway

ntlord said:


> Yes. You have to use myplex.


Thanks, ok, I understand now - just out of curiosity, what is the limitation of running in the tivo browser, does it not allow one to connect to any IP or any internal IP (192.*, 10.*)? Does it also prevent connecting to a hostname that happens to map to any internal ip (e.g. if I try to connect to foo.com which I have mapped in my router to the internal ip)?

Either way, I still couldn't get the appspot url to work with myplex - It seems to login to myplex ok, but never leaves the login dialog. I ended up just running the app on a local server, and that works great.


----------



## ntlord

wr0ngway said:


> Thanks, ok, I understand now - just out of curiosity, what is the limitation of running in the tivo browser, does it not allow one to connect to any IP or any internal IP (192.*, 10.*)? Does it also prevent connecting to a hostname that happens to map to any internal ip (e.g. if I try to connect to foo.com which I have mapped in my router to the internal ip)?
> 
> Either way, I still couldn't get the appspot url to work with myplex - It seems to login to myplex ok, but never leaves the login dialog. I ended up just running the app on a local server, and that works great.


Yes. The tivo seems to have some sort of security limitation that when you connect to an outside domain, it will not let you send XML requests to local IP addresses.

People seem to be having some problems with myplex, and I would love to figure out the issue. But, I haven't heard any more feedback on it. It works for me, but I had to tweak some settings in my firewall. I thought that was unique to me (I have a very complicated set-up), but perhaps it is not.

Do you know for sure that your myplex works without my app (i.e. have you used it on an ipad/iphone/android externally to your network)?. Do you have 32400 forwarded through your router to the plex server?

Thanks,

ntlord


----------



## rjmitche

ntlord said:


> Yes. The tivo seems to have some sort of security limitation that when you connect to an outside domain, it will not let you send XML requests to local IP addresses.
> 
> People seem to be having some problems with myplex, and I would love to figure out the issue. But, I haven't heard any more feedback on it. It works for me, but I had to tweak some settings in my firewall. I thought that was unique to me (I have a very complicated set-up), but perhaps it is not.
> 
> Do you know for sure that your myplex works without my app (i.e. have you used it on an ipad/iphone/android externally to your network)?. Do you have 32400 forwarded through your router to the plex server?
> 
> Thanks,
> 
> ntlord


First - excellent work! I'm thrilled to have access to Plex via the TiVo! I've got it working great via a local server but having a similar experience as others with myplex and the appspot URL.

What I can add is that the appspot URL works fine outside of my home network. In other words, if I go to http://plextivo.appspot.com from work (via a browser), I see the PlexTiVo app and all my videos are available. However, if I try it from home (via the Tivo or a browser) I appear to get signed in but, I just return to the initial page (sign in/out).

I turned on the 'developer tools' in various browsers to try and see what was happening - maybe this will be useful:

Firefox:


Code:


Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://<myPlexServerIP>:13340/?X-Plex-Token=<removed>. This can be fixed by moving the resource to the same domain or enabling CORS.

Chrome:


Code:


HTML1300: Navigation occurred.
File: plextivo.appspot.com
en
SEC7118: XMLHttpRequest for https://my.plexapp.com/users/sign_in.xml required Cross Origin Resource Sharing (CORS).
File: plextivo.appspot.com
SEC7119: XMLHttpRequest for https://my.plexapp.com/users/sign_in.xml required CORS preflight.
File: plextivo.appspot.com
SEC7118: XMLHttpRequest for https://my.plexapp.com/pms/servers.xml?auth_token=<removed> required Cross Origin Resource Sharing (CORS).
File: plextivo.appspot.com
SEC7118: XMLHttpRequest for http://<myPlexServerIP>:13340/?X-Plex-Token=<removed> required Cross Origin Resource Sharing (CORS).
File: plextivo.appspot.com
CSS3114: @font-face failed OpenType embedding permission check. Permission must be Installable.
File: glyphicons-regular.ttf
SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd.
File: plextivo.appspot.com

Internet Explorer:


Code:


GET http://<myPlexServerIP>:13340/?X-Plex-Token=<removed> net::ERR_CONNECTION_REFUSED jquery-2.0.3.js:8829
x.support.cors.e.crossDomain.send       jquery-2.0.3.js:8829
x.extend.ajax                           jquery-2.0.3.js:8829
PLEX.checkLibraryServerExists           plex.js?v=192:151
Menu.initialise                         index.js?v=352:201
(anonymous function)                    (index):26
(anonymous function)                    language.js:50
l                                       jquery-2.0.3.js:8829
c.fireWith                              jquery-2.0.3.js:8829
k                                       jquery-2.0.3.js:8829
(anonymous function)                    jquery-2.0.3.js:8829


----------



## mr_pink

For those having appspot issues, especially if it works form outside your network but not from inside, check to see that your firewall/router allows you to connect to your external IP on 32400 from inside your network (Nat hairpin/uturn). I was forwarding port 32400 in to my plex server and if I am outside my network I have no problems connecting via myplex, but if I tried from inside I was having issues. I had to to add additional rules to accommodate hitting the external IP from inside.


----------



## bradleys

Mr. pink, what kind of rules did you add to your routing config?


----------



## mr_pink

I have a Palo Alto firewall so I had to do this: https://live.paloaltonetworks.com/docs/DOC-1678

I don't want to confuse the situation - I think basic home consumer routers that support port forwarding take care of this automatically - but if you are running a more advanced firewall it may be something that is easily overlooked.

If you are on your own LAN and can browse to http://internalip:32400 and get a response, and then you try browsing to http://externalip:32400 and get the same response, this is not your issue - move on. If however you get no response from http://externalip:32400 from inside when it works just fine from outside, you may have a hairpin/uturn nat issue to work out.


----------



## wr0ngway

Myplex does work fine for me from both outside/inside my firewall, however, by default myplex uses uPNP to map the external port, and it is never 32400 in that case - does the myplex in plextivo assume 32400 or does it try to use the mapped external port?


----------



## ntlord

mr_pink said:


> I have a Palo Alto firewall so I had to do this: https://live.paloaltonetworks.com/docs/DOC-1678
> 
> I don't want to confuse the situation - I think basic home consumer routers that support port forwarding take care of this automatically - but if you are running a more advanced firewall it may be something that is easily overlooked.
> 
> If you are on your own LAN and can browse to http://internalip:32400 and get a response, and then you try browsing to http://externalip:32400 and get the same response, this is not your issue - move on. If however you get no response from http://externalip:32400 from inside when it works just fine from outside, you may have a hairpin/uturn nat issue to work out.


This was the issue I was referring to originally when I said I had a problem unique to my firewall. I don't have palo alto, but I run a different one from sophos.


----------



## ntlord

wr0ngway said:


> Myplex does work fine for me from both outside/inside my firewall, however, by default myplex uses uPNP to map the external port, and it is never 32400 in that case - does the myplex in plextivo assume 32400 or does it try to use the mapped external port?


I believe it does. It uses the port that is returned from the myplex login xml, which should be the proper port.


----------



## rjmitche

mr_pink said:


> I think basic home consumer routers that support port forwarding take care of this automatically


I have a (relatively recent) home consumer router that supports port forwarding (D-Link DIR-860L) and I seem to have this issue. I can't find anything in the router config that would allow me to modify the behavior - maybe I'm not looking in the right places but, I've been all around the administration screens.


----------



## ntlord

rjmitche said:


> I have a (relatively recent) home consumer router that supports port forwarding (D-Link DIR-860L) and I seem to have this issue. I can't find anything in the router config that would allow me to modify the behavior - maybe I'm not looking in the right places but, I've been all around the administration screens.


You shouldn't need to set this in your consumer router. So I believe there must be other issues going on here.

I'm not sure what, but I suspect it may have to do with folks that are using the UPNP discovery (I am not, so I haven't tested it). There are like 3 or 4 different ways one can get the server list from myplex, so perhaps I'm using the wrong one.

Unfortunately, I don't have much time to look at this for next few weeks. Once things settle down, I'll take a look.


----------



## rjmitche

ntlord said:


> Unfortunately, I don't have much time to look at this for next few weeks. Once things settle down, I'll take a look.


I've got it working via a local web server (SimpleHTTPServer) so this isn't holding me back. I'm just hoping that maybe I can help troubleshoot this issue so others may benefit...

From earlier in the thread: 


ntlord said:


> It may be a cross origin thing. Can you fire up the chrome devel console, and see if you have any errors?


I think you may have been on the right track with this as I'm seeing this when I look in the Firefox developer console:


Code:


Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://<myPlexServerIP>:13340/?X-Plex-Token=<removed>. This can be fixed by moving the resource to the same domain or enabling CORS.


----------



## ntlord

Sorry, been busy. Try this again, but after you get the blocked message, try the blocked URL directly in your browser, and let me know what happens. Do you get XML displayed?

A few more questions:

1. Does it work outside of your network?
2. What do you have in "List of networks allowed without auth" setting in Plex? (Settings/Server/Network/Advanced)

What I find weird is how this works for me, and not for you. Although, it may have to do with that special route I set up that I mentioned earlier. But again, you shouldn't have to set up that route. 

Thanks,

ntlord


----------



## rjmitche

ntlord said:


> Try this again, but after you get the blocked message, try the blocked URL directly in your browser, and let me know what happens. Do you get XML displayed?


The blocked url is: http://<externalIP>:13340/?X-Plex-Token=<tokenValue>. If I put that into the browser, I just get 'unable to connect' -- "Firefox can't establish a connection to the server at <externalIP>:13340."



> 1. Does it work outside of your network?
> 2. What do you have in "List of networks allowed without auth" setting in Plex? (Settings/Server/Network/Advanced)


1. Yes, if I go to http://plextivo.appspot.com/ outside of my home network, it works and I am able to access the Plex videos.
2. "List of networks allowed without auth" setting in Plex is blank.


----------



## ntlord

rjmitche said:


> The blocked url is: http://<externalIP>:13340/?X-Plex-Token=<tokenValue>. If I put that into the browser, I just get 'unable to connect' -- "Firefox can't establish a connection to the server at <externalIP>:13340."


Interesting. That sounds like the uturn/hairpin issue. I thought most consumer routers addressed this. When I find some free time, I'll look into this closer.

Can someone else test this out too that doesn't have it working?


----------



## tkin1t3asy

I decided to give Plex a try to see if it would work any better than StreamBaby on Premiere. So far it has worked much better than StreamBaby with much more useable interface and decent transcoding.

The one issue I have experienced so far is that it is incredibly slow for large libraries. Loading the All Movies page can take 5+ minutes with another shorter wait for the images to fill in. This repeats every time I exit a video on go back to the page. I am not sure if this is an Opera limitation, a Plex limitation, or something the app itself could address. The speed using the site through Firefox is pretty quick, so it may be a memory or processing limitation of the Tivo.

I know large sites like Netflix have moved to dynamic rendering using AJAX calls so only the content currently displayed is pulled down or rendered. Is this something that could be implemented?

Some other minor observations:
If you press forward seek while it is in the middle of seeking it seems to go back to the beginning of the file. 
The aspect ratio of the preview image on the information screen seems off.
The aspect ratio of all the thumbnails seems off. Instead of 4:3 they are more like 2:4. This allows more to fit in the screen so perhaps this is by design.
The top or bottom row is always partially cut off. Again, this might be by design.
If you navigate to the left (home or arrow key) when you are scrolled down and then move back to the right, it takes you to the top.

Keep up the great work!


----------



## dadrepus

Just got the link from the Plex site, thanks FoxfireX for posting there.
Here's what I have done so far.
Downloaded and put Plextivo in applications. took the too xml files and copied them to library/Application support/Plexmediaserver/(created folderProfiles- in here they went...
Registered with Opera-put all necessary info there including tiVo code.
Opened up terminal and typed in sudo python -m via copy and paste.
got server info but it says it is running on http://0.0.0.0 port 80?

Put I.P. info of my mac mini into the developers section as 192.168.1.3:32400
hit save. I get a black screen.. Oh yea, i restarted the Plex server.

I sure i did something wrong but what?


----------



## tkin1t3asy

0.0.0.0 means it is listening on all network interfaces (this is normal).

A few things you can try:
1) Make sure you can go to the web server using a browser. Open up the URL using Safari or Firefox or Chrome. Does the Plex Tivo app load? If you enter the IP address into the browser window and click save are you taken to Plex?

2) See if the port is open from another machine: try telnet to 192.168.1.3 32400. Is the port open? If not, you may have a firewall issue.

3) Try going directly to the Plex UI http: //192.168.1.3:32400/web

4) Try loading a Plex client on another machine/TV/BDP/etc. Can you access your Plex server from there?


----------



## dadrepus

This si what I got when doing that in a browser:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<MediaContainer size="15" flashInstalled="1" friendlyName="Dad's Media" machineIdentifier="67a92894685e8a3e6ffbde9c6a9f5d58eaed5ec7" multiuser="1" myPlex="1" myPlexMappingState="mapped" myPlexSigninState="ok" myPlexSubscription="1" myPlexUsername="[email protected]" platform="MacOSX" platformVersion="10.9.5" requestParametersInCookie="1" silverlightInstalled="0" soundflowerInstalled="1" sync="1" transcoderActiveVideoSessions="0" transcoderAudio="1" transcoderVideo="1" transcoderVideoBitrates="64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000" transcoderVideoQualities="0,1,2,3,4,5,6,7,8,9,10,11,12" transcoderVideoResolutions="128,128,160,240,320,480,768,720,720,1080,1080,1080,1080" updatedAt="1412623556" version="0.9.9.14.531-7eef8c6" webkit="1">
<Directory count="4" key="applications" title="applications"/>
<Directory count="1" key="butler" title="butler"/>
<Directory count="1" key="channels" title="channels"/>
<Directory count="1" key="clients" title="clients"/>
<Directory count="1" key="library" title="library"/>
<Directory count="11" key="music" title="music"/>
<Directory count="6" key="photos" title="photos"/>
<Directory count="1" key="playQueues" title="playQueues"/>
<Directory count="1" key="player" title="player"/>
<Directory count="1" key="playlists" title="playlists"/>
<Directory count="1" key="search" title="search"/>
<Directory count="1" key="servers" title="servers"/>
<Directory count="1" key="system" title="system"/>
<Directory count="1" key="transcode" title="transcode"/>
<Directory count="90" key="video" title="video"/>
</MediaContainer>


----------



## dadrepus

the documentation for installation seems to be confusing for me. Where do I put the Plextivo folder after copying the two xml files to the Plexserver app in a new folder called profiles?


----------



## dadrepus

I forgot to put in /web after the url. It opens like this: 
https://www.dropbox.com/s/nqbqzq0jfnzwdhe/Screenshot%202014-10-06%2017.11.17.png?dl=0

Now this is browser only from my mac mini. I still get a black screen from Tivo.


----------



## dadrepus

moyekj said:


> See ntlord post right above yours (requires python to be installed if you don't have it already). Execute that command in the folder where you unpack the PlexTivo zip file - where the index.html file lives.


I don't understand this, sorry. How does one execute a terminal command inside a folder where plextivo is kept, on a Mac?
I just opened terminal and typed in the referenced command for the python web server.


----------



## moyekj

As an example, say you unpacked the PlexTiVo zip file to:
/home/dadrepus/plex

Then there should be a PlexTivo-master folder there containing "index.html" file.

So you should start web server from that folder, in this example:
cd /home/dadrepus/plex/PlexTivo-master
sudo python -m SimpleHTTPServer 80


----------



## dadrepus

moyekj said:


> As an example, say you unpacked the PlexTiVo zip file to:
> /home/dadrepus/plex
> 
> Then there should be a PlexTivo-master folder there containing "index.html" file.
> 
> So you should start web server from that folder, in this example:
> cd /home/dadrepus/plex/PlexTivo-master
> sudo python -m SimpleHTTPServer 80


AHHA, eureeka! Now I understand.
things must be working sorta right because if I do my tivo
with just the ip without the :32400 I get my entire Applications folder.
can I just redo with the executable or must I turn off (somehow?) the web server already started?


----------



## moyekj

You can test with a web browser instead of on TiVo. Make note of the IP of the Mac you are starting the python web server on. In this example, I'll use 192.168.1.200. Then, after you start the python web server use the following URL in a browser:
http://192.168.1.200/index.html

If you are trying the URL launcher on the TiVo, then the above is the URL you should use there as well.
If you get a 404 (not found) type message then that means you started the python web server in wrong folder (no index.html file present).

i.e. The whole point is that you are running a web server on your computer and then launching the PlexTivo "index.html" page on the client computer and/or TiVo.


----------



## dadrepus

moyekj said:


> You can test with a web browser instead of on TiVo. Make note of the IP of the Mac you are starting the python web server on. In this example, I'll use 192.168.1.200. Then, after you start the python web server use the following URL in a browser:
> http://192.168.1.200/index.html
> 
> If you are trying the URL launcher on the TiVo, then the above is the URL you should use there as well.
> If you get a 404 (not found) type message then that means you started the python web server in wrong folder (no index.html file present).
> 
> i.e. The whole point is that you are running a web server on your computer and then launching the PlexTivo "index.html" page on the client computer and/or TiVo.


YEA! Got it working on my Tivo. Looks great! Thanks so much. My one question: when I get out of terminal will the http server shut down and I will have to do this all over again or will it remain on in the background?


----------



## moyekj

dadrepus said:


> YEA! Got it working on my Tivo. Looks great! Thanks so much. My one question: when I get out of terminal will the http server shut down and I will have to do this all over again or will it remain on in the background?


 Assuming you ran in foreground mode, yes killing the terminal will kill the web server. If you want to be able to get rid of the terminal you should run it in background mode when you launch python by adding a "&" character at the end. i.e.
sudo python -m SimpleHTTPServer 80 &

Only problem with doing that is if you do want to kill it off then you'll have to find the job and issue a kill command to stop it, something like:

ps -ef | grep python
kill #

(likely Mac has some kind of GUI for finding and killing jobs too, but I don't know about that).

For existing python command running you can probably use ctrl-Z in the terminal to suspend it, then use the following command to run it in background:
bg


----------



## FoxFireX

By the way, I'm assuming it's the same in more recent Mac OSs, but with Snow Leopard, you can go into System Preferences, Sharing, and turn on Web Sharing. That enables the built-in web server. You can then unzip this stuff to /Library/Web and off you go. Really couldn't have been much easier, though I did have to delete the built-in index.html.en to make sure it would pick up the new index.html instead.


----------



## rgreenpc

New to the party - 

I have a Roamio Pro and (when fedex finds them.... 2 minis)

I am running a plea server at home... is there a wiki or anything on setting this up as of yet?

Any limitations on this?


----------



## muzzymate

Welcome rgreenpc!

Here are step by step instructions on getting it up and running. Works great! I used Apache instead of Mongoose as my web server since it was easier to have that working as a Windows service (always running) but any web server should do.

http://www.tivocommunity.com/tivo-vb/showthread.php?p=10221817#post10221817


----------



## dadrepus

FoxFireX said:


> By the way, I'm assuming it's the same in more recent Mac OSs, but with Snow Leopard, you can go into System Preferences, Sharing, and turn on Web Sharing. That enables the built-in web server. You can then unzip this stuff to /Library/Web and off you go. Really couldn't have been much easier, though I did have to delete the built-in index.html.en to make sure it would pick up the new index.html instead.


 So do I have to make any other changes to use the built-in web server on a mac?
Same url to test it in a browser? Any details you left out?


----------



## dadrepus

FoxFireX said:


> By the way, I'm assuming it's the same in more recent Mac OSs, but with Snow Leopard, you can go into System Preferences, Sharing, and turn on Web Sharing. That enables the built-in web server. You can then unzip this stuff to /Library/Web and off you go. Really couldn't have been much easier, though I did have to delete the built-in index.html.en to make sure it would pick up the new index.html instead.


This is no-longer available in OSX-8+. I did find this preference pane that when installed says it turns on web sharing but so far it doesn't work http://clickontyler.com/web-sharing/ but it has not done anything for me yet. I tried to just start apache and got this error:
Alexs-Mac-mini:~ Alex$ sudo apachectl start
Password:
/usr/sbin/apachectl: line 57: ulimit: open files: cannot modify limit: Invalid argument
/usr/sbin/apachectl: line 67: /Library/Tenon/WebServer/Executables/httpd: Bad CPU type in executable.
So right now I am stuck to using just the python server unless someone can help


----------



## Frostbyte

Great work guys! This things works beautifully! Just wish it could be added as an official app to the Opera store rather than going through the URL loader. I read some of the discussion about this, but would it be possible to just hand this project over to Plex to let them take it over and make it an officially supported app? Sounds like there wouldn't be too much work for them to commercialize it from the point that it's at now, and I would think they would be incredibly happy to have their app accessible from TiVo devices.


----------



## muzzymate

Agreed. I understand why but my wife sure didn't when I tried to explain how to take the multiple steps to get to URL Loader.


----------



## dadrepus

I agree. It's great for those of us willing to play but my wife will just turn on the Roku.


----------



## FoxFireX

dadrepus said:


> This is no-longer available in OSX-8+. I did find this preference pane that when installed says it turns on web sharing but so far it doesn't work


Bummer. Oh well. Guess there's a bright side to refusing to upgrade, then.


----------



## ntlord

Frostbyte said:


> Great work guys! This things works beautifully! Just wish it could be added as an official app to the Opera store rather than going through the URL loader. I read some of the discussion about this, but would it be possible to just hand this project over to Plex to let them take it over and make it an officially supported app? Sounds like there wouldn't be too much work for them to commercialize it from the point that it's at now, and I would think they would be incredibly happy to have their app accessible from TiVo devices.


Sorry to everyone. I've been super busy with work stuff for the first half of this month. I have about another week or so left, then I can turn back to PlexTivo. The first impediment to getting this submitted is getting myplex working properly. Last time I left, there seemed to be some weird stuff going on with it.

At a minimum, if we get that working, you can get a more official app installed on your Opera App Store, and not use URL Loader. The beauty of this is then we can just host it off the github page, and not have to worry about hosting it locally anywhere.

Also, I saw someone mentioned that it was slow with big libraries. Totally agree, and I have a fix coming (essentially it will just have pages (i.e. 25 items a page, etc.)


----------



## rgreenpc

ntlord said:


> Sorry to everyone. I've been super busy with work stuff for the first half of this month. I have about another week or so left, then I can turn back to PlexTivo. The first impediment to getting this submitted is getting myplex working properly. Last time I left, there seemed to be some weird stuff going on with it.
> 
> At a minimum, if we get that working, you can get a more official app installed on your Opera App Store, and not use URL Loader. The beauty of this is then we can just host it off the github page, and not have to worry about hosting it locally anywhere.
> 
> Also, I saw someone mentioned that it was slow with big libraries. Totally agree, and I have a fix coming (essentially it will just have pages (i.e. 25 items a page, etc.)


Great to hear... real life always comes first


----------



## dadrepus

Can't wait. One question, when it is finally good enough in your opinion to be put in the Opera Store will we still be required to run a local http server like the Python miniServer or will the script turn it on and off based on launching the App ( preferred).


----------



## ntlord

dadrepus said:


> Can't wait. One question, when it is finally good enough in your opinion to be put in the Opera Store will we still be required to run a local http server like the Python miniServer or will the script turn it on and off based on launching the App ( preferred).


No local web server. To be clear, I'm still not sure I'll be submitting this to the Opera store because I just don't have the time to support it. That said, I think there is a pretty good middleground we can achieve without submitting to app store, where you can launch Plex directly from an icon in the Opera app store, with no need for the URL loader.

But, even if I don't personally submit it to the Opera store, it is my plan to get this as ready for submission as possible, that way I can pass the torch if need be.


----------



## Prindle19

Awesome work! 

No issue with running a local server; since I'm accessing via my local network don't really see a need for My Plex, and, feel more comfortable not having to pass credentials through a third party site. 

I figure if you're running PMS, you probably don't have an issue spinning up another simple server.

Really just need the ability to quickly launch into this vs the URL loader and think it is ready to go. 

No issue running most 720p / 1080p HDTV episodes, but, can't get any of my BluRay backups to work; assume this is just too much transcoding for my NAS to do, but, not your issue.


----------



## ntlord

Prindle19 said:


> can't get any of my BluRay backups to work; assume this is just too much transcoding for my NAS to do, but, not your issue.


Try dropping the quality settings under the options screen, and see if that does anything.


----------



## ntlord

Prindle19 said:


> Really just need the ability to quickly launch into this vs the URL loader and think it is ready to go.


I'm starting to doubt we'll be able to move past this for all users or ever submit this to the app store. The problem as best as I can tell is this:

(1) AFAIK, when something is launched from anything other than the URL loader (i.e. opera app), it must be located on the Internet

(2) As far as I can tell, the Opera browser disables all javascript XML requests, javascript redirects, and HTTP redirects to a local IP if the original website is launched from the internet.

In other words to submit this to the app store, the app must be hosted on the internet, and if it is hosted on the internet, it will not work with a local plex server.

(3) AFAIK, MyPlex through an external IP will not work with all setups due to NAT loopback restrictions (i.e. connecting through an external IP on a local network). This is why some people have had success accessing their servers from remote locations, but not on their local networks. I believe the way the Plex web app gets around this issue is by connecting to the local IP when it has a NAT loopback issue, which we can't do with opera since that operation is disabled.

So, what I need is either:

(1) a way a to launch a website on a local network via an RPC call. Tivo recently disabled this operation;

(2) a way to redirect to a local IP when an app is launched from opera via the internet <--I've tried everything I could think of here with no success;

(3) a way to make local XML requests when the Opera app is hosted on the internet <-- maybe there is a way to do this, but my javascript skills are not great; or

(4) a different way to deal with the NAT loopback issue. Perhaps, I'm wrong with how Plex handles this.

Any help would be appreciated.

In the mean time, the app will work, it just has to be launched from URL loader or if you are lucky enough to figure out the NAT loopback issue, it can be launched for an appstore icon and used with myplex. The latter I have working on my set-up.

ntlord


----------



## ehagberg

Just checking to see if I'm missing something... but are "channels" supposed to work through this interface? I'm not seeing them even though they do show up if I browse to http://localhost:32400/manage/index.html (not through the plextivo webserver).


----------



## ntlord

Correct. Frankly, I'm not sure that is going to happen anytime soon either, as I suspect supporting the menuing system is going to be difficult, and Plex seems to be moving away from channels anyway.


----------



## rgreenpc

ntlord said:


> I'm starting to doubt we'll be able to move past this for all users or ever submit this to the app store. The problem as best as I can tell is this:
> 
> (1) AFAIK, when something is launched from anything other than the URL loader (i.e. opera app), it must be located on the Internet
> 
> (2) As far as I can tell, the Opera browser disables all javascript XML requests, javascript redirects, and HTTP redirects to a local IP if the original website is launched from the internet.
> 
> In other words to submit this to the app store, the app must be hosted on the internet, and if it is hosted on the internet, it will not work with a local plex server.
> 
> (3) AFAIK, MyPlex through an external IP will not work with all setups due to NAT loopback restrictions (i.e. connecting through an external IP on a local network). This is why some people have had success accessing their servers from remote locations, but not on their local networks. I believe the way the Plex web app gets around this issue is by connecting to the local IP when it has a NAT loopback issue, which we can't do with opera since that operation is disabled.
> 
> So, what I need is either:
> 
> (2) a way to redirect to a local IP when an app is launched from opera via the internet <--I've tried everything I could think of here with no success;
> 
> (4) a different way to deal with the NAT loopback issue. Perhaps, I'm wrong with how Plex handles this.
> 
> ntlord


Could one use DynamicDNS - like I own a domain which I have going to my home Using the server name instead of IP could that work?


----------



## ntlord

rgreenpc said:


> Could one use DynamicDNS - like I own a domain which I have going to my home Using the server name instead of IP could that work?


I'm not sure I fully understand your scenario. Do you mean use a server name instead of an IP while in URL loader? If that is the case, just use the google appspot address I posted earlier. Because of how PlexTivo works once you are accessing via what the browser thinks is an external IP address, you are in no better position than accessing the Google Appspot address.

Or do you mean use the DNS name while in PlexTivo? That is in theory possible, but at that point you might as well just use MyPlex, as the results and limitations are the same.


----------



## bradleys

How hard would it be to create an opera app designed to simply be a URL launcher?


----------



## ntlord

I've thought about that. I think the URL loader is built-in to the browser. In other words, it is not launched from the web. That is why it has the special features of being able to launch local URLs.


----------



## seplant

Should I be able to see the playlists created within the Plex Media Manager on my Tivo?


----------



## MrGolden

Has anyone seen this?

http://www.broadbandtvnews.com/2014/12/10/plex-now-available-on-opera-tv/

It sounds like what we've been waiting for, but doesn't show up in the Opera App Store on my Premiere.


----------



## bradleys

MrGolden said:


> Has anyone seen this?
> 
> http://www.broadbandtvnews.com/2014/12/10/plex-now-available-on-opera-tv/
> 
> It sounds like what we've been waiting for, but doesn't show up in the Opera App Store on my Premiere.


Wow, interesting...

Just announced today, so i suppose it could take a day or two to show up.


----------



## moyekj

bradleys said:


> Wow, interesting...
> 
> Just announced today, so i suppose it could take a day or two to show up.


 According to this post you need a "Plex Pass" to get it (whatever that is).


----------



## bradleys

moyekj said:


> According to this post you need a "Plex Pass" to get it (whatever that is).


Subscription service... I am not too excited about that....

https://plex.tv/subscription/about


----------



## moyekj

Well, that makes it DOA for me.


----------



## bradleys

I will look at it, but I have similar feelings - I really am not looking for another subscription service. Maybe I can find a one month free offer to try it out? 

Frankly, I would much rather have an updated PyTiVO / Tivo to go solution that brings the new HD screens and MRS than another separate app... Sigh

Note: it looks like most of these new apps start as Plex Pass only for a period of time and then transition to free. No guarantees this will eventually be free to use, however that seems to be the trend for PLEX. When it shows up, I will probably sign up for a 1 month pass just to play with it.


----------



## MrGolden

One of the articles did mention that the Plex Pass requirement is only temporary.


----------



## gonzotek

Features generally come to Plex Pass first, then are made free later. The Plex developers consider the Plex Pass as a form of project support..users pay to get early access and the developers get a dedicated pool of testers before a feature goes wider. Not saying you should/shouldn't buy one, or that the feature will definitely make it's way to the free product, just FYI.


----------



## HarperVision

So, is anyone using it on a TiVo yet?


----------



## bradleys

HarperVision said:


> So, is anyone using it on a TiVo yet?


I didn't see it last night and I haven't heard anyone definitively indicating they had either.


----------



## megz1623

It's on my two Sony bluray players but nothing on tivo so far.


----------



## dianebrat

HarperVision said:


> So, is anyone using it on a TiVo yet?


Plex has said it's not yet usable/available for the Tivo opera store yet.


> The Plex big-screen expansion continues with our latest release on the Opera TV Store. Many Smart TV models are compatible - for the most comprehensive list, check out the Opera Forums below (note that the list includes TiVo, and we're not yet compatible with those devices). During the preview period, access does require a Plex Pass subscription.﻿


https://plus.google.com/117336216609274144137/posts/cszWLAaV8xx


----------



## ntlord

Well I guess that settles this. I'll be interested to see how Plex deal with some of the restrictions I ran into regarding IP addresses when I developed my app.


----------



## Dan203

Until it actually hits the TiVo Opera store I wouldn't give up on this. It's been a very useful app, especially for Minis which don't work with TTG or StreamBaby.


----------



## steveyal

Dan203 said:


> Until it actually hits the TiVo Opera store I wouldn't give up on this. It's been a very useful app, especially for Minis which don't work with TTG or StreamBaby.


Any news here? Really dying for a Plex app on my TiVo.


----------



## ntlord

Dan203 said:


> Until it actually hits the TiVo Opera store I wouldn't give up on this. It's been a very useful app, especially for Minis which don't work with TTG or StreamBaby.


If someone has the app working on their Sony TV or bluray player, I'd love to figure out the URL it is hitting to access the application. I could then take a look at how they are doing a few things.

I ask, because I think myplex would be difficult to get working given the restrictions specific to the tivo regarding URLs. Maybe that is why it is delayed on the tivo.

Thanks,

ntlord


----------



## jivey123

I have installed everything. 
A - PREREQUISITES :up:
B - REGISTERING A TIVO OR MINI WITH OPERA TV :up:
C - INSTALL PLEX MEDIA SERVER IF YOU DON'T ALREADY HAVE IT RUNNING :up:
D - TIVO PLEX CLIENT INSTALLATION :down:
E - RUN A WEB SERVER ON YOUR COMPUTER :up:
F - READY TO RUN :up:

I see my library through a web browser and Tivo, but when I play a video it is a blank screen. Photos work fine. Any suggestions? If I need to place the tivo.xml files where? It looks like this is a windows only step.


----------



## ntlord

jivey123 said:


> I have installed everything.
> A - PREREQUISITES :up:
> B - REGISTERING A TIVO OR MINI WITH OPERA TV :up:
> C - INSTALL PLEX MEDIA SERVER IF YOU DON'T ALREADY HAVE IT RUNNING :up:
> D - TIVO PLEX CLIENT INSTALLATION :down:
> E - RUN A WEB SERVER ON YOUR COMPUTER :up:
> F - READY TO RUN :up:
> 
> I see my library through a web browser and Tivo, but when I play a video it is a blank screen. Photos work fine. Any suggestions? If I need to place the tivo.xml files where? It looks like this is a windows only step.


It needs to be done for all platforms. You need to put the tivo.xml files in your Plex profiles directory. Then reboot plex.


----------



## rgreenpc

I finally got this setup... is 720p 4mb the max rate it can do?


----------



## ntlord

rgreenpc said:


> I finally got this setup... is 720p 4mb the max rate it can do?


720p is the max the Opera Browser can handle without dropping frames or crashing.


----------



## jivey123

ntlord said:


> It needs to be done for all platforms. You need to put the tivo.xml files in your Plex profiles directory. Then reboot plex.


OK, where on linux should I place the two xml files? I found the folder "/usr/lib/plexmediaserver/Resources/Profiles" Thanks


----------



## tjgertge

As of today this solution stopped working for me. It had been working fine for weeks.

Now when I go to the URL loader and attempt to load my URL I get an error message that says:

"For security reasons, not all links are available through this TV app."

This was working flawlessly for weeks. What gives?


----------



## bwhitney

tjgertge said:


> As of today this solution stopped working for me. It had been working fine for weeks.
> 
> Now when I go to the URL loader and attempt to load my URL I get an error message that says:
> 
> "For security reasons, not all links are available through this TV app."
> 
> This was working flawlessly for weeks. What gives?


I have the exact same issue starting last night. Does this mean Tivo is no longer approved for Opera TV development?

Any information would be appreciated!!


----------



## Fofer

Maybe they've booted this solution in favor of the "official" Plex for Opera client that's being made compatible for TiVo soon?

Do other Opera apps continue to work on TiVo, or is it just this Plex HTML5 one that's complaining now?


----------



## moyekj

TiVo has gone out of their way on numerous occasions to thwart 3rd party development. At one point it was possible to launch html pages on Opera browser directly, without having to sign up as Opera Developer and use URL launcher. TiVo shut that down a while back and community eventually discovered the Developer backdoor. Now looks like they've closed that access too. Thanks TiVo as always!

I wouldn't be shocked if at some point they even closed down 3rd party HME apps as well (like streambaby).


----------



## ntlord

In theory you can point it to ntlord.github.io, and connect via myplex. But during testing, this did not work for everyone


----------



## tjgertge

ntlord said:


> In theory you can point it to ntlord.github.io, and connect via myplex. But during testing, this did not work for everyone


That link produces the same error as well


----------



## ntlord

Add it as an app in the opera dev portal


----------



## ntlord

tjgertge said:


> That link produces the same error as well


So it should work if you add as an app. It works on mine. But, I can't get any sites to open in URL Loader. They really crippled it.


----------



## tjgertge

ntlord said:


> So it should work if you add as an app. It works on mine. But, I can't get any sites to open in URL Loader. They really crippled it.


So if I submit that link as if it is an app I am developing, it will show up as an app on my Tivo? If I have my own webserver, can I just post it instead?


----------



## ntlord

Yes it will show up as a separate app under the develop tab. You cannot use your own internal web server, it will only work for external web servers (tivo disabled this). If you are worried about privacy or something, note the ntlord.github.io website though stores no information, all of the magic happen in javascript within your local browser. 

The one issue you might have is NAT loopback being disabled in your router. (discussed a few pages back in this thread). I don't believe all routers are affected, but part of the issue is that some routers disable for security reasons direct requests to your external IP from your internal network, which PlexTivo needs to be able to contact your plex server via my plex. This is not something I can really help you with other than to say that you may be able to tweak some settings in your router to get it to work.


----------



## tjgertge

So it looks like I have to submit graphics for the app, and a description, etc. I am in the correct place? I'm not wanting to publish for public consumption.


----------



## ntlord

Yes, but you don't need to submit graphics. It will be private, only to your dev account.


----------



## bharathkg9

I am Developing a HTML5 application with media streaming content and integrated the Google html5 IMA SDK for ad playing at intervals. When I tested it on Opera tv store of Tivo Roamio I noticed that the Ads are played altogether in a different Video DOM object in a separate Iframe container . Now the issue is the Opera TV Store crashes at an inconsistent interval while Ads are playing i.e there are no particular scenarios as such .For instance 2 or 3 ads may be played in between and after that it may crash for fourth one.

I needed to know whether Google IMA SDK is not supported for opera TV SDK, if not then any other alternative solution, Or could this be an issue with the Device .


----------



## ntlord

bharathkg9 said:


> I am Developing a HTML5 application with media streaming content and integrated the Google html5 IMA SDK for ad playing at intervals. When I tested it on Opera tv store of Tivo Roamio I noticed that the Ads are played altogether in a different Video DOM object in a separate Iframe container . Now the issue is the Opera TV Store crashes at an inconsistent interval while Ads are playing i.e there are no particular scenarios as such .For instance 2 or 3 ads may be played in between and after that it may crash for fourth one.
> 
> I needed to know whether Google IMA SDK is not supported for opera TV SDK, if not then any other alternative solution, Or could this be an issue with the Device .


I don't know. But, this doesn't surprise me. There was a lot of "guess/check" work that I did to get the Plex client working. The web client is very finicky.


----------



## dadrepus

Been following this and the Plex forums trying to find out if or when the app will be offered on tivo. Well, I finally got the answer from a Opera employee that is a Plex follower.
The Plex app will be offered when Tivo updates in April.


----------



## bradleys

dadrepus said:


> Been following this and the Plex forums trying to find out if or when the app will be offered on tivo. Well, I finally got the answer from a Opera employee that is a Plex follower.
> The Plex app will be offered when Tivo updates in April.


Any idea if that is via the Opera store platform or a new streaming service at the same level as Netfix / Amazon?


----------



## dadrepus

bradleys said:


> Any idea if that is via the Opera store platform or a new streaming service at the same level as Netfix / Amazon?


via opera store as far as I was told. It was an Opera employee that gave us the info.

I really wish it was a separate application like the Netflix since I don't relish having to g into My Opera Apps every time I want Plex but it is better than no app.


----------



## ntlord

Good news. Especially, because frankly I just don't have that much time to devote to this in the near future. However, from what I can tell from the plex forums, the app is far from ready for the prime time. If only tivo made their platform more open, we could have really had a nice app with my PlexTivo app.

Edit: This also doesn't not surprise me that tivo needs an update. Like I've said before the security settings for the opera browser are super locked down on the tivo, so I would think that Plex would need some tweaks to make itself work. It would be freaking amazing though if Plex integrated with onepass.


----------



## bradleys

Best possible scenario is for TiVo to "promote" the app to a streaming service provider and integrate it into OnePass - maybe once is matures a little bit.


----------



## dadrepus

ntlord said:


> Good news. Especially, because frankly I just don't have that much time to devote to this in the near future. However, from what I can tell from the plex forums, the app is far from ready for the prime time. If only tivo made their platform more open, we could have really had a nice app with my PlexTivo app.
> 
> Edit: This also doesn't not surprise me that tivo needs an update. Like I've said before the security settings for the opera browser are super locked down on the tivo, so I would think that Plex would need some tweaks to make itself work. It would be freaking amazing though if Plex integrated with onepass.


This will give the Plex developers more time to get t right. The app is in Alpha now.


----------



## wr0ngway

Shameless plug, as an interim option till we have a fully opera plex app, you can serve plex to tivo through an HMO interface:
https://github.com/wr0ngway/tivohmo

Not as good as having full plex app with thumbnails, etc, but it does the job, and is now my daily driver for getting video from plex to tivo


----------



## drdiags

wr0ngway said:


> Shameless plug, as an interim option till we have a fully opera plex app, you can serve plex to tivo through an HMO interface:
> ...
> Not as good as having full plex app with thumbnails, etc, but it does the job, and is now my daily driver for getting video from plex to tivo


I guess since I am a newbie, I cannot PM, so here is what I was going to ask offline (looks like I cannot have anything that looks like a link as well, spam control):

I was wondering if you had some suggestion on how I can figure out this error message I see after spawning the tivohmo Server (I haven't modified any of the settings in /etc/tivohmo.yml}:

[2015-03-15 19:05:38] INFO TivoHMO::Server Request from 192.168.1.36 Command=QueryContainer&Container=%2F&DoGenres=1"
[2015-03-15 19:05:38] DEBUG TivoHMO::Server Headers: {"Content-Type"=>nil}
[2015-03-15 19:05:38] INFO TivoHMO::Server Request from 192.168.1.37 Command=QueryContainer&Container=%2F&DoGenres=1"
[2015-03-15 19:05:38] DEBUG TivoHMO::Server Headers: {"Content-Type"=>nil}
OpenURI::HTTPError - 401 Unauthorized:
/usr/local/lib/ruby/2.0.0/open-uri.rb:353:in `open_http'
/usr/local/lib/ruby/2.0.0/open-uri.rb:709:in `buffer_open'
/usr/local/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
/usr/local/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
/usr/local/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
/usr/local/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
/usr/local/lib/ruby/2.0.0/open-uri.rb:689:in `open'
/usr/local/lib/ruby/2.0.0/open-uri.rb:34:in `open'
/usr/local/lib/ruby/gems/2.0.0/gems/plex-ruby-1.5.2/lib/plex-ruby.rb:28:in `open'
/usr/local/lib/ruby/gems/2.0.0/gems/plex-ruby-1.5.2/lib/plex-ruby/library.rb:76:in `base_doc'
/usr/local/lib/ruby/gems/2.0.0/gems/plex-ruby-1.5.2/lib/plex-ruby/library.rb:68:in `xml_doc'

...
/usr/local/lib/ruby/gems/2.0.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'[2015-03-15 19:05:38] INFO TivoHMO::Server Request from 192.168.1.163 "GET ...?Command=QueryContainer&Container=%2F&DoGenres=1"

.163 is the TiVo Roamio, 242 is my Plex Server that I am running tivohmo executable on.

On a side note, I just had to spawn the executable after I setuid on the executable since I didn't have a /etc/init.d/tivohmo service script, the service call fails.


----------



## wr0ngway

Added a github issue so we don't hijack this thread:
https://github.com/wr0ngway/tivohmo/issues/1



drdiags said:


> I guess since I am a newbie, I cannot PM, so here is what I was going to ask offline (looks like I cannot have anything that looks like a link as well, spam control):
> 
> I was wondering if you had some suggestion on how I can figure out this error message I see after spawning the tivohmo Server (I haven't modified any of the settings in /etc/tivohmo.yml}:


----------



## HarperVision

Plex is now official and in the latest release:



ajwees41 said:


> http://tivoproduction.force.com/Support/apex/SupportPortalArticleViewPage?artURL=/Support/articles/FAQ/TiVo-Software-Version-Information
> 
> Just found this not sure if it reliable, but might be like before where the apps show up after it's loaded not loaded with it,


Thanks ajwees41!


----------



## wmcbrine

"tivoproduction.force.com"? WTF?


----------



## HerronScott

Interesting, so they are hosting the production website on force.com with vanity URL (Salesforce application environment) and this is the non-vanity URL (or pre-production environment even though it says tivoproduction)?

Scott


----------



## bradleys

@ntlord - some of us were having trouble launching your version of Plex based network permissions I expect. With the changes TiVo is introducing to get the sponsored Plex app to work, do you think that will fix the connectivity issues with your app?

(I am sure the sponsored Plex app is fine, and I am not suggesting you continue supporting yours)


----------



## ntlord

Not sure. I'll have to wait until I get it on my tivo. I think there is a good chance the network permissions might be fixed.


----------



## dadrepus

EngadgetPlex on Tivo coming on June 8th


----------



## bradleys

I received Plex today, and it is nice... That said, NTLords version was better...


----------



## HarperVision

bradleys said:


> I received Plex today, and it is nice... That said, NTLords version was better...


Are we able to still use his version? I haven't messed with it in awhile.


----------



## bradleys

HarperVision said:


> Are we able to still use his version? I haven't messed with it in awhile.


You can, it is a little bit of a hack to get up and running - but yes, last time I tried it was working fine.


----------



## Fofer

bradleys said:


> I received Plex today, and it is nice... That said, NTLords version was better...


In what ways was NTLord's version better? Just curious. Thanks!


----------



## bradleys

Fofer said:


> In what ways was NTLord's version better? Just curious. Thanks!


NTLords was a different layout. One click and you were in a grid of your content. The grid was a fixed number of rows wide and N rows deep.

This layout tries to create quick discovery groupings with a few movies and a click through to the rest of that group. I find myself going straight to the grid - so that is kind of a wasted click. Top movies, top unwatched movies, continue watching, recently viewed. It's my personal content, not sure all that is necessary.

The grid view in this layout is 2 rows high and N rows wide. visually you get a lot less content on the screen at one time.

Less clicks? Probably a wash...

It looks like this is the standard Smart TV layout, and most likely the "modern design version"

Frankly, navigation and screen refresh is too lagy to get fancy with the UI.


----------



## ntlord

I haven't gotten it yet, but appreciate the kind words. I always wished I could take this project further, unfortunately, given the restrictions placed on Tivo development, it just really wasn't possible.


----------



## stile

https://www.tivo.com/priority_20.4.8

For those who look like to be one of the first ones to receive this update

-stile


----------



## bradleys

ntlord said:


> Not sure. I'll have to wait until I get it on my tivo. I think there is a good chance the network permissions might be fixed.


Just an FYI - setup does not ask you to enter a username / password. It provides a code a that you are required to enter on Plex authentication web page.


----------



## ntlord

bradleys said:


> Just an FYI - setup does not ask you to enter a username / password. It provides a code a that you are required to enter on Plex authentication web page.


Ultimately, I think it works the same way. The username/pass thing is only used to get a token from the plex servers. The code thing, I suspect works the same way.


----------



## telemark

Does the version here play more video file formats without transcode, than the official app?


----------



## Allanon

I got the official Plex app on my Suddenlink Tivo Premiere and Suddenlink Tivo Mini. The interesting part is that it allows the Mini to stream videos. I was unable to get HME video streaming apps to stream video on the Mini, the apps would allow selecting videos just wouldn't stream the video.


----------



## ntlord

telemark said:


> Does the version here play more video file formats without transcode, than the official app?


Nope. My version transcoded pretty much everything except if something was already an .mp4


----------

