Jump to content

Tvheadend plugin for Emby - Beta 1


Tolotos

Recommended Posts

  • 4 weeks later...

Hi,
 
Emby live tv was configured and working with TVHClient plugin on Ubuntu 16.04 box but recently starting refusing to play.

Checking using same tvheadend user and password with another client suggest that it's fine.

 

Not too sure what changed on the server and broke it. Need help to see where to look next.

 

Looks like some sort of issue with ffmpeg.

Input #0, matroska,webm, from 'http://192.168.1.4:9981/stream/channelid/856077443?ticket=540D5DF0092C4ABAD0A22B4C4D316F342B5FB899':
  Metadata:
    title           : RTÉ One
    encoder         : Tvheadend Matroska muxer
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s (default)
    Stream #0:2(nar): Audio: mp2, 48000 Hz, mono, s16p, 64 kb/s (default)
    Stream #0:3(eng): Subtitle: subrip (default)
[subtitles @ 0x1038fe0] Unable to parse option value "9981/stream/channelid/856077443?ticket=540D5DF0092C4ABAD0A22B4C4D316F342B5FB899" as image size
    Last message repeated 1 times
[subtitles @ 0x1038fe0] Error setting option original_size to value 9981/stream/channelid/856077443?ticket=540D5DF0092C4ABAD0A22B4C4D316F342B5FB899.
[Parsed_subtitles_0 @ 0x1038f20] Error applying options to the filter.
[AVFilterGraph @ 0xfaaf60] Error initializing filter 'subtitles' with args 'http\://192.168.1.4:9981/stream/channelid/856077443?ticket=540D5DF0092C4ABAD0A22B4C4D316F342B5FB899:si=0'
Error opening filters!
htpc@htpc-kodi:/var/lib/emby-server/logs$ uname -a
Linux htpc-kodi 4.4.13-040413-generic #201606072354 SMP Wed Jun 8 03:56:47 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
htpc@htpc-kodi:/var/lib/emby-server/logs$ tvheadend -v
tvheadend: version 4.1-2355~g1dd2652
htpc@htpc-kodi:/var/lib/emby-server/logs$ ffmpeg -version
ffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil      54. 31.100 / 54. 31.100
libavcodec     56. 60.100 / 56. 60.100
libavformat    56. 40.101 / 56. 40.101
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 40.101 /  5. 40.101
libavresample   2.  1.  0 /  2.  1.  0
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.101 /  1.  2.101
libpostproc    53.  3.100 / 53.  3.100

Also notice that FFMPEG version is set to "Use a custom version" under Transcoder tab.  However if I set to "Use System installed version" and save. It reverts back when I restart emby-server.

Any ideas?

Edited by eeidman
Link to comment
Share on other sites

 

@eeidman, it's due to the extra colon : in the tvheadend url. i believe i have this resolved for the next release of emby server. thanks.

 

Wow, that was quick.  Thanks for the fast response.   

Is there any workaround while waiting for next release?

Link to comment
Share on other sites

 

 

You can disable subtitles for your emby user by clicking your user icon in the top right and configuring playback settings.

 

That worked when accessing through a web browser. Not too sure if it was working through the Emby android app. Didn't have enough time to debug last night. But I'm back up and running which is the main thing.

Thanks for your help with this.

Link to comment
Share on other sites

  • 1 month later...

It works Arthur!  

 

Hardware and Software:

  • Emby Server 3.1.5 on a Dell PE2900 with Ubuntu 16.04.1
  • HDHR3-US w' latest firmware
  • Schedules Direct
  • TVHeadEnd 4.09-16

Weirdness:

  • I had issues getting the guide to work. I had channels as soon as I got TVHeadEnd working,  and set up the plugin, but no guide.
  • The last thing that I tried before it started working was to install the tuner and guide info into Emby-Server in addition to the already-configured plugin.
  • Everything started working at that point.
  • I removed the plugin and restarted Emby-Server.  Channels and guide in LiveTV still worked.
  • I stopped TVHeadEnd, restarted Emby-Server and no schedules or channels in LiveTV.
  • Restarted both (still no plugin) and voila! Channels and Schedules reappeared.

I'm not clear what's going on but it's working. Can anyone enlighten me?  I'd like to write this up as a how-to.

 

Thanks!

Jerry

echo4golf

Edited by echo4golf
Link to comment
Share on other sites

Hey guys,

If someone wouldn't mind could they give a quick write up on how to configure the tvheadend plugin?

I have setup tvheadend which is confirmed working in combination with oscam. Now I'm having trouble connecting tvheadend to emby.

 

Greetings gl3nn

Link to comment
Share on other sites

@@Luke & @@echo4golf

 

Yes I have setup TVheadend and confirmed working.

After that I installed the tvhclient plugin and restarted the server.

After that I configured the plugin with port 9981 and 9982 which are also the ports for the tvheadend server.

But after that I cant get it to be working in conjuction with live tv.

 

Greetings gl3nn

 

Edit:with configured the plugin I mean I went into the app settings and put the settings there.

 

Edit2: god ******. I run Emby in a docker on Unraid. When i restarted the docker from the interface it magically worked. Now my problem is that the streams won't play. Maybe if i give it some time it will start working but at the moment I see a tuner getting set to the channel but no image and only a loading image in Emby. Both on the Web and emby theater

 

Edit3: ***** my father had pulled the smart card out of the reader too watch tv and didn't tell me.... that explains alot

Edited by gl3nn
Link to comment
Share on other sites

You might want to check that your channels (Configuration>Channels/EPG) in TVHeadEnd are set up with tags. The tags must be either SDTV, HDTV, or Radio in order to be picked up by the plugin.

Link to comment
Share on other sites

chattojimnow

Ok i hope this hasnt been addressed but ive worked out on synology how to have tvheadend show the icon (picon) for the tv chanel but when i go into emby everything works exept for the icon.... am i missing something. Or is it just not supported yet?

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

my emby log is full (really full!) of entries from tvhclient with entries like this:

2017-04-06 00:39:04.2832 Info App: [TVHclient] GetEventsResponseHandler.handleResponse: start value of event larger query stop value - skipping! 
Query start UTC dateTime: 4/5/2017 9:39:01 PM
Query end UTC dateTime:   4/12/2017 9:39:01 PM
Event start UTC dateTime: 4/27/2017 9:10:00 AM

HTSMessage:
  <dump>
    eventId : 454399
    channelId : 2125087850
    start : 1493284200
    stop : 1493286900
    title : Karussell des Lebens
    subtitle : Die Streuobstwiese
    description : Die Streuobstwiese
    episodeId : 454400
    nextEventId : 454401
  </dump>

Is this something I need to worry about or a bug in tvhclient?

Edited by jlp2097
Link to comment
Share on other sites

In the case you added it is "normal".

Emby asks the plugin to gic the EPG data for one week

Query start UTC dateTime: 4/5/2017 9:39:01 PM
Query end UTC dateTime:   4/12/2017 9:39:01 PM

The tvheadend server delivers always all EPG data he have. Therefor the plugin filters the entries and log which entry will be not delivered to emby

Event start UTC dateTime: 4/27/2017 9:10:00 AM

As far as i know you can setup the period of EPG fetching in tvhedend server. If you don't need 4 week data set the prefetch count to 8 days.

Link to comment
Share on other sites

  • 2 weeks later...

@Tolotos: is the plugin compatible with TVH 4.2.1?

 

I'm thinking about upgrading from 4.0.10 but I would prefer not to break plugin compat.

 

Any thoughts?

Link to comment
Share on other sites

Ok. I just went ahead and upgraded TVH from 4.0.10 to 4.2.1.

I'm running Emby 3.2.13.0 (latest stable).

 

So far I found no new issues. Everything seems to be working as before the TVH upgrade.

DVB TV channel (with video) will playback just fine in Firefox but DVB Radio channel (audio only) will load the playback bottom bar (as when playing music) but it will not start playback and the time will remain 00:00. This is a known issue since Emby 3.2.5 and above. :(

 

Update: just confirm that even EPG data is flowing fine from TVH to Emby.

Edited by fc7
Link to comment
Share on other sites

Hi  ,
 
I have te following problem :
 
The Cannel list is empty and Guide is empty , I can see the recorded programs but I try to play a program that i recorded i get the following
 

 

2017-04-28 09:32:50.501 htsp: 172.17.0.1 [ emby ]: Welcomed client software: TVHclient4Emby-3.2.13.0 (HTSPv20)

2017-04-28 09:32:50.504 htsp: 172.17.0.1 [ emby | TVHclient4Emby-3.2.13.0 ]: Identified as user 'emby'
2017-04-28 09:32:50.504 htsp: 172.17.0.1 [ emby | TVHclient4Emby-3.2.13.0 ]: Privileges updated
2017-04-28 09:33:55.125 http: 172.17.0.1: HTTP/1.1 GET /dvrfile/2063234672 -- 500

 

Emby version : Versie 3.2.13.0
TvH plugn : 1.0.6145.42056
Tvheadend : 4.1-2541~g41fa62d87
Link to comment
Share on other sites

Error 500 is "Internal server error". Internal means the TVHeadend server have this error.

Maybe this are access rights for the tvh (or the user tvheadend run with) user on the server. Please check the logged path: /dvrfile/20....

Edited by Tolotos
Link to comment
Share on other sites

This is the log file , ( when i paste the url in a browser i get a 500 internal server error , kodi plays the recording fine ) 

 

 

2017-04-28 11:18:07.4234 Info App: Opening recording stream from TVHclient LiveTvService, external recording Id: 2063234672

2017-04-28 11:18:07.4256 Info App: [TVHclient] Support for live TV subtitles and multiple audio tracks is enabled.
2017-04-28 11:18:07.4274 Info App: [TVHclient] Probe stream for Recording
2017-04-28 11:18:07.4274 Info App: [TVHclient] Probe URL: http://emby:password@192.168.1.200:9981/dvrfile/2063234672
2017-04-28 11:18:07.4291 Info MediaEncoder: /usr/bin/ffprobe -i "http://emby:password@192.168.1.200:9981/dvrfile/2063234672"-threads 0 -v info -print_format json -show_streams -show_format
2017-04-28 11:18:07.4717 Error MediaEncoder: Error in WaitForExit
2017-04-28 11:18:07.4717 Info MediaEncoder: Killing ffmpeg process
2017-04-28 11:18:07.4727 Error MediaEncoder: Error killing process
*** Error Report ***
Version: 3.2.13.0
Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /config -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
Operating system: Unix 4.9.19.0
64-Bit OS: True
64-Bit Process: True
Mono: 4.6.1 (Stable 4.6.1.3/abb06f1 Mon Oct  3 07:51:42 UTC 2016)
Processor count: 4
Program data path: /config
Application directory: /usr/lib/emby-server
System.InvalidOperationException: No process is associated with this object.
 at System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) [0x0001e] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) [0x00037] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.GetProcessHandle (System.Int32 access, System.Boolean throwIfExited) [0x00089] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.GetProcessHandle (System.Int32 access) [0x00000] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.Kill () [0x00002] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Kill ()
 at Emby.Common.Implementations.Diagnostics.CommonProcess.Kill () [0x00000] in <03972079d9624fd9b6aafe44e9dc95af>:0 
 at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StopProcess (MediaBrowser.MediaEncoding.Encoder.MediaEncoder+ProcessWrapper process, System.Int32 waitTimeMs) [0x00051] in <1b7193002c1d4003ba671ee3969524b4>:0 
System.InvalidOperationException
 at System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) [0x0001e] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) [0x00037] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.GetProcessHandle (System.Int32 access, System.Boolean throwIfExited) [0x00089] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.GetProcessHandle (System.Int32 access) [0x00000] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at System.Diagnostics.Process.Kill () [0x00002] in <6c7c03f48a9747c8a644da4f63a34480>:0 
 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Kill ()
 at Emby.Common.Implementations.Diagnostics.CommonProcess.Kill () [0x00000] in <03972079d9624fd9b6aafe44e9dc95af>:0 
 at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StopProcess (MediaBrowser.MediaEncoding.Encoder.MediaEncoder+ProcessWrapper process, System.Int32 waitTimeMs) [0x00051] in <1b7193002c1d4003ba671ee3969524b4>:0

post-209283-0-52781200-1493373533_thumb.png

post-209283-0-25205000-1493373538_thumb.png

Edited by jteeuw
Link to comment
Share on other sites

  • 1 month later...
himisk71

When i add a channel as favorite, you didnt see this channel on the favorite site. Is this something not implemented yet or have i something wrong?

Link to comment
Share on other sites

When i add a channel as favorite, you didnt see this channel on the favorite site. Is this something not implemented yet or have i something wrong?

 Favorites are handled in Emby not in the plugin. I have the same behavior. @@Luke are TV channels supported as Favorites?

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