SageTV Community  

Go Back   SageTV Community > General Discussion > General Discussion
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

General Discussion General discussion about SageTV and related companies, products, and technologies.

Reply
 
Thread Tools Search this Thread Display Modes
  #181  
Old 10-14-2013, 03:30 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
If you want to place a bounty on the project I may know someone who would be interested... (personally do not have that kind of time).
Reply With Quote
  #182  
Old 10-14-2013, 03:44 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Just browsing the nextpvr plugin code to see what it does...

A number of SageTV questions arise (not familiar with the SageTV APIs).

Example questions:

1. Is there an API call to read a live stream?
2. Is there an API to pause the live stream?
3. Is there an API for seeking to a point in the live stream

Are these API via JSON? or C? Are they available for both live and recorded streams?
Reply With Quote
  #183  
Old 10-14-2013, 04:53 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Please vote:

http://forums.sagetv.com/forums/showthread.php?t=60816
Reply With Quote
  #184  
Old 10-14-2013, 05:01 PM
emveepee emveepee is offline
Sage Aficionado
 
Join Date: Nov 2006
Posts: 417
Quote:
Originally Posted by sflamm View Post
Just browsing the nextpvr plugin code to see what it does....
That's a tiny subset of what the many API's can do. That's why so many many clients are available. There are JSON, XML and SOAP but they overlap a bit depending on what you need to do.

Streaming is via a seekable web server but there are some tricks to handle bad timelines comskip etc.

Martin

Last edited by emveepee; 10-14-2013 at 05:04 PM.
Reply With Quote
  #185  
Old 10-14-2013, 05:03 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Quote:
There are JSON, XML and SOAP but they overlap a bit depending on what you need to do.
Thanks for the input. Can you point me to the relevant development doc?
Reply With Quote
  #186  
Old 10-14-2013, 05:19 PM
LehighBri LehighBri is offline
Sage Expert
 
Join Date: Sep 2006
Posts: 694
The SageTV API javadocs are here: http://download.sage.tv/api/index-all.html

For the XBMC python addon, I used stuckless's JSON sagex APIs: https://code.google.com/p/customsage...tpApiForSageTV

And an example JSON structure is here: https://code.google.com/p/sagetv-box...DataStructures

I know the JSON stuff inside and out from working on the Boxee addon, the Plex addon, and the XBMC addon (all which used stuckless's JSON APIs) and how to handle MediaFile vs. Show vs. Airing objects, just need someone that can do some of the C++ work....
__________________
Server: Sage 7.1.9 beta; Dell Inspiron 530; Windows 7 Ultimate 32-bit (UAC turned off); 2TB Internal SATA (TV Recordings)
Storage: Synology DiskStation DS411+, RAID 5, 5x 2TB SATA for (DVDs/Music/Other Videos)
Tuners: Ceton InfiniTV w/ Verizon FIOS cablecard (using babgvant's SageDCT plugin)
Clients: 1x STP-HD300; 1x Acer Aspire Revo 3610 (Atom/Ion) w/ SageTV client (Win 7, EVR, FSE on)
Reply With Quote
  #187  
Old 10-14-2013, 05:47 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by LehighBri View Post
If anyone that knows C++ wells wants to take a shot at developing the PVR addon, I'd be happy to advise and help out, I just don't know C++.

The info for the python-based addon I developed with kricker for XBMC that allows you to watch recordings plus manage them can be found here: http://wiki.xbmc.org/index.php?title=Add-on:SageTV

And code: https://github.com/kricker/plugin.video.SageTV

And the demo source code for a C++ PVR addon is here: https://github.com/opdenkamp/xbmc-pv...ddons/pvr.demo

We really just need to expand using that demo source code as a start and then work to get it working by using the JSON API within Sage (which can easily retrieve recording info, EPG info, etc). Just need someone to put it together and I can help navigate the calls to Sage.

Any takers?
I've looked at the pvr api a few times and it's not really that hard -- dare I even say relatively straightforward. I figure I'll probably even write the code some day if no one beats me to it, but as the old saying goes, "necessity is the mother of innovation." Fortunately (or unfortunately, depending on your view), I have a stockpile of HD200s in my office closet and I'm still running the originals I bought when they first were released (knock on wood) so I just don't see a need to go through the effort of writing the plugin, especially since I really don't think I'll ever use it. I have to believe that by the time I may need such an XBMC plugin, something newer/better will have come along that would be a better use of my dev time. So that's where I stand on this situation. Then again, my stockpile of HD200s plus my HD300 and HD100 could all call it quits sooner than I think and then maybe I jump all over this.

But as someone said above, anyone with a C++ (or C) background with the need for this functionality should be able to bang this out without much trouble. I think it'll be a little more time consuming than people think, but there's nothing particularly difficult with the required C++ code.

The hardest part is to smartly design workarounds for the features that aren't accessible via the Sage APIs (live tv, streaming of recordings, etc.). Once you decide how you're going to implement the features then the C++ code shouldn't be much of a problem -- unless you plan on implementing your own streaming server to feed the recordings to XBMC then you're adding a lot of work -- a lot!

Quote:
Originally Posted by sflamm View Post
Just browsing the nextpvr plugin code to see what it does...

A number of SageTV questions arise (not familiar with the SageTV APIs).

Example questions:

1. Is there an API call to read a live stream?
2. Is there an API to pause the live stream?
3. Is there an API for seeking to a point in the live stream

Are these API via JSON? or C? Are they available for both live and recorded streams?
1. No
2. No
3. No

The Sage APIs only allow interaction with a UI context and a UI context is only available thru true Sage clients (clients, extenders, placeshifters). There is no way for an external device to register as a Sage UI context in order to have the Sage APIs interact with it. The only way you're streaming recordings is to use the Sage API to determine where the recording lives and then stream it externally outside of the Sage APIs.

Same with live tv... you'd have to simulate it by starting a recording on a chosen channel and then externally streaming the file while Sage records it.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...

Last edited by Slugger; 10-14-2013 at 05:50 PM.
Reply With Quote
  #188  
Old 10-14-2013, 06:40 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Quote:
The only way you're streaming recordings is to use the Sage API to determine where the recording lives and then stream it externally outside of the Sage APIs.
How did LehighBri write his plugins then with this restriction?

Btw, I'm considering the APIs above he lists as 'Sage APIs' - in case you mean only the ones that SageTV formally supported.
Reply With Quote
  #189  
Old 10-14-2013, 06:45 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by emveepee View Post
NextPVR 3.1.1 was released a few days ago and I finally got time to make a demo of the new web client running on the Raspberry Pi in XBMC http://youtu.be/2sFwLvdao_o Tuning to Total Recall is slow because it's an HDPVR not because of the RPi. Everything but queued music is working pretty well and I can only imagine it getting better. I'd liked to see someone create a SageTV look&feel skin for NextPVR.

Martin
Which Raspberry Pi did you get? Is it the A or B? Seriously considering ordering one. Although the Model B's are out of stock.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #190  
Old 10-14-2013, 06:46 PM
LehighBri LehighBri is offline
Sage Expert
 
Join Date: Sep 2006
Posts: 694
Quote:
Originally Posted by sflamm View Post
How did LehighBri write his plugins then with this restriction?

Btw, I'm considering the APIs above he lists as 'Sage APIs' - in case you mean only the ones that SageTV formally supported.
It's pretty straightforward. The XBMC addon grabs the server path for the recording from the recording's meta-data, and in the settings of the addon, you can configure what the mapping of that path is that the client can read from (you must have the server path accessible to the client). Once that's setup, it simply plays back the file and this works for both live TV (file grows during playback) and recorded TV (file doesn't grow).
__________________
Server: Sage 7.1.9 beta; Dell Inspiron 530; Windows 7 Ultimate 32-bit (UAC turned off); 2TB Internal SATA (TV Recordings)
Storage: Synology DiskStation DS411+, RAID 5, 5x 2TB SATA for (DVDs/Music/Other Videos)
Tuners: Ceton InfiniTV w/ Verizon FIOS cablecard (using babgvant's SageDCT plugin)
Clients: 1x STP-HD300; 1x Acer Aspire Revo 3610 (Atom/Ion) w/ SageTV client (Win 7, EVR, FSE on)
Reply With Quote
  #191  
Old 10-14-2013, 06:48 PM
LehighBri LehighBri is offline
Sage Expert
 
Join Date: Sep 2006
Posts: 694
Quote:
Originally Posted by Taddeusz View Post
Which Raspberry Pi did you get? Is it the A or B? Seriously considering ordering one. Although the Model B's are out of stock.
Go for Model B. Twice the RAM of Model A and gives you more flexibility.

Looks like newark.com is getting a shipment in on Oct 24?

http://www.newark.com/jsp/search/pro...OM=raspi-group
__________________
Server: Sage 7.1.9 beta; Dell Inspiron 530; Windows 7 Ultimate 32-bit (UAC turned off); 2TB Internal SATA (TV Recordings)
Storage: Synology DiskStation DS411+, RAID 5, 5x 2TB SATA for (DVDs/Music/Other Videos)
Tuners: Ceton InfiniTV w/ Verizon FIOS cablecard (using babgvant's SageDCT plugin)
Clients: 1x STP-HD300; 1x Acer Aspire Revo 3610 (Atom/Ion) w/ SageTV client (Win 7, EVR, FSE on)
Reply With Quote
  #192  
Old 10-14-2013, 07:01 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Amazon had em...

http://www.amazon.com/gp/aw/d/B009SQ...110_SY165_QL70
Reply With Quote
  #193  
Old 10-14-2013, 07:18 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
My brother is a pretty talented C++ programmer, but while he is interested, he is just too busy.

I honestly wouldn't use it because I have plenty of clients, but I would like to mess with it just to see how the experience is.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #194  
Old 10-14-2013, 07:30 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by sflamm View Post
How did LehighBri write his plugins then with this restriction?

Btw, I'm considering the APIs above he lists as 'Sage APIs' - in case you mean only the ones that SageTV formally supported.
Quote:
Originally Posted by LehighBri View Post
It's pretty straightforward. The XBMC addon grabs the server path for the recording from the recording's meta-data, and in the settings of the addon, you can configure what the mapping of that path is that the client can read from (you must have the server path accessible to the client). Once that's setup, it simply plays back the file and this works for both live TV (file grows during playback) and recorded TV (file doesn't grow).
Yeah, so that's basically what I was saying, but even easier than I thought. Basically you ask Sage where the file is, it gives you a path, you convert the path to something that the XBMC client can read and then just tell XBMC to play back that file. Apparently you don't even need to provide an HLS or other stream for playback? Just tell XBMC to play back the file directly? Yeah, I mean so really the hardest part is already done for you. The only "difficult" part to this whole thing is that you have to simulate live tv, if you're going to support it. Other than that, it seems you're really just writing data access code on top of the Sage APIs so XBMC can have access to media metadata, EPG data, etc.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #195  
Old 10-15-2013, 04:51 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Sounds to me like the biggest stumbling block is that Sage doesn't always use the same file for live TV, and it change the file as the show changes.

FWIW, I'd be interested, but my biggest issue with XBMC right now is lack of "Source Direct" output.
Reply With Quote
  #196  
Old 10-15-2013, 07:36 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Quote:
Originally Posted by stanger89 View Post
Sounds to me like the biggest stumbling block is that Sage doesn't always use the same file for live TV, and it change the file as the show changes.

FWIW, I'd be interested, but my biggest issue with XBMC right now is lack of "Source Direct" output.
On a similar note, XBMC does do refresh/frame rate switching, which works much better than my HD300. Specifically, the HD300s don't do a good job of maintaining a consistent frame rate (some firmware versions do a better job than others). This is most noticeable on TVs that do motion interpolation between frames to "smooth" out the picture and essentially increase the frame rate. This leads to the occasional jerk or frame drop on any content (720p, 1080i, 1080p24). On the other hand, my XBMC client with the refresh rate switching enabled does a fantastic job of maintaining the frame rate and therefore produces no lost frames or jerkiness with motion interpolation on. I know a lot of people hate the motion interpolation, so it's probably not an issue, but I love the feature.
Reply With Quote
  #197  
Old 10-15-2013, 09:01 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Too bad it (or at least OpenELEC on my i7 3770s/HD4000 machine) does an absolutely awful job deinterlacing.
Reply With Quote
  #198  
Old 10-15-2013, 09:13 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Quote:
Originally Posted by stanger89 View Post
Too bad it (or at least OpenELEC on my i7 3770s/HD4000 machine) does an absolutely awful job deinterlacing.
I'm running XBMC on Win 8 and haven't noticed that the deinterlacing is that bad, but I exclusively watch 1080p24 movies on it now. I'll take another look at 1080i content to see if I notice a difference. But just from a horsepower perspective, yea, it's always better to have the TV do the deinterlacing.
Reply With Quote
  #199  
Old 10-15-2013, 09:28 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by Evil_Attorney View Post
I'm running XBMC on Win 8 and haven't noticed that the deinterlacing is that bad, but I exclusively watch 1080p24 movies on it now. I'll take another look at 1080i content to see if I notice a difference.
1080i might not be that bad, but I've still got a good bit of 480i (TV on DVD) content that will not likely ever see the light of Blu-ray, and it just can't handle that at all.

Quote:
But just from a horsepower perspective, yea, it's always better to have the TV do the deinterlacing.
Or a Radiance

My problem is mostly animated content, I've even played with transcoding to 1080p with AVISynth/TFM and some other filters tuned to the content. It's aggressive enough settings that it runs at about 10fps on my i7 920, but even that doesn't do as well as my Radiance. I suppose I could try YADIF, but this all seems like a lot of trouble/effort to get around a limitation of a source device when I've already got hardware that can do a great job anyway.
Reply With Quote
  #200  
Old 10-15-2013, 11:59 AM
7up 7up is offline
Sage Advanced User
 
Join Date: Mar 2003
Posts: 176
I don't have any 480i content but 1080i displays perfectly for live TV and recorded content. I'm guessing you checked the video settings (which are accessible during live and file playback by clicking the little reel icon in right lower corner) For 1080i I'm using:

Deinterlace: On

Deinterlace Method: De-interlace

Video Scaling Method: DXVA
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Colossus alternatives? fbures Hardware Support 5 05-22-2013 04:05 PM
Ceton and Sage Alternatives ThePaladinTech General Discussion 6 08-03-2011 12:28 PM
DVDShrink Alternatives? wrems The SageTV Community 15 11-23-2010 01:07 PM
alternatives to USB-UIRT yet? pat_smith1969 Hardware Support 10 08-01-2010 03:55 PM
today's alternatives snoopy SageMC Custom Interface 6 03-12-2010 06:43 PM


All times are GMT -6. The time now is 03:03 PM.


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