Jump to content


Photo

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

tvheadend livetv

  • Please log in to reply
19 replies to this topic

#1 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 12 March 2019 - 11:13 AM

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!



#2 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 12 March 2019 - 01:06 PM

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?



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 12 March 2019 - 11:56 PM

Hi there, what kind of tuner do you have?



#4 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 12 March 2019 - 11:58 PM

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, 13 March 2019 - 12:01 AM.


#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 13 March 2019 - 12:13 AM

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.



#6 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 12:19 AM

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!



#7 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 11:15 AM

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...



#8 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 01:41 PM

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!



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 13 March 2019 - 02:25 PM

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.



#10 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 02:35 PM

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@tvh...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, 13 March 2019 - 02:44 PM.


#11 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 02:46 PM

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?



#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 13 March 2019 - 02:54 PM

 

 

shouldn't Emby support this already?  

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/M...owser/Tvheadend

 

Contributions are welcome. Thanks !



#13 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 13 March 2019 - 02:54 PM

 

 

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?



#14 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2945 posts
  • Local time: 02:04 AM

Posted 13 March 2019 - 03:03 PM

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. :)


  • diego.rivera likes this

#15 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 03:40 PM

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!



#16 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 03:41 PM

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/M...owser/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!


  • cayars likes this

#17 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 13 March 2019 - 05:30 PM

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

 

Cheers!

 

https://github.com/M...owser/Emby/wiki



#18 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 13 March 2019 - 11:47 PM

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!



#19 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138067 posts
  • Local time: 02:04 AM

Posted 14 March 2019 - 12:42 PM

For 4.0, no, but it's the create timer and update timer methods for recordings.

#20 diego.rivera OFFLINE  

diego.rivera

    Advanced Member

  • Members
  • 31 posts
  • Local time: 12:04 AM

Posted 14 March 2019 - 02:00 PM

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, 14 March 2019 - 03:12 PM.






Also tagged with one or more of these keywords: tvheadend, livetv

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users