SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v7 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=47)
-   -   UPnP (PlayOn) Browser (http://forums.sagetv.com/forums/showthread.php?t=62938)

tmiranda 02-06-2016 06:33 PM

UPnP (PlayOn) Browser
 
1 Attachment(s)
Here is the first rough draft of a new PlayOn plugin I've been working on. It has minimal functionality right now and the videos must be downloaded before they can be played.

Unzip and then copy the attached manifest to the install directory of your SageTV server then look for a UI Mod plugin called "UPnP (PlayOn) Browser". After installation go to Online -> UPnP Browser. Your PlayOn server will show up there.

As you will see, it's a generic UPnP (Universal Plug and Play) browser. I will focus on PlayOn but I may also dabble getting it to work with some other UPnP devices.

This should be considered an alpha release.

EnterNoEscape 02-06-2016 10:38 PM

I am so glad to see someone working on this. I've been working with Cling a lot in OpenDCT and had plans to eventually get around to a new UPnP plugin for SageTV that is based on Cling so it will run on Linux too. I think this was my last real hangup on switching over to Linux.

I love the speed of browsing with your version. I know this is alpha and it even allowed me to browse my Prime tuner, but was unable to play anything. I know that's not a focus, but I just thought it was neat that it worked at all.

With actual PlayOn content I noticed that it downloaded the entire video. I just want to make sure that's expected or if it was supposed to stream live instead.

tmiranda 02-07-2016 06:24 AM

Thanks. :)

Right now you do need to download the entire video. I still haven't figured out how to do progressive playback. I should work, but doesn't :(

I'm not sure how far I'll get on other devices. UPnP is all very new to me and the documentation is crappy. I get the impression that UPnP is a "general guideline" for developers and not a standard :D

If you want to help on the plugin I am more than willing.

EnterNoEscape 02-07-2016 10:55 AM

You'll find a few situations in the Cling source code where they accommodate a particular vendor. That's one reason why they have so many factory methods to keep things flexible. The factory method defaults are strict. I had to make my own to correctly get a particular value from Ceton tuners. Hopefully you don't find yourself in a similar situation.

I really would love to help, but I still have a very large amount of work left to do with OpenDCT. We seem to have a developer shortage. :( One of my hopes with the project was to bring some network encoder projects under one robust project, but it needs to get to a certain level before that can be a reality, so I'll just keep coding until it gets there.

I will certainly be a tester, but at least for now I won't be able to be much more.

tmiranda 02-15-2016 06:17 PM

Version 0.02
 
1 Attachment(s)
New version can be installed using the attached manifest. This version adds the ability to record from PlayOn.

It still can't do progressive playback but at least you can set things to record and then watch them later.

EnterNoEscape 02-15-2016 06:39 PM

Perhaps I'm missing something everyone else knows about recording online content. I tried Ctrl-Y, Ctrl-I and Esc. I can't figure out how to tell it to record. When I hit enter, it just goes straight into downloading.

pjpjpjpj 02-15-2016 07:37 PM

Quote:

Originally Posted by tmiranda (Post 584912)
New version can be installed using the attached manifest. This version adds the ability to record from PlayOn.

It still can't do progressive playback but at least you can set things to record and then watch them later.

Is this using PlayLater, or is it recording via something similar to the Podcast Recorder plugin?

Also, (if it were doing PlayLater it would), if your answer to above is the latter, is it able to do HD (like Fuzzy's v9 trick)?

tmiranda 02-15-2016 07:45 PM

Quote:

Originally Posted by EnterNoEscape (Post 584914)
Perhaps I'm missing something everyone else knows about recording online content. I tried Ctrl-Y, Ctrl-I and Esc. I can't figure out how to tell it to record. When I hit enter, it just goes straight into downloading.

Ctrl-y will start recording immediately. Enter should bring up an options menu. If that isn't happening there is a bug.

tmiranda 02-15-2016 07:46 PM

Quote:

Originally Posted by pjpjpjpj (Post 584915)
Is this using PlayLater, or is it recording via something similar to the Podcast Recorder plugin?

Also, (if it were doing PlayLater it would), if your answer to above is the latter, is it able to do HD (like Fuzzy's v9 trick)?

It does not use PlayLater, it "records" by downloading the file.

I'm not sure what Fuzzy's V9 trick is. Sorry.

pjpjpjpj 02-16-2016 06:13 AM

Quote:

Originally Posted by tmiranda (Post 584917)
It does not use PlayLater, it "records" by downloading the file.

I'm not sure what Fuzzy's V9 trick is. Sorry.

SageTV is not on PlayOn's "whitelist" for HD streams. With the new v9 OS stuff, he's able to spoof something to make PlayOn think it's a white-listed device, thus allowing HD.

Also, does it queue recordings (meaning, can you set three things to record and it will record one after another)?

Sorry for the simplistic questions, I haven't had a chance to download it but want to know whether this will be good for WAF or just plain confuse her. :D

tmiranda 02-16-2016 06:22 AM

Quote:

Originally Posted by pjpjpjpj (Post 584920)
SageTV is not on PlayOn's "whitelist" for HD streams. With the new v9 OS stuff, he's able to spoof something to make PlayOn think it's a white-listed device, thus allowing HD.

Also, does it queue recordings (meaning, can you set three things to record and it will record one after another)?

Sorry for the simplistic questions, I haven't had a chance to download it but want to know whether this will be good for WAF or just plain confuse her. :D

I'll read up on what Fuzzy is doing and see if it's something I can integrate into this.

Yes, it queues the recordings. When they are done they appear as recorded TV or Videos (selectable).

EnterNoEscape 02-16-2016 07:48 AM

Quote:

Originally Posted by tmiranda (Post 584916)
Ctrl-y will start recording immediately. Enter should bring up an options menu. If that isn't happening there is a bug.

I'll try again. I didn't get an options menu.

tmiranda 02-16-2016 09:52 AM

Quote:

Originally Posted by EnterNoEscape (Post 584924)
I'll try again. I didn't get an options menu.

If you are using it on a SageClient, you must also install the plugin on the server. (I should make that clearer in the instructions.)

Ctrl-y will actually bring up a dialog that allows you to pick, or enter, a show title. (The PlayOn directory structure makes it difficult for the plugin to figure out the show title. I figured it would be better to let the user pick one.)

EnterNoEscape 02-16-2016 04:09 PM

I was doing it on the client on the server. I was able to do Ctrl-y to record Hulu, but not a random movie on Netflix.

Update: I think I see the problem. I don't see the video logo next to the ones that I can't record, but when I hit enter or the right arrow they start downloading.

I really like that we actually download the file in SageTV. Kodi does something else and it makes the stream completely unseekable; it's really annoying and the one of the many reasons I was never able to transition. Fortunately I don't have any good reason to anymore thanks to the SageTV open sourcing.

Fuzzy 02-17-2016 03:05 AM

Quote:

Originally Posted by tmiranda (Post 584921)
I'll read up on what Fuzzy is doing and see if it's something I can integrate into this.

PlayOn uses the HTTP Request's User-Agent to determine if the client supports HD playback (meaning it's on their whitelist). The tweak I had done in v9 was to allow setting a custom user agent for sagetv, (since it had previously not set it explicitly, so it was defaulting to 'Java/x.x.x_x'. There are a few properties I created in the sage.properties file to set the user-agent that sage uses, and if you then set those properties to an XBMC user agent, playon will send 720p streams. It works with the StartFileDownload calls in the sagetv api.

tmiranda 02-17-2016 10:20 AM

Quote:

Originally Posted by EnterNoEscape (Post 584934)
I was doing it on the client on the server. I was able to do Ctrl-y to record Hulu, but not a random movie on Netflix.

Update: I think I see the problem. I don't see the video logo next to the ones that I can't record, but when I hit enter or the right arrow they start downloading.

I really like that we actually download the file in SageTV. Kodi does something else and it makes the stream completely unseekable; it's really annoying and the one of the many reasons I was never able to transition. Fortunately I don't have any good reason to anymore thanks to the SageTV open sourcing.

Can you tell me the path to one of the videos that does not record but does start downloading when the press the right arrow?

tmiranda 02-17-2016 10:24 AM

Quote:

Originally Posted by Fuzzy (Post 584941)
PlayOn uses the HTTP Request's User-Agent to determine if the client supports HD playback (meaning it's on their whitelist). The tweak I had done in v9 was to allow setting a custom user agent for sagetv, (since it had previously not set it explicitly, so it was defaulting to 'Java/x.x.x_x'. There are a few properties I created in the sage.properties file to set the user-agent that sage uses, and if you then set those properties to an XBMC user agent, playon will send 720p streams. It works with the StartFileDownload calls in the sagetv api.

Got it. Are the properties recognized by the V7 jar or only the updated v9?

Also, maybe you can help with getting progressive download to work. Right now it starts progressive download but playback stops once the buffered data is used up. The IsFileProgressivePlayback() (might not have that method name quite right) method returns true yet progressive playback does not work.

EnterNoEscape 02-17-2016 11:12 AM

Quote:

Originally Posted by tmiranda (Post 584959)
Can you tell me the path to one of the videos that does not record but does start downloading when the press the right arrow?

It looks like everything under Netflix > Dramas, but the two shows at the very bottom that lead to TV shows.

Maybe this has to do with how you're determining that something is video content? The theme I'm seeing is that TV shows are consistently showing up with the video logo, but movies are not.

Fuzzy 02-17-2016 12:56 PM

Quote:

Originally Posted by tmiranda (Post 584960)
Got it. Are the properties recognized by the V7 jar or only the updated v9?

No, only the v9 jar works with the custom user agent.
Quote:

Originally Posted by tmiranda (Post 584960)
Also, maybe you can help with getting progressive download to work. Right now it starts progressive download but playback stops once the buffered data is used up. The IsFileProgressivePlayback() (might not have that method name quite right) method returns true yet progressive playback does not work.

I'm not sure. As far as I can tell, it is a simple http file request, I'm not sure why it wouldn't playback while downloading. IsFileDownloadProgressivePlay() returning true basicly means that the information needed to decode the file is at the beginning of the file (meaning format descriptors, indexes, etc are at the beginning). In any case, the playback status really shouldn't affect the download process at all, it should continue to download the file.
Which API call are you actually using to download the file?

tmiranda 02-17-2016 02:58 PM

Quote:

Originally Posted by Fuzzy (Post 584972)
I'm not sure. As far as I can tell, it is a simple http file request, I'm not sure why it wouldn't playback while downloading. IsFileDownloadProgressivePlay() returning true basicly means that the information needed to decode the file is at the beginning of the file (meaning format descriptors, indexes, etc are at the beginning). In any case, the playback status really shouldn't affect the download process at all, it should continue to download the file.
Which API call are you actually using to download the file?

I'm using the exact same code as the default STV uses, StartFileDownload(). I set up the variables needed and then link directly to the dialog in the STV that starts the file download and begins to play it.

I must be missing something :(


All times are GMT -6. The time now is 05:37 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.