Jump to content

TVHeadend Recordings ... why is it separate from LiveTV's Recordings tile?


diego.rivera

Recommended Posts

diego.rivera

Hi!

 

I've finally got my DVR working well enough that I'm happy with it, though still have a few kinks to work out.  Two of such kinks are as follows:

 

1) Is there any way to hide the "TVHeadend Recordings" section? Since the recordings are visible within the LiveTV section's Recordings area, this seems kind of redundant.

2) Once I start recording a program, I can't stop the recording via the WebUI or the Roku Beta app (i.e. playback via web, hit record, and now I can't stop the recording). Can this be fixed?

 

Otherwise, everything seems to be working fine!

 

Thanks!

Link to comment
Share on other sites

diego.rivera

Ok so I found how to solve #1 ... but #2 is still an issue and I don't think that's something I can solve on my end.

 

Any ideas?

Link to comment
Share on other sites

diego.rivera

TVHeadend with different backend tuners, using (obviously) the TVHeadend LiveTV/DVR service for Emby.

 

Everything works fine, but it can't stop active recordings.

Edited by diego.rivera
Link to comment
Share on other sites

If it's a tuner that we support  natively such as HDHR or M3u, then I would strongly suggest setting it up directly with Emby for a more integrated and seamless experience.

Link to comment
Share on other sites

diego.rivera

The HDHR's I have only tune 4 channels (long story, still fighting that battle in regulatory court), and the others are analog channels.

 

Is there a way to get in touch with the developer(s) of the TVHeadend service? Is there documentation elsewhere that might enable me to code my own LiveTV service?

 

Alternatively, I could simply come up with an IPTV M3U playlist that simply fronts for TVHeadend (i.e. full of TVHeadend URLs), but I'd like to exhaust all other options first since I don't know which metadata Emby would support reading from that playlist to provide channel names, icons, etc. (is this documented somewhere?)

 

Cheers!

Link to comment
Share on other sites

diego.rivera

Furthermore, I'd have to manually do the channel mapping from the XMLTV EPG list to that M3U playlist, so that approach is becoming less and less palatable...

Link to comment
Share on other sites

diego.rivera

Ok so I tried to switch over to M3U-based playback (did some magic to generate some M3U playlists that still tune through TVHeadend), and removed the TVHeadend Client Service.

 

The immediate result was that now, all my channels are duplicated. I'm trying to remove everything (including the XMLTV source), and will refresh the guide hoping that all the Live TV data will be flushed out so I can start fresh.

 

If this doesn't work, and for future reference, how does one go about forcing a clear of the LiveTV channel/guide data?

 

Cheers!

Link to comment
Share on other sites

If this doesn't work, and for future reference, how does one go about forcing a clear of the LiveTV channel/guide data?

 

Cheers!

 

You just remove the tuners and guide sources that you've added and then refresh the guide.

Link to comment
Share on other sites

diego.rivera

That didn't work. I had to re-start the server multiple times and remove stuff from the caches manually.

 

But now I have a different problem.  I managed to get the channels re-added from the M3U playlist(s), and got the XMLTV guide re-imported.  However, now when I try to tune via the M3U, I get this error:

2019-03-13 12:31:02.908 Info App: Opening SharedHttpStream Live stream from http://emby:emby@tvheadend:9981/stream/channelnumber/7
2019-03-13 12:31:02.908 Info HttpClient: Found userInfo in url: emby:emby ... url: http://emby:emby@tvheadend:9981/stream/channelnumber/7
2019-03-13 12:31:02.908 Info HttpClient: GET http://emby:emby@tvheadend:9981/stream/channelnumber/7
2019-03-13 12:31:02.911 Info HttpClient: Http response 401 from http://emby:emby@tvheadend:9981/stream/channelnumber/7 after 3ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, WWW-Authenticate=Digest realm="tvheadend", qop="auth", nonce="522f83afdba5a56e069aea3e729863b3", opaque="8cc89f0118d1e4338f4ff33f8713c513", Connection=close
2019-03-13 12:31:02.914 Error App: Error opening tuner
	*** Error Report ***
	Version: 4.0.2.0
	Command line: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/system/EmbyServer.dll -programdata /share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata -ffdetect /share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffdetect -ffmpeg /share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffmpeg -ffprobe /share/CACHEDEV1_DATA/.qpkg/EmbyServer/bin/ffprobe -defaultdirectory /share/CACHEDEV1_DATA -updatepackage emby-server-qnap_{version}_x86_64.qpkg
	Operating system: Unix 4.2.8.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 4
	Program data path: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/programdata
	Application directory: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Unauthorized
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Emby.LiveTV.TunerHosts.SharedHttpStream.Open(CancellationToken openCancellationToken)
	   at Emby.LiveTV.TunerHosts.BaseTunerHost.GetChannelStream(String channelId, String streamId, List`1 currentLiveStreams, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Emby.LiveTV.TunerHosts.SharedHttpStream.Open(CancellationToken openCancellationToken)
	   at Emby.LiveTV.TunerHosts.BaseTunerHost.GetChannelStream(String channelId, String streamId, List`1 currentLiveStreams, CancellationToken cancellationToken)

If I paste the URL (http://emby:emby@tvheadend:9981/stream/channelnumber/7) into VLC, it opens up perfectly so it's not a URL problem. It seems Emby is deciding, unilaterally, to use digest authentication when it should be using basic.

 

How can I fix this?

Edited by diego.rivera
Link to comment
Share on other sites

diego.rivera

It seems it's TVHeadend requesting the Digest authentication - shouldn't Emby support this already?  I've configured TVH to use basic and now things seem to be working better.

 

However, the cached guide data is still there and I can't clear it out manually, and it doesn't appear to be clearing out automatically even after server restarts.

 

Is there any other way to expedite this?

Link to comment
Share on other sites

 

 

However, the cached guide data is still there and I can't clear it out manually, and it doesn't appear to be clearing out automatically even after server restarts.

 

Did you run the refresh guide scheduled task?

Link to comment
Share on other sites

The dupe data will not be removed until the end of the refresh guide task is ran.

No amount of server restarts will help.  Just run the refresh and wait. :)

  • Like 1
Link to comment
Share on other sites

diego.rivera

Yeah...it appears one has to sit by a few minutes and wait for the refresh job to conclude.

 

Thanks for the GitHub link!! I was looking for that! Perhaps add it in the Plugin description? :)

 

I'll have a look to see if I can improve the plugin's integration with TVH to handle the recording. Frankly, I'd much rather the plugin than the M3U solution since it would allow me to leverage the TVH server for recordings, but I can live with the alternative if it comes down to it.

 

Where can I find developer docs on Emby's plugin APIs, etc?

 

Cheers!

Link to comment
Share on other sites

diego.rivera

I don't know enough about TVHeadEnd to answer, this, but the plugin is a community addition, and the source code can be found here:

https://github.com/MediaBrowser/Tvheadend

 

Contributions are welcome. Thanks !

 

The problem was with Emby's M3U tuner, not the plugin.  I managed to reconfigure TVHeadend to allow basic auth, but this is something that Emby should support (or, at least, allow one to specify during M3U tuner creation).

 

Cheers!

  • Like 1
Link to comment
Share on other sites

diego.rivera

Final question: is there anywhere I can get at the source code for Emby where I can see how it interacts with the LiveTV plugin? I'm looking through the GitHub repos for MediaBrowser

 and I see a ton of repos, but the only one that looks like it would work is this one, however that only goes as far as 3.5.2.0, and the one I'm running is 4.0.2.0...

 

This is what I need to know:

  • Which service(s, and in which order) are invoked from the LiveTV source to start/schedule a recording in the backend (TVH in this case)?
  • Which service(s, and in which order) are invoked in order to determine the current recording status for the channels being displayed?
  • Which service(s, and in which order) are invoked in order to determine if the record button should start a recording, or stop one

Obviously the easiest solution is to go through the source code, but if it's that hard to find I'm guessing you guys are keeping 4.0.X under wraps, which is understandable...

 

That said, I do need those answers if I'm to have any hope of figuring out what needs patching in the TVH LiveTV plugin.

 

PS/ the reason I'd rather use the TVH plugin than record on the Emby server is b/c TVH is on a separate (small) box that has dedicated storage for precisely that purpose, and I'd just as soon continue using that box, for that purpose, than consume resources in the NAS device hosting Emby and the media library.

 

Cheers!

Link to comment
Share on other sites

diego.rivera

What about checking recording status for a channel? Either one that's about to be played back (i.e. user hasn't hit "play" yet) or one that's being played back (i.e. play back a live recording, or the user just hit "record")?

 

Still only those two methods?

 

And where's the declaration/documentation for ILiveTvService? Kinda need that if I'm going to have any hope of deciphering how the interface is consumed by the overarching framework, and what needs fixing in that damn "Record" button  :D

Edited by diego.rivera
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...