(OLD) Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

Locked
djp952
Posts: 897
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Android Tablets

Post by djp952 » Tue Aug 21, 2018 7:42 pm

jhford wrote:
Tue Aug 21, 2018 5:46 pm
djp952 wrote:
Tue Aug 21, 2018 4:47 pm
jhford wrote:
Tue Aug 21, 2018 11:41 am
Do I understand that this Kodi build will not run on Android tablets?
Thanks
I run it on an Android tablet just fine. It's an older one, but never been an issue. I don't think there are any restrictions on Kodi in this way. It's side-loaded so even if the official store one is marked as "for phones", which I don't think it is, you can still install it.
Maybe I installed it incorrectly. I downloaded the Krypton Arm apk to my Nexus 7 2013 tablet which is running Lineage 14.1, double clicked the apk and it installed. I then set it up like I setup your app on my Fire TV Stick.

But when I try to play a recording or a TV show, the following occurs randomly.
1. Kodi immediately shuts down.
2. The little blue and black progress circle starts and Kodi immediately shuts down.
3. A multitude of little blue and black progress circle starts and Kodi immediately shuts down. I wish I could screen shoot this so you can see, but it disappears too quickly.

Any ideas?
Could be how the addon is compiled, perhaps Lineage doesn't support the older GNU-based NDK builds or something weird with the tools I use to deconstruct/reconstruct the Kodi APK. Can you enable and use the built-in HDHomeRun PVR shipped with Kodi without the same problem? It will still be there, I don't remove anything.

If that addon doesn't work either, maybe try the Play Store Kodi first and see if it works right. I imagine if the problem is unrelated to the PVR client you will run into the same problems.

Honestly have never heard anything like this, but until 2 minutes ago I'd also never heard of LineageOS :)

jhford
Posts: 79
Joined: Mon May 21, 2018 3:56 pm

Re: Android Tablets

Post by jhford » Wed Aug 22, 2018 12:37 pm

djp952 wrote:
Tue Aug 21, 2018 7:42 pm
jhford wrote:
Tue Aug 21, 2018 5:46 pm
djp952 wrote:
Tue Aug 21, 2018 4:47 pm


I run it on an Android tablet just fine. It's an older one, but never been an issue. I don't think there are any restrictions on Kodi in this way. It's side-loaded so even if the official store one is marked as "for phones", which I don't think it is, you can still install it.
Maybe I installed it incorrectly. I downloaded the Krypton Arm apk to my Nexus 7 2013 tablet which is running Lineage 14.1, double clicked the apk and it installed. I then set it up like I setup your app on my Fire TV Stick.

But when I try to play a recording or a TV show, the following occurs randomly.
1. Kodi immediately shuts down.
2. The little blue and black progress circle starts and Kodi immediately shuts down.
3. A multitude of little blue and black progress circle starts and Kodi immediately shuts down. I wish I could screen shoot this so you can see, but it disappears too quickly.

Any ideas?
Could be how the addon is compiled, perhaps Lineage doesn't support the older GNU-based NDK builds or something weird with the tools I use to deconstruct/reconstruct the Kodi APK. Can you enable and use the built-in HDHomeRun PVR shipped with Kodi without the same problem? It will still be there, I don't remove anything.

If that addon doesn't work either, maybe try the Play Store Kodi first and see if it works right. I imagine if the problem is unrelated to the PVR client you will run into the same problems.

Honestly have never heard anything like this, but until 2 minutes ago I'd also never heard of LineageOS :)
You're funny.
LineageOS is really good and very close to pure android, but probably better is some respects.
I guess you're referring to HDHomerun Simple. Before "2 minutes ago I'd also never heard of HDHomerun Simple :)."
I installed it and it won't play anything, either. When I tap a recording in the menu, Kodi seems to close, but I notice it's still running in the background with the multi-tasked apps. However, the message at the top right says, "Importing guide from clients: 48%." Would the fact that it hasn't finished importing cause me not to be able to launch a previously recorded program? Of course, it won't play the live content either.
BTW, your build seems to have a lot more bells and whistles than Simple.

jhford
Posts: 79
Joined: Mon May 21, 2018 3:56 pm

Re: Android Tablets

Post by jhford » Wed Aug 22, 2018 12:39 pm

jhford wrote:
Wed Aug 22, 2018 12:37 pm
djp952 wrote:
Tue Aug 21, 2018 7:42 pm
jhford wrote:
Tue Aug 21, 2018 5:46 pm

Maybe I installed it incorrectly. I downloaded the Krypton Arm apk to my Nexus 7 2013 tablet which is running Lineage 14.1, double clicked the apk and it installed. I then set it up like I setup your app on my Fire TV Stick.

But when I try to play a recording or a TV show, the following occurs randomly.
1. Kodi immediately shuts down.
2. The little blue and black progress circle starts and Kodi immediately shuts down.
3. A multitude of little blue and black progress circle starts and Kodi immediately shuts down. I wish I could screen shoot this so you can see, but it disappears too quickly.

Any ideas?
Could be how the addon is compiled, perhaps Lineage doesn't support the older GNU-based NDK builds or something weird with the tools I use to deconstruct/reconstruct the Kodi APK. Can you enable and use the built-in HDHomeRun PVR shipped with Kodi without the same problem? It will still be there, I don't remove anything.

If that addon doesn't work either, maybe try the Play Store Kodi first and see if it works right. I imagine if the problem is unrelated to the PVR client you will run into the same problems.

Honestly have never heard anything like this, but until 2 minutes ago I'd also never heard of LineageOS :)
You're funny.
LineageOS is really good and very close to pure android, but probably better is some respects.
I guess you're referring to HDHomerun Simple. Before "2 minutes ago I'd also never heard of HDHomerun Simple :)."
I installed it and it won't play anything, either. When I tap a recording in the menu, Kodi seems to close, but I notice it's still running in the background with the multi-tasked apps. However, the message at the top right says, "Importing guide from clients: 48%." Would the fact that it hasn't finished importing cause me not to be able to launch a previously recorded program? Of course, it won't play the live content either.
BTW, your build seems to have a lot more bells and whistles than Simple.

djp952
Posts: 897
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Wed Aug 22, 2018 8:51 pm

Because update fatigue is a real thing ...

Version 1.3.3 (2018.08.22)
  • Treat discovery errors generated during PVR startup as non-fatal and continue execution of remaining discovery tasks
  • Abort device discovery if no tuner devices were discovered; leave existing device and channel lineup information intact
  • Add "Demo Channels" channel group
Primary Downloads:
https://github.com/djp952/pvr.hdhomerun ... /Downloads

Leia Preview Downloads:
https://github.com/djp952/pvr.hdhomerun ... leia-1.3.3

This is a very small release to clean out the backlog and make way for research into bigger and better things. Nothing much to discuss that shouldn't be pretty clear via the changelog above.

v1.3.3 also has a change not listed for the Leia preview builds. I completed an outstanding todo regarding a new field Kodi added to the EPG that allows the PVR client to not need to bang against the backend servers to find the 'series id' associated with a timer added from the Kodi EPG. It doesn't actually work all the way yet, but I did submit a pull request to Kodi to fix that, and it was accepted: https://github.com/xbmc/xbmc/pull/14339. Will you see any difference? If you aren't running on a 56Kbps modem -- not likely! :mrgreen:

Kodi Leia Beta 1 appears to be right around the corner, my intention is to make this PVR 'official' for Leia at that time and start including it as part of the more formal downloads. I don't see any breaking changes in the queue for Beta 1 so we are probably in good shape.

More to come, but the next concerns I really want to tackle are pretty big and need Kodi changes to pull most of them off. Will do what I can as time allows! Until then, please enjoy version 1.3.3. As always let me know if/when you run into problems.

PS - This time I really did hit 'publish' on the Leia builds, the files you want should be out there for a change :shock:

ddejager
Posts: 107
Joined: Tue May 06, 2014 2:26 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ddejager » Thu Aug 23, 2018 8:09 am

Add "Demo Channels" channel group
Could you elaborate on what you mean by "channel group"? The demo channels were visible in the prior release. Is there something new about how they are handled in this release? Can you enable/disable them as a group from within the PVR settings somehow?

Ken.F
Posts: 2124
Joined: Fri Apr 05, 2013 9:20 am
Device ID: 1041A706, 1043EB32, 104BAD9E, 13168DC5, 1322A7AC
Location: West Rockhill, PA

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by Ken.F » Thu Aug 23, 2018 8:32 am

ddejager wrote:
Thu Aug 23, 2018 8:09 am
Could you elaborate on what you mean by "channel group"? The demo channels were visible in the prior release. Is there something new about how they are handled in this release? Can you enable/disable them as a group from within the PVR settings somehow?
Go to settings, PVR & Live TV Settings, then under General go to Group manager and set up your channel groups.

When you bring up the guide click the options button in the lower left corner and you can set the group of channels that you want to see listed in the guide.

jhford
Posts: 79
Joined: Mon May 21, 2018 3:56 pm

Re: Android Tablets

Post by jhford » Thu Aug 23, 2018 10:04 am

jhford wrote:
Wed Aug 22, 2018 12:39 pm
jhford wrote:
Wed Aug 22, 2018 12:37 pm
djp952 wrote:
Tue Aug 21, 2018 7:42 pm


Could be how the addon is compiled, perhaps Lineage doesn't support the older GNU-based NDK builds or something weird with the tools I use to deconstruct/reconstruct the Kodi APK. Can you enable and use the built-in HDHomeRun PVR shipped with Kodi without the same problem? It will still be there, I don't remove anything.

If that addon doesn't work either, maybe try the Play Store Kodi first and see if it works right. I imagine if the problem is unrelated to the PVR client you will run into the same problems.

Honestly have never heard anything like this, but until 2 minutes ago I'd also never heard of LineageOS :)
You're funny.
LineageOS is really good and very close to pure android, but probably better is some respects.
I guess you're referring to HDHomerun Simple. Before "2 minutes ago I'd also never heard of HDHomerun Simple :)."
I installed it and it won't play anything, either. When I tap a recording in the menu, Kodi seems to close, but I notice it's still running in the background with the multi-tasked apps. However, the message at the top right says, "Importing guide from clients: 48%." Would the fact that it hasn't finished importing cause me not to be able to launch a previously recorded program? Of course, it won't play the live content either.
BTW, your build seems to have a lot more bells and whistles than Simple.
I found a screenshot of what my screens of my 2 android devices look like when I try to play live or recorded content.
https://drive.google.com/open?id=1S6SiP ... eZ4JjVON0O

djp952
Posts: 897
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Android Tablets

Post by djp952 » Thu Aug 23, 2018 4:56 pm

jhford wrote:
Thu Aug 23, 2018 10:04 am
I found a screenshot of what my screens of my 2 android devices look like when I try to play live or recorded content.
https://drive.google.com/open?id=1S6SiP ... eZ4JjVON0O
That is both awesome and disturbing at the same time. Screenslaver much?

Anyway, to me that looks like the framebuffer got trashed most egregiously. It's unlikely that anything in the PVR could possibly cause this to occur, my guess is the framebuffer driver is incompatible with Kodi/ffmpeg in some way.

Sadly I don't think there is much I can do to help other than commiserate. How about the official HDHomeRun app, does that work OK? I believe it also uses ffmpeg, but (sorry Kodi) HDHomeRun app does a much better job with it. I dunno, maybe if you have an OTA tuner you could try the Premium TV demo channels, they are encoded differently, but I'm betting you'll ultimately have the exact same problem.

Sorry!!

handiman
Posts: 13
Joined: Thu Jan 17, 2013 10:33 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by handiman » Thu Aug 23, 2018 5:12 pm

in settings
standard to advanced
then player settings
allow hardware acceleration - mediacodec off
allow hardware acceleration - mediacodec (surface) off
with nexus 7 2013 with lineageos 14.1

ddejager
Posts: 107
Joined: Tue May 06, 2014 2:26 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ddejager » Fri Aug 24, 2018 6:37 am

Not sure the the PVR Client can do much about this: Sometimes I get a glitch in my recordings. When this happens, attempts to seek forward (through commercials) gets messed up. It appears to seek and then drops back by about the amount of time missing in the glitch. So, for example, if the glitch was 2 minutes long, and I attempt to see forward by 1 minute, I actually end up back by one minute after the seek. I need to see forward about 5 minutes to actually go forward about 3. This does not happen when watching the same recording using the HDHomeRun app. The app seems to seek forward (or backward) relative to the current position correctly. The DVR seems to calculating what the position should be relative to the start of the video, and gets it wrong because of the glitch.

By the way, the seek times seem noticeably faster (on OSMC running on Raspberry Pi) with the most recent few versions. Thanks!

djp952
Posts: 897
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Fri Aug 24, 2018 2:11 pm

ddejager wrote:
Fri Aug 24, 2018 6:37 am
Not sure the the PVR Client can do much about this: Sometimes I get a glitch in my recordings. When this happens, attempts to seek forward (through commercials) gets messed up. It appears to seek and then drops back by about the amount of time missing in the glitch. So, for example, if the glitch was 2 minutes long, and I attempt to see forward by 1 minute, I actually end up back by one minute after the seek. I need to see forward about 5 minutes to actually go forward about 3. This does not happen when watching the same recording using the HDHomeRun app. The app seems to seek forward (or backward) relative to the current position correctly. The DVR seems to calculating what the position should be relative to the start of the video, and gets it wrong because of the glitch.

By the way, the seek times seem noticeably faster (on OSMC running on Raspberry Pi) with the most recent few versions. Thanks!
Can you send me a Kodi log? If there is anything I can do about it, there should be some evidence in the log. If the PVR isn't complaining at all, then nothing is wrong from it's perspective and there wouldn't be anything for me to key off of. I've noted a lot of differences with how the HDHomeRun App handles the streams as opposed to Kodi, and honestly SD did a better job. Not to knock on Kodi, it serves a lot of masters and needs a much more generic set of internals. SD only has to worry about MPEG-TS, in Kodi the same code seems to be used for both MPEG-TS as well as DVD and a handful of other MPEG-type stuff.

I'm pretty sure there won't be anything available to do on the PVR side, if an error occurs on seek I added a notification a couple versions back. If you're not seeing that, all has gone as planned. Let's check the log and be sure.

Seek ... ah, the glorious and highly annoying seek. I spent all night last night trying to make it even better -- I tried adding a "slide" seek, in that if a forward seek is small enough, just keep reading. Turns out I also learned something new last night -- it's not the seek operation that's slow, it's DXVA acceleration on Windows. Turn that off and seek is amazing on Windows! CPU goes through the roof, but hey - no more buffering. Still not quite as peppy as HDHomeRun App, but so much better. Side note there - whatever the deal is with DXVA they appear to have fixed it for Leia. Leia seek is waaaaay better than Krypton. Unfortunately half the UI controls aren't working in Leia (for me), but when they work that out and finish dealing with that weird video glitching on some streams (Discovery Family is particularly awful) I think Leia will be a big boost for us PVR using folks. I'd love a Krypton 17.7 with some of these things fixed, but c'est la vie. The newer versions of this PVR on an nVidia Shield running Krypton seem just as good as Leia seek-wise to my old eyes.

If interested, the raw seek times on a Windows 10 PC on a 1Gbps LAN are typically under 2ms. Kodi thrashes about for a while looking for what I assume is a key frame, so it asks for a bunch of individual seek operations, but add them up and it's still well under 50ms, effectively instantaneous. If it asks for a small seek backwards I handle that with the buffer, cutting a couple more milliseconds off when possible. Regardless, it has become obvious to me that there really aren't any more optimizations available. Even going crazy with a custom demuxer to try and cut down the number of seeks wouldn't do much! The RECORD engine is great, it responds extremely quickly. Any lag we see appears to be just the result of Kodi doing whatever Kodi needs to do to sync things back up and start playing again.

djp952
Posts: 897
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Fri Aug 24, 2018 2:33 pm

That little seek diatribe of mine ^^^ leads me to the next one … what additional pain points do we have with this thing? Seek appears to be … seek. Not sure there is anything more that can be done there except wait for Leia.

I'm thinking the next high level pain point is probably the Timers / Timer Rules. For folks that have perused the wiki and/or have been around since the 1.0.x days, the implementation I have right now is a bit of a kludge in places. Very square peg in round hole.

I have notes in the code to eventually go back and make some suggested changes to Team Kodi to make some things a little better, but I had an idea about the glaring omission: "One Shot" timers. These are date/time/channel timers, and as you can see from the errors in the Kodi logs, I don't implement them. Insofar as I know there is currently no way to set one of these up via the HDHomeRun backend -- you have to tell it to record a specific program (series, actually).

What would you guys think of an additional kludge to try and fudge these one-shot timers by using the EPG to figure out what program(s) need to be recorded to satisfy it? It's definitely not the same thing -- if you chose a date/time/channel that overlaps multiple programs you will end up with multiple recordings. They will also start and end when they start and end, it won't be a "start at 9:22PM and record for 35 minutes" type of operation. You would get a recording that started at 9:00PM and went to 9:30PM, and another one that went from 9:30PM to 10:00PM, assuming it's 2 30 minute programs. There would also be UI weirdness -- you would be setting up a single one-shot timer, but it would look like multiple individual 'Record Once' timers in the UI. I avoided this in the first place since it seemed too weird, but I would like to be able to do SOMETHING for you guys, not to mention shut up those errors in the log :)

The other changes I need to think about some more and see what I can propose for changes to Kodi that they might accept. But let me know about the "one-shot" timer idea I have, or of course if you have a different idea on how that might be able to work.

Are the any other major overriding pain points to address? Big stuff like missing features or poor implementation. Bugs are bugs, I'm trying to figure out what else we need to make this more complete.

Thanks gang!

ddejager
Posts: 107
Joined: Tue May 06, 2014 2:26 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ddejager » Fri Aug 24, 2018 3:18 pm

Can you send me a Kodi log?
So here is a link to the Kodi log: https://paste.osmc.tv/asuridojim

Search the log for "Take Two". I watched it for a while, noticed a glitch, kept watching, and started to notice that skip forward was acting wierd. Eventually it totally froze up on me for about 3 minutes. It would not responds to any commands. The video finally stopped and I restarted it. Hence you will see the recording being opened twice.

Hope it helps you see what is going on. I don't see anything in the log when I skip forward, though before the freeze I do see errors about timeouts waiting for buffers. Thanks!

ssyspro
Posts: 20
Joined: Thu Sep 29, 2016 3:14 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ssyspro » Fri Aug 24, 2018 5:34 pm

djp952, A few versions back I could seek on a recording in progress was not perfect for example 1hr recording and I start playing 23 min. into it I could seek (fast forward through commercials) up to the time I started to play it. With recent versions, I can not seek on a recording in progress at all so if I start playing the 1hr recording at 50min into it I can not fast forward and need to stop playback after recording is finished and restart to use the seek function.

I am using Leia on all my boxes so don't know if other Kodi versions are doing this also but could you look into it and see if it is something that can be fixed?

djp952
Posts: 897
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Fri Aug 24, 2018 8:55 pm

ddejager wrote:
Fri Aug 24, 2018 3:18 pm
Can you send me a Kodi log?
So here is a link to the Kodi log: https://paste.osmc.tv/asuridojim

Search the log for "Take Two". I watched it for a while, noticed a glitch, kept watching, and started to notice that skip forward was acting wierd. Eventually it totally froze up on me for about 3 minutes. It would not responds to any commands. The video finally stopped and I restarted it. Hence you will see the recording being opened twice.

Hope it helps you see what is going on. I don't see anything in the log when I skip forward, though before the freeze I do see errors about timeouts waiting for buffers. Thanks!
Unfortunately as I feared the PVR never explicitly stated it had a problem. Short of a defect/bug this would mean it was able to satisfy each request from Kodi successfully. The "timeout waiting for buffer" message from Kodi is a bit misleading, it happens quite often. From what I've been able to tell it almost always happens when you seek, and it's Kodi's way of saying it's taking longer than it expected to re-sync the audio and video. I see that all the time on seek operations, not so much (if ever) just playing a stream straight through.

I'm not a real expert on the guts of Kodi but it appears it got stuck somewhere and there is some overall timeout that occurred which causes the "stream stalled" message and initiates the close operations. This line is telling, I believe it indicates that Kodi gave up on the stream and said it needs to be killed:

19:20:44.200 T:1021309696 ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true

OSMC has been reported as having problems with corrupt streams in the past (was this you? sorry if I forgot!!), something about the implementation has real difficulty with them. I have a corrupt OTA recording of "Bull" here from that, and every other platform we tried it on worked acceptably well.

I'll keep the thinking cap on for this one, but I have no immediate answers :(

Locked