Jump to content

NextPVR - channel missing and recording question


chjohans

Recommended Posts

chjohans

1) At the moment I only have 6 digital channels in NextPVR. but Emby for some reason only can see 5 of them. All 6 works fine in NextPVR, but only 5 show up in Emby where they work fine. Guide data is fetched from NextPVR as expected. Any idea of how to debug this? Or is this a known issue?

2) Recording - it seems like recording is done by Emby itself, bypassing the NExtPVR recoding function? Is that how it's supposed to be? It's kind of a bummer for me because I'm using Kodi as well, and the NextPVR plugin for Kodi canmnot see the recordings this way.

Link to comment
Share on other sites

emveepee

For years Emby was just a client to NextPVR and it allowed  interoperability so NextPVR users could use any client they wished for recording, scheduling and  viewing.    Emby decided to gut this functionality and make NextPVR a recording engine that only Emby uses can use.  

One side effect of Emby deciding to forsake their own tuner development (at least for now) and use the fruit of other developers for their commercial profit was to make the interface only show 5 channels as a test but now you have to donate to NextPVR to get more channels.  This in no way compensates sub for the 1000s of hours of development that have gone into NextPVR.

So yes unfortunately this is how it is supposed to work, but from a NextPVR perspective the old approach was win-win for NextPVR, Kodi and Emby users.

As a side note I asked users to not upgrade to 4.7 because the plugin doesn't work reliably.

Link to comment
Share on other sites

chjohans

Ok, I'll just toss out NextPVR and use my Hauppauge tuners directly in Emby instead. I don't mind to donate, but I already paid for Emby Premium for two servers, and I have other optiins.

Link to comment
Share on other sites

emveepee

It depends on you what broadcast you get, NextPVR can record multiple channels from the same digital mux, Emby doesn't currently support that.   You can still use the m3u interface and lose OTA guide data if applicable but if you are willing to pay for Emby not sure why you feel you shouldn't support sub's effort.

Martin

Edited by emveepee
Link to comment
Share on other sites

  • 2 weeks later...
chjohans
On 03/06/2022 at 21:43, emveepee said:

It depends on you what broadcast you get, NextPVR can record multiple channels from the same digital mux, Emby doesn't currently support that.   You can still use the m3u interface and lose OTA guide data if applicable but if you are willing to pay for Emby not sure why you feel you shouldn't support sub's effort.

Martin

It's not that I'm not willing to support other developers, it's just that I won't use & support more than I need.

Anyhow, are you saying that Emby can use both the tuners in my Hauppauge dualHD card if I use NextPVR instead of Emby's native support for Hauppauge/WinTV? If that's the case I have no problem donating a bit to use NextPVR as a Live TV backend. But it's a bit confusing where to donate and how, the NextPVR plugin has no info re donating.

Link to comment
Share on other sites

emveepee

NextPVR can use multi-rec so it can in theory record more channels then tuners.  However Emby introduced a bug in 4.7 and it can actually lock all tuners.  Until the lock happens both tuners will work.

Martin

Link to comment
Share on other sites

chjohans
30 minutes ago, emveepee said:

NextPVR can use multi-rec so it can in theory record more channels then tuners.  However Emby introduced a bug in 4.7 and it can actually lock all tuners.  Until the lock happens both tuners will work.

Martin

Ok, thanks for useful info. I suppose there is no way at the moment for Emby to use both my tuners then.

@Luke, care to comment on this? IS this how it's supposed to be or will Emby eventually support both tuners in a dual-tuner card? If so, when? And will this bug in the NextPVR plugin that @emveepee mention be fixed?

I guess I did choose a real bad time to toss out Kodi on favor of Emby clients "everywhere". I thought that after all this time Emby's Live TV would have matured, but it doesn't even seem to do the mosty basic (like supporting 2 tuners in a dual-tuner card). Sigh!

Link to comment
Share on other sites

36 minutes ago, emveepee said:

NextPVR can use multi-rec so it can in theory record more channels then tuners.  However Emby introduced a bug in 4.7 and it can actually lock all tuners.  Until the lock happens both tuners will work.

Martin

HI, what bug is that?

Link to comment
Share on other sites

emveepee

Check the testing thread.  Emby doesn't always release tuners after opening a socket and I have to stop Emby to get them back

 

 

Link to comment
Share on other sites

On 6/13/2022 at 7:06 PM, emveepee said:

Check the testing thread.  Emby doesn't always release tuners after opening a socket and I have to stop Emby to get them back

 

 

OK I don't think it's an issue anymore. Thanks.

Link to comment
Share on other sites

chjohans
19 minutes ago, Luke said:

OK I don't think it's an issue anymore. Thanks.

OK @Luke, so I do have a question re this.

When I use the Emby built-in Hauppauge/WinTV support EMby will only use *one* of the tuners in my dualHD USB stick.

If I use the NextPVR plugin instead with the same tuner (NextPVR will use both tuners with no problem), will emby through the NextPVR plugin be able to use *both* tuners in said USB stick so I can record one channel while watching another?

 

Link to comment
Share on other sites

chjohans
5 minutes ago, chjohans said:

OK @Luke, so I do have a question re this.

When I use the Emby built-in Hauppauge/WinTV support Emby will only use *one* of the tuners in my dualHD USB stick.

If I use the NextPVR plugin instead with the same tuner (NextPVR will use both tuners with no problem), will emby through the NextPVR plugin be able to use *both* tuners in said USB stick so I can record one channel while watching another?

 

Forget the question, I just tested it and that works. It would be good if you could fix the Hauppauge/WinTV support so it can use more than one tuner as well. For now I'll use the NextPVR plugin as it seems to work better.

Link to comment
Share on other sites

emveepee
10 hours ago, Luke said:

OK I don't think it's an issue anymore. Thanks.

Is that fixed in 4.7 or 4.8  It was broken as of May 26th but you didn't' acknowledge that report and I didn't see any release notes for any change.

Martin

Edited by emveepee
Link to comment
Share on other sites

1 hour ago, emveepee said:

Is that fixed in 4.7 or 4.8  It was broken as of May 26th but you didn't' acknowledge that report and I didn't see any release notes for any change.

Martin

There was a lot of work done over the last month or so related to closing of streams.

Link to comment
Share on other sites

emveepee
20 minutes ago, Luke said:

There was a lot of work done over the last month or so related to closing of streams.

Which version to you want me to test to make confirm, I have been going by the email announcemnt notes and this has not been noted.

Martin

Link to comment
Share on other sites

46 minutes ago, emveepee said:

Which version to you want me to test to make confirm, I have been going by the email announcemnt notes and this has not been noted.

Martin

4.7.2 should be fine, or latest beta.

Link to comment
Share on other sites

emveepee
22 minutes ago, Luke said:

4.7.2 should be fine, or latest beta.

Testing 4.72.

 

It does seem better on closing sockets which was the biggest problem.

- still doesn't close tuner before opening a new live tv channel

- guide setting are still broken need manual two step update to go from NextPVR data to Emby.

- still cannot tune channels by channel number without guide data.

- terrible lip sync issues

Martin

 

Link to comment
Share on other sites

11 minutes ago, emveepee said:

Testing 4.72.

 

It does seem better on closing sockets which was the biggest problem.

- still doesn't close tuner before opening a new live tv channel

 

It definitely does without using the plugin. The next pvr plugin doesn't actually have a method to close the channel. It just assumes that when the server disconnects from the source url, that next pvr will have immediately closed it.

I'm guessing this process is not instantaneous, and therefore the server thinks it's closed and starts playing the next channel while next pvr is still working on closing the original stream.

Maybe a quick and dirty solution would be to add a close method into the plugin and just give it an arbitrary time delay of 500ms or so.

Link to comment
Share on other sites

emveepee

As you are aware the proper way to do this for Live TV (not recordings) is to pass the same &client= parameter for each call from the same client like true NextPVR clients  do and then you won't have any issue.

It does look like the Emby is closing the socket but it doesn't allow NextPVR enough time to disconnect from the HDHR (in this test case) and do the required temp file clean up

2022-06-15 13:59:36.891    [DEBUG][440]    Client has disconnected
2022-06-15 13:59:36.944    [DEBUG][438]    Got request [172.16.3.3]: /live

so since it is a new client there is an error since NextPVR gives priority to the /live request from a new client before the clean up since with enough tuners it is better to deliver live tv fast.  Failing that the client needs to wait for  the cleanup (when tuners are restricted)

2022-06-15 14:11:51.033	[DEBUG][362]	Client has disconnected
2022-06-15 14:11:52.033	[DEBUG][362]	StopStream(1507357)...
2022-06-15 14:11:52.033	[DEBUG][362]	clientHandle[a6aba658ae] = 1507357
2022-06-15 14:11:52.033	[DEBUG][362]	Calling StopStream()
2022-06-15 14:11:52.033	[DEBUG][362]	StopStream(29)
2022-06-15 14:11:52.033	[DEBUG][362]	StopStream handle: 29
2022-06-15 14:11:52.033	[DEBUG][362]	Closing TSWriter....: LIVE&/home/martin/recordings/live-CIII-HD-265576-51.ts
2022-06-15 14:11:52.127	[ERROR][362]	writer.Close() did not complete in a timely fashion
2022-06-15 14:11:52.127	[DEBUG][362]	Close@2
2022-06-15 14:11:52.127	[DEBUG][362]	Closing mapAccessor
2022-06-15 14:11:52.253	[DEBUG][362]	Closing mapMMF
2022-06-15 14:11:52.253	[DEBUG][362]	Closing mapFileStream
2022-06-15 14:11:52.253	[DEBUG][362]	deleting /home/martin/recordings/live-CIII-HD-265576-51.ts.map
2022-06-15 14:11:52.253	[DEBUG][362]	Close@exit
2022-06-15 14:11:52.253	[DEBUG][362]	StopStream@exit
2022-06-15 14:11:52.273	[DEBUG][362]	stopping graph
2022-06-15 14:11:52.273	[DEBUG][362]	destroying graph
2022-06-15 14:11:52.273	[INFO][362]	Stopped
2022-06-15 14:11:52.273	[DEBUG][362]	StopStream() done

]

 

Martin.

Edited by emveepee
Link to comment
Share on other sites

13 minutes ago, emveepee said:

As you are aware the proper way to do this for Live TV (not recordings) is to pass the same &client= parameter for each call from the same client like true NextPVR clients  do and then you won't have any issue.

It does look like the Emby is closing the socket but it doesn't allow NextPVR enough time to disconnect from the HDHR (in this test case) and do the required temp file clean up

2022-06-15 13:59:36.891    [DEBUG][440]    Client has disconnected
2022-06-15 13:59:36.944    [DEBUG][438]    Got request [172.16.3.3]: /live

so since it is a new client there is an error since NextPVR gives priority to the /live request from a new client before the clean up since with enough tuners it is better to deliver live tv fast.  Failing that the client needs to wait for  the cleanup (when tuners are restricted)

2022-06-15 14:11:51.033	[DEBUG][362]	Client has disconnected
2022-06-15 14:11:52.033	[DEBUG][362]	StopStream(1507357)...
2022-06-15 14:11:52.033	[DEBUG][362]	clientHandle[a6aba658ae] = 1507357
2022-06-15 14:11:52.033	[DEBUG][362]	Calling StopStream()
2022-06-15 14:11:52.033	[DEBUG][362]	StopStream(29)
2022-06-15 14:11:52.033	[DEBUG][362]	StopStream handle: 29
2022-06-15 14:11:52.033	[DEBUG][362]	Closing TSWriter....: LIVE&/home/martin/recordings/live-CIII-HD-265576-51.ts
2022-06-15 14:11:52.127	[ERROR][362]	writer.Close() did not complete in a timely fashion
2022-06-15 14:11:52.127	[DEBUG][362]	Close@2
2022-06-15 14:11:52.127	[DEBUG][362]	Closing mapAccessor
2022-06-15 14:11:52.253	[DEBUG][362]	Closing mapMMF
2022-06-15 14:11:52.253	[DEBUG][362]	Closing mapFileStream
2022-06-15 14:11:52.253	[DEBUG][362]	deleting /home/martin/recordings/live-CIII-HD-265576-51.ts.map
2022-06-15 14:11:52.253	[DEBUG][362]	Close@exit
2022-06-15 14:11:52.253	[DEBUG][362]	StopStream@exit
2022-06-15 14:11:52.273	[DEBUG][362]	stopping graph
2022-06-15 14:11:52.273	[DEBUG][362]	destroying graph
2022-06-15 14:11:52.273	[INFO][362]	Stopped
2022-06-15 14:11:52.273	[DEBUG][362]	StopStream() done

]

 

Martin.

The client param is used but you're exactly right. The server doesn't really have a way to know how much time nextpvr needs to close all of the resources associated with the open stream. I can add an arbitrary time delay to the closing process in the plugin to try and account for this.

 

Link to comment
Share on other sites

emveepee

I am talking a unique clientid  when you are using live tv, then NextPVR can immediately process the request.    For recordings use any guid but for live tv you should use a unique client based guid.

It you add an arbitrary delay then users with multiple tuners will suffer.

Martin

Link to comment
Share on other sites

chjohans

Thanks for working on this! Looks like my route to Live TV in Emby will be to use the NextPVR plugin. Thanks for supporting this plugin @emveepee/Martin!

Link to comment
Share on other sites

emveepee

Thanks but Luke did all the work on this as I prefer using full NextPVR clients.  I am sure it will be useful for most Emby users and I can almost recommend it now.

Martin

Link to comment
Share on other sites

chjohans

A quick question, when using the NextPVR, will Emby fetch guide data from NextPVR, or do I have to add my own Guide Data Source under Emby's Live TV settings?

The reason I ask is that I have some issues with series recordings when using the NextPVR plugin. When I used the built-in Hauppauge/WinTV support series recoridng were fine (but Emby didn't use my second tuner), now when I'm using the NextPVR plugin it seems to just ignore the episode data (which is there!).

So when I make a series recording for a nightly news program (which does have episode data in the EPG), the resulting recording schedule is every night at the original air time. It ignores the re-run of the same news that happens after midnight and early next day (those all have the same episode data in the EPG of course). Another thing is that the series recording symbol do not show up in the EPG at all for those scheduled recordings, even as they show up in the list below "Shedule"  when I chose "Series" and that particular scheduled series recording. The re-runs does not show in that list at all. And in that list it does *not* show any episode data! The episode data does show up in the EPG though.

When I was using the built-in Hauppauge/WinTV support the EPG would indicate with the red "series recording" symbol for each of the news programs that were scheduled for recording. And every single episode of the same news program would show up in the list below "Shedule"  when I chose "Series" and that particular scheduled series recording. The ones that would actually record would have a red "series recording" symbol in that list, and the re-runs after midnight and early next day would have a "greyed out" series recording symbol to indicate that those would not be recorded. it all was fine and made sense.

Now when I was using Hauppauge/WinTV I used my own XML guide data under Emby's Live TV config, I'm using WebGrab+ to grab EPG data . This worked just fine with the built-in Hauppauge/WinTV support.

I used the exact same EPG data with the NextPVR plugin, and the result were as above. The episode data show up just fine in the EPG, but not for the scheduled recordings.

As a test I removed the XML EGP source from Emby's Live TV settings, to see if it will use the Guide data from NextPVR (which is using the exact same XML). Emby still shows EPG data, but that might be because it has cached EPG data for a week or so. Still not sure if the NextPVR plugin will fetch EPG data as well.

 

But there are issues:

1) With Hauppauge/WinTV native support I get working series recordings, but only one tuner will be used. That's not something I can live with so this is not an option.

2) With the NextPVR plugin it seems like series recordings are totally broken, that's not something I can live with either so this is not an option either.

 

Questions:

1) I guess this one is for @Luke: Will the native Hauppauge/WinTV support be fixed so it will use both tuners in my dualHD Hauppauge USB stick(s)? If yes, when will this be fixed? If yes, is this a priority or is the answer "some time in the future"?

2) Can the series recording issue I have with the NextPVR plugin somehow be fixed, and should I configure an EPG source under Emby's Live TV settings or will guide data be fetched from NextPVR?

 

Then another different but related question, when series recordings are created by clicking "Record Series" in the EPG the resulting Series Recording schedule has "Record: New episodes only" set by default, as opposed to "Record: All episodes". Now my guida data does not have the "new" information, so I have to manually change this to "All episodes". Not at all "wife friendly", so my wife refuse to use this as it is. Complains and wants Kodi back, I'm trying to change to Emby to have a more "lightweight client". Is there any way to change the default from "New episodes only" to "All episodes"?

 

Nothing is perfect, but these issues breaks the TV experience totally. So unless something can be done, or I misunderstood entirely how this is supposed to work in Emby and did something really wrong, I have to switch back to Kodi on the clients (which has it's own set of issues, but at least Live TV and recording/series recordings, tuner usage etc is rock solid!). If I do that I will most likely keep NextPVR as my TV server since TV Mosaic is pretty much dead.

 

I really would like to keep Emby on the clients though so some help with this would be greatly appreciated!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...