Jump to content

Tvheadend plugin for Emby - Beta 1


Tolotos

Recommended Posts

ok, first issue I ran into was that starting a stream takes some extra time, because it seems to allways start one stream, then cut that one after a few seconds (probing stream ?) Then two new streams are opened. It's not a big issue, but it adds quite a bit of delay starting a stream.

 

 

2016-03-28 00:19:59.560 mpegts: 10778V in CD-Sat - tuning on NXP TDA10071 : DVB-S #0
2016-03-28 00:19:59.703 capmt: oscam: Starting CAPMT server for service "MAX HD" on adapter 1 seq 0x0070
2016-03-28 00:19:59.703 subscription: 1F4E: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-28 00:20:05.000 subscription: 1F4E: "HTTP" unsubscribing from "MAX", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-28 00:20:05.029 capmt: oscam: Removing CAPMT Server from service "MAX HD" on adapter 1
2016-03-28 00:20:05.310 mpegts: 10778V in CD-Sat - tuning on NXP TDA10071 : DVB-S #0
2016-03-28 00:20:05.337 capmt: oscam: Starting CAPMT server for service "MAX HD" on adapter 1 seq 0x0071
2016-03-28 00:20:05.337 subscription: 1F4F: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-28 00:20:11.499 mpegts: 10778V in CD-Sat scan complete
Link to comment
Share on other sites

Ok, over to a real problem, seems it cannot play channes with many audio streams (I though that was the feature I enabled in settings)

 

This is the output from tvheadend:

 

 

2016-03-27 23:50:50.109 mpegts: 12015H in CD-Sat - tuning on NXP TDA10071 : DVB-S #0
2016-03-27 23:50:50.837 capmt: oscam: Starting CAPMT server for service "HISTORY HD" on adapter 1 seq 0x005f
2016-03-27 23:50:50.837 subscription: 1F24: "HTTP" subscribing on channel "History Channel Norway", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "12015H", provider: "Telenor", service: "HISTORY HD", profile="pass", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-27 23:50:50.926 pass: unable to add stream 13 MPEG2AUDIO eng (PID 3303) - no space
2016-03-27 23:50:50.926 pass: unable to add stream 14 MPEG2AUDIO cze (PID 4135) - no space
2016-03-27 23:50:50.926 pass: unable to add stream 15 MPEG2AUDIO hun (PID 4137) - no space
2016-03-27 23:50:50.926 pass: unable to add stream 16 MPEG2AUDIO pol (PID 4138) - no space
2016-03-27 23:50:50.926 pass: unable to add stream 17 MPEG2AUDIO tur (PID 4159) - no space
2016-03-27 23:50:50.926 pass: unable to add stream 18 MPEG2AUDIO dut (PID 4188) - no space
2016-03-27 23:50:50.926 pass: Live stream: Unable to build pmt
2016-03-27 23:50:50.926 webui: Stop streaming /stream/channelid/33496327, muxer reported errors
2016-03-27 23:50:50.926 subscription: 1F24: "HTTP" unsubscribing from "History Channel Norway", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-27 23:50:50.952 capmt: oscam: Removing CAPMT Server from service "HISTORY HD" on adapter 1
Link to comment
Share on other sites

And now the last issue, nothing works in Emby Theater. The progress is the same as with MS Edge browser, it first starts one stream that is cut within short time, then two new subscriptions are started, but even though they start out fine soon the output from TVH becomes 0 bytes/s and Emby Theater never starts playing.

 

Output from tvheadend:

 

2016-03-28 00:12:27.303 mpegts: 10778V in CD-Sat - tuning on NXP TDA10071 : DVB-S #0
2016-03-28 00:12:27.542 capmt: oscam: Starting CAPMT server for service "MAX HD" on adapter 1 seq 0x006e
2016-03-28 00:12:27.542 subscription: 1F47: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-28 00:12:33.172 subscription: 1F47: "HTTP" unsubscribing from "MAX", hostname="192.168.10.205", client="Lavf/57.25.100"
2016-03-28 00:12:33.223 capmt: oscam: Removing CAPMT Server from service "MAX HD" on adapter 1
2016-03-28 00:12:33.654 mpegts: 10778V in CD-Sat - tuning on NXP TDA10071 : DVB-S #0
2016-03-28 00:12:33.708 capmt: oscam: Starting CAPMT server for service "MAX HD" on adapter 1 seq 0x006f
2016-03-28 00:12:33.708 subscription: 1F48: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client=""
2016-03-28 00:12:33.848 subscription: 1F49: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client=""
2016-03-28 00:12:39.000 mpegts: 10778V in CD-Sat scan complete
2016-03-28 00:13:07.088 pass: Live stream: Write failed -- Ressursen midlertidig utilgjengelig
2016-03-28 00:13:07.088 webui: Stop streaming /stream/channelid/114597577, muxer reported errors
2016-03-28 00:13:07.088 subscription: 1F48: "HTTP" unsubscribing from "MAX", hostname="192.168.10.205", client=""
2016-03-28 00:13:07.092 pass: Live stream: Write failed -- Ressursen midlertidig utilgjengelig
2016-03-28 00:13:07.092 webui: Stop streaming /stream/channelid/114597577, muxer reported errors
2016-03-28 00:13:07.092 subscription: 1F49: "HTTP" unsubscribing from "MAX", hostname="192.168.10.205", client=""
2016-03-28 00:13:07.120 capmt: oscam: Removing CAPMT Server from service "MAX HD" on adapter 1

 

(translation : Ressursen midlertidig utilgjengelig = Resource temporary unavailable )

 

Notice the client name is missing on the two last subscribtions

Link to comment
Share on other sites

ok, first issue I ran into was that starting a stream takes some extra time, because it seems to allways start one stream, then cut that one after a few seconds (probing stream ?) Then two new streams are opened. It's not a big issue, but it adds quite a bit of delay starting a stream.

 

2016-03-28 00:19:59.560 mpegts: 10778V in CD-Sat - tuning on NXP TDA10071 : DVB-S #02016-03-28 00:19:59.703 capmt: oscam: Starting CAPMT server for service "MAX HD" on adapter 1 seq 0x00702016-03-28 00:19:59.703 subscription: 1F4E: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client="Lavf/57.25.100"2016-03-28 00:20:05.000 subscription: 1F4E: "HTTP" unsubscribing from "MAX", hostname="192.168.10.205", client="Lavf/57.25.100"2016-03-28 00:20:05.029 capmt: oscam: Removing CAPMT Server from service "MAX HD" on adapter 12016-03-28 00:20:05.310 mpegts: 10778V in CD-Sat - tuning on NXP TDA10071 : DVB-S #02016-03-28 00:20:05.337 capmt: oscam: Starting CAPMT server for service "MAX HD" on adapter 1 seq 0x00712016-03-28 00:20:05.337 subscription: 1F4F: "HTTP" subscribing on channel "MAX", weight: 100, adapter: "NXP TDA10071 : DVB-S #0", network: "CD-Sat", mux: "10778V", provider: "Telenor", service: "MAX HD", profile="pass", hostname="192.168.10.205", client="Lavf/57.25.100"2016-03-28 00:20:11.499 mpegts: 10778V in CD-Sat scan complete
This is the normal behavior with the subtitle feature enabled. The TV stream must be probed to tell Emby what is available (subs, multiple audio tracks, etc). Otherwise Emby will only play the video and the first audio stream and it will not allow you to play subs or any different audio stream.

 

I wish it could be done more efficiently but under the current circumstancies it's the best approach I could found. :(

 

The stream probing is done by Emby code, outside of the plugin. Having said that if your tv stream really have 18 audio streams it may not be supported by the probing code and this will need to be reviewed/fixed in Emby code.

Edited by fc7
Link to comment
Share on other sites

Ok, so I've done som more testing and AndroidTV client behaves the same as MS Edge browser. That is, working fine in most cases. But again the channel with 6 audio streams fails, however channels with only 2 audio streams works fine. Also recordings are not direct played, they get transcoded.

 

These where my primary goals of direct playback (no transcoding)

1. Faster tuning (this did not happen, because of the probing)

2. Ability to seek (this does not seem to work either, maybe client issue ?)

3. Less workload on server (success :) )

 

Thank you @@Tolotos and @@fc7 for you contribution so far, I hope you keep up development.

 

would it be possible to hardcode (kind of like the DLNA profiles) the streaming information rather than probing, also I know tvheadend support some type of stream filtering, could be an option to filter out stuff that cause problems.

 

I'm fairly certain my provider use  either MPG2 (SD) or H264 (HD) for video and MPG2 or AC3 for audio.  So if I could just tell emby server, what you get is within these limits, deal with it :)   You get my idea ?

Link to comment
Share on other sites

wraymando

Challenge time, no channels via emby live tv! 

 

I've just started with tvheadend (so its probably a rookie mistake), everything from that side seems good. Epg loaded, channels have numbers and I can play the links tvheadend give (the tvheadend client works too) however I cannot get any channels to list via the plugin.

 

Doing so pro googling that could be down the not having channel numbers or channel numbers not being actual numbers however that all seems ok (though some have dots between numbers, the vast majority dont).

 

Everything looks good on the emby status page so any suggstions? 

 

tvheadend is 4.0.8, emby is 3.0.5911.0 and I've tried release and beta of tvheadend plugin (currently using TVHclient 1.0.5900.29260)

Link to comment
Share on other sites

wraymando

Scrap that, I thought I'd disabled all the channel numbers with dots in but I must not have pressed the save button in tvheadend! 

 

Looks like its working now!

 

:blink:

Link to comment
Share on other sites

ebike

Hi All,

 

I have been trying to get TVHeadend plugin to work without sucess. The liveTV status page shows it as ok, but nothing shows up in guide,channels,recordings etc.

Is the following version of TVHeadend supported?

 

EDIT: I see my HTSP protocol is only 10, should it be higher for this plugin?

 

External Services

TVHclient LiveTvService

Tvheadend 4.1-1577~g718d299-dirty

HTSP protokoll version: 10

Free diskspace: 4GB / 23GB

checkmarkgreen.png Up to date!

Status: Ok

 

Many Thanks,

Edited by ebike
Link to comment
Share on other sites

Tolotos

The released version supports only HTSP V10. The lates Beta starts supporting V20 - but there are currently much open items.

The first added V20 feature is supporting sub numbers for channels e.g. channel number 1.2 is now supported if tvheadend server devides the two numbers correctly. 

I'm working to add the series timer functions but the interfaces are not easy fitting.

E.g. Emby has a method Update-Timer but TVHeadend has only delete and create. To implement the Update function I must deleted the existing timer and create it new - but what happen with planned recordings.

There is lot of stuff to check to keep the system running. Loosing series recordings would be the hell for my wife and doughter ;-) 

 

@@ebike can you please post your emby logs (maybe using the latest beta)?

 

-- Tolotos

Link to comment
Share on other sites

ebike

Hi Tolotos,

 

Thanks for the reply. I have it working .... I did verious refreshes and restarts of Emby and it now shows the guide and channels and I can play the channels ..

However there is much pausing and jerky play even on SD content, so I need to try and find where the issues are ..

 

I think half the problem is that the tvheadend server is not on the same machine as the emby server so there are several streams and over Wifi as well ..

(would love to re-wire my house to suit my media center, but not possibe at the moment .... ;)

 

Do you have any suggestions to improve network traffic/buffering .... ?

Link to comment
Share on other sites

chiefnerd

Great work mate but we're having a snag.

 

Guide refreshes fine, channels show without a hitch but we just can't play a channel. We're on the latest emby release and also on TVheaded 4.0.9 and the version of your plugin is the latest beta release but all we get is "There was an error playing the video.

Please ensure there is an open tuner available."

 

Everything in TVHeadend is IPTV based, they all play perfectly fine. I've checked the account I made specially for emby and all is good that side.

 

Have you got any suggestions?

Link to comment
Share on other sites

Tolotos

@@chiefnerd

How many tuners do you have?

Do you using the probe feature?

 

Maybe the probe connection is still alive and blocks the tuner at the time emby tries to connect for play.

Can you please prove the emby log file?

 

 

@@ebike

The network connection for playing the stream is managed by emby. Did you tried to lower the quality of the stream.

Please check the CPU usage on the emby server - espacially of the ffmpeg subprozess.

 

 

--Tolotos

Link to comment
Share on other sites

ebike

@@Tolotos,

 

Thanks. I have restructured my server, the server is now a FreeNAS box running Emby server and I am in the process of putting Tvheadend on it ...

(Hint, Hint ... would be great if there was a Tvheadend plugin for FreeNAS  ;)  .... the manual install is a bit conveluted ...)

 

FreeNAS works great as an Emby/Plex server environment ... so easy to set up .. and seems to have a better transcoding performance than Linux did on the same box.

Link to comment
Share on other sites

chiefnerd

Tolotos...It's all IPTV so no physical tuners. There's 97 Muxes though.

 

I have no idea of any probe feature from your client? Every channel can handle basically an unlimited number of streams and we're running an Intel® Xeon® CPU E5-1410 v2 @ 2.80GHz, 8 cores witjh 96GB of RAM and 1TB SSD on the TVHeadend Server and the Emby Server is an  Intel® Xeon® CPU E5-2620 v3 @ 2.40GHz, 24 cores with 8TB SAS HDD and 128GB RAM and 1GBps bandwidth

 

What sort of logs would you like from Emby- I'm not the best on Emby as we've only switched to using it if you could let me know the details of accessing the logs.

Link to comment
Share on other sites

  • 1 month later...
fc7

Tolotos...It's all IPTV so no physical tuners. There's 97 Muxes though.

 

I have no idea of any probe feature from your client? Every channel can handle basically an unlimited number of streams and we're running an Intel® Xeon® CPU E5-1410 v2 @ 2.80GHz, 8 cores witjh 96GB of RAM and 1TB SSD on the TVHeadend Server and the Emby Server is an  Intel® Xeon® CPU E5-2620 v3 @ 2.40GHz, 24 cores with 8TB SAS HDD and 128GB RAM and 1GBps bandwidth

 

What sort of logs would you like from Emby- I'm not the best on Emby as we've only switched to using it if you could let me know the details of accessing the logs.

 

I have a few IPTV (multicast) channels configured on TVH and I'm able to play/record them in Emby without any issues. Just like any other TVH channel.

 

Logs from TVH and Emby while trying to play one of the channels will help to understand what's going on.

 

From the Emby side of things, it doesn't distinguish between IPTV or Tuner based channels in TVH. For Emby all the channels coming from TVH are just the same.

The plugin is telling TVH to provide this or that stream over http and that's all.

Link to comment
Share on other sites

fc7

NOTICE: if you are using the stream probe feature of the plugin please stay on Emby 3.0.5970 and do not upgrade to 3.0.5971 since something changed on Emby in this new version and the probing code is failing.

 

If you already upgraded and you can't watch LiveTV using TVH plugin please disable the stream probing feature for now we are working on the problem and update the thread with any news.

Link to comment
Share on other sites

dcrdev

Are the new recording-library integration features from 3.0.5971 supported by the plugin? I've just updated and I don't appear to have a separate library set up for recordings.

 

Also whilst I'm here, I'm having a couple of other issues with the plugin:

  • Changing the quality of a channel results in the video crashing and I have to restart the stream.
  • Recordings that have been deleted outside of Emby remain within Emby
  • I noticed in screenshot on the homepage https://emby.media/community/uploads/inline/2/5742a9afd6103_Untitled.png that Emby has the ability to show thumbnails for recordings; is that something that's supported by this plugin?

I'm running version 1.0.5977.36783 of the plugin.

 

Thanks for the work that's been put into this though! 

Link to comment
Share on other sites

fc7

NOTICE: if you are using the stream probe feature of the plugin please stay on Emby 3.0.5970 and do not upgrade to 3.0.5971 since something changed on Emby in this new version and the probing code is failing.

 

If you already upgraded and you can't watch LiveTV using TVH plugin please disable the stream probing feature for now we are working on the problem and update the thread with any news.

 

A new version of the plugin is out (thanks @Tolotos).

This new version solves the problem of stream probing and works with the latest Emby stable version (3.0.5971).

Link to comment
Share on other sites

dcrdev

Since upgrading it's no longer transcoding as hd - the maximum resolution I can get it 480p - any ideas?

Link to comment
Share on other sites

dcrdev

Since upgrading it's no longer transcoding as hd - the maximum resolution I can get it 480p - any ideas?

 

Bump

Link to comment
Share on other sites

fc7

Since upgrading it's no longer transcoding as hd - the maximum resolution I can get it 480p - any ideas?

 

It' working fine for me. For HD channels I'm able to transcode to the maximum channel resolution (720, 1080, etc).

Link to comment
Share on other sites

  • 3 weeks later...
chiefnerd

Sorry for the very late reply, getting no notifications. Emby is logging into headend no problems but it just can't open a stream, does the account emby is using need to be set to sometyhing other than htsp? I can see Emby is requesting the stream via http but also doesn't seem to be sending the channel ID when requesting the channel. Emb y can access recordings from headend, it just can't play a channel:

 

"2016-06-21 13:53:59.179 htsp: 163.172.20.179: Identified as user embystream

2016-06-21 13:53:59.179 htsp: 163.172.20.179 [ embystream ]: Welcomed client software: TVHclient4Emby-3.0.5973.0 (HTSPv20)
2016-06-21 13:53:59.184 htsp: 163.172.20.179 [ embystream | TVHclient4Emby-3.0.5973.0 ]: Privileges raised
2016-06-21 13:55:57.635 http: 163.172.20.179: using ticket 132AA6D596D9E7E4A16D9EC28C5147B4159A885D for /stream/channelid/134556832
2016-06-21 13:55:57.635 http: 163.172.20.179: HTTP/1.1 GET /stream/channelid -- 503"
Edited by chiefnerd
Link to comment
Share on other sites

poerlemans

Good afternoon,

 

I don't know if this is the right post. But I shall explain my problem:

I have TVHeadend server (HTS Tvheadend 4.0.8-3~gc870eb9~wheezy) with IP 192.168.1.51 installed on a Raspberry.

I have Emby installed on a Synology NAS. IP 192.168.1.32.

I have installed Tvheadend plugin version 1.0.5989.517 on the Emby server..

 

Connection from the server with TVHeadend seems oke (see first attachment 'TVH in settings') but when I want to start playing a channel nothing happens. No playing at all! I get a message (see second attachment 'Ned2_TVH'). I have no idea why playing is not possible. It might be a question of authorization???

Can someone explain what to do? I have included the server log and the transcoding log.

post-130727-0-09899100-1466523870_thumb.jpg

post-130727-0-98263600-1466524003_thumb.jpg

server-63602126316.txt

transcode-7c655ef1-19ba-4311-ace8-ce67ca944f75.txt

Link to comment
Share on other sites

yes, authorization is what it looks like

[http @ 0x3bc0c40] HTTP error 401 Unauthorized
http://192.168.1.51:9981/stream/channelid/519311609?ticket=D76EEE0991ED30EF3393411604C657799105E5B0: Server returned 401 Unauthorized (authorization failed)
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...