Jump to content

Tvheadend plugin for Emby - Beta 1


Tolotos

Recommended Posts

dcrdev

Due to an issue I've had to rebuild my server, which has meant re configuring Emby. I've got tvheadend up and running and Kodi is connecting to it fine and pulling through the channel icons.

 

However this addon doesn't wan't to pull through any channel icons, in the log there are loads of entries like this:

2016-09-02 21:56:49.6025 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
2016-09-02 21:56:49.6054 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 25871743
2016-09-02 21:56:49.6054 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelIcon: imagecache/231
2016-09-02 21:56:49.6054 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() WebRequest: http://127.0.0.1:9981/imagecache/231
2016-09-02 21:56:49.6091 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
2016-09-02 21:56:49.6103 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 35899640
2016-09-02 21:56:49.6103 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelIcon: imagecache/284
2016-09-02 21:56:49.6103 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() WebRequest: http://127.0.0.1:9981/imagecache/284
2016-09-02 21:56:49.6154 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
2016-09-02 21:56:49.6164 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 102213476

I have libgdiplus installed on my system - and libgdiplus.so is under /lib64. I turned on debug logging but it doesn't elaborate any more than the above.

 

Can someone help?

 

Link to comment
Share on other sites

dcrdev

Due to an issue I've had to rebuild my server, which has meant re configuring Emby. I've got tvheadend up and running and Kodi is connecting to it fine and pulling through the channel icons.

 

However this addon doesn't wan't to pull through any channel icons, in the log there are loads of entries like this:

2016-09-02 21:56:49.6025 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
2016-09-02 21:56:49.6054 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 25871743
2016-09-02 21:56:49.6054 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelIcon: imagecache/231
2016-09-02 21:56:49.6054 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() WebRequest: http://127.0.0.1:9981/imagecache/231
2016-09-02 21:56:49.6091 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
2016-09-02 21:56:49.6103 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 35899640
2016-09-02 21:56:49.6103 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelIcon: imagecache/284
2016-09-02 21:56:49.6103 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() WebRequest: http://127.0.0.1:9981/imagecache/284
2016-09-02 21:56:49.6154 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
2016-09-02 21:56:49.6164 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 102213476

I have libgdiplus installed on my system - and libgdiplus.so is under /lib64. I turned on debug logging but it doesn't elaborate any more than the above.

 

Can someone help?

 

Found the issue mono is looking for libgdiplus in the wrong place, so:

 

ln -s /usr/lib/libgdiplus.so /usr/local/lib/libgdiplus.so

 

Strange I didn't have the issue before I rebuilt the server, all working now though.

Link to comment
Share on other sites

Hi!

Love the plugin, but I got some issue..

I guess someone else have the same issue.

 

I dont get any channels up or epg guide, but I only get recordings.

 

Whats wrong? :)

Link to comment
Share on other sites

Tolotos

@@Luke I added this as i don't know the image type. If it is possible to leave the txpe empty Ithe convert can be removed.

 

 

 

Gesendet von iPhone mit Tapatalk

Link to comment
Share on other sites

Hi Tolotos.

 

I found what is the problem with channel icons for me.

My icons are served from external server (dropbox... for now), but the emby tvh plugin seems to assume the icons will be served from the tvh server.

Hence it treats the URL served from tvh as a URI and concatenates the tvh server IP.

 

e.g:

http://192.168.1.5:9981/https://dl.dropboxusercontent.com/u/4727830/channelicons/film4plus1.png

more from the logs:

2016-09-04 05:18:04.5858 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 1017449986
2016-09-04 05:18:04.5858 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelIcon: https://dl.dropboxusercontent.com/u/4727830/channelicons/film4plus1.png
2016-09-04 05:18:04.5858 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() WebRequest: http://192.168.1.5:9981/https://dl.dropboxusercontent.com/u/4727830/channelicons/film4plus1.png
2016-09-04 05:18:04.5890 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The remote server returned an error: (404) Not Found.
2016-09-04 05:18:04.5898 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelId: 1150963642
2016-09-04 05:18:04.5898 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() channelIcon: https://dl.dropboxusercontent.com/u/4727830/channelicons/film4.png
2016-09-04 05:18:04.5898 Info App: [TVHclient] HTSConnectionHandler.GetChannelImage() WebRequest: http://192.168.1.5:9981/https://dl.dropboxusercontent.com/u/4727830/channelicons/film4.png
2016-09-04 05:18:04.5922 Error App: [TVHclient] HTSConnectionHandler.GetChannelImage() caught exception: The remote server returned an error: (404) Not Found.

Is there any way to tell the plugin to use the URL served from TVH as is?

 

 

cheers!

Edited by hijinx
Link to comment
Share on other sites

Ok, I'll change it when I'm at home in a few days.

 

 

 

Gesendet von iPhone mit Tapatalk

 

What you can do is try to determine the format from the extension in the image URL. If there is no extension then just hardcode it to jpg.

Link to comment
Share on other sites

@@Luke

@@hijinx

@@dcrdev

A new version (1.0.6097.29930) is in the catalog which handles the URL issue and the GDI usage. If the icon name contains a image type as suffix (e.g. .jpg or .png) the image stream from TVH is used direct.

If no suffix is available GDI is used to create PNG as before. If the TVH feature of picons is used the image url looks like "imagecache/7826" which makes it not possible to check the image type.

In my configuration PNG files are delivered - hard coding to format XY is not what I want to add. If there is no GDI available on the server please use image URL's with correct suffixes (no picons).

Edited by Tolotos
Link to comment
Share on other sites

Hi

Yesterday i update emby to version 3.0.7100.0. Since this time the plugin of TvHeadEnd doesn't work. the plugin is loading all time, but the tvheadend are running without problems.

I don't know problem. Can you help me?

Thanks

Link to comment
Share on other sites

Hi

 

Yesterday i update emby to version 3.0.7100.0. Since this time the plugin of TvHeadEnd doesn't work. the plugin is loading all time, but the tvheadend are running without problems.

 

I don't know problem. Can you help me?

 

Thanks

 

Hi there, welcome. Sorry to hear about this. Can you please describe the problem in a little more detail? Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
Hello

 

first congratulate you on the operation of the entire system.

I have little time using it and I'm delighted.

My little problem is with channel logos. Recently in my country "Spain" have been updated logos of many channels in my tvheadend I see the new logos but Emby still see the old.

Might you help me?

 

thank you very much

Link to comment
Share on other sites

You must delete the icons from emby cache manually.

I think the path on my windows system is like <userHome>\AppData\Roaming\cache\tv???

 

Stop emby, deleted the TV cache folder and restart emby. After some time the new icons are reloaded from tvheadend and displayed.

 

-- Tolotos

Link to comment
Share on other sites

You must delete the icons from emby cache manually.

I think the path on my windows system is like <userHome>\AppData\Roaming\cache\tv???

 

Stop emby, deleted the TV cache folder and restart emby. After some time the new icons are reloaded from tvheadend and displayed.

 

-- Tolotos

 

He probably needs to clear the icon cache in Tvheadend too.

Link to comment
Share on other sites

You must delete the icons from emby cache manually.

I think the path on my windows system is like <userHome>\AppData\Roaming\cache\tv???

 

Stop emby, deleted the TV cache folder and restart emby. After some time the new icons are reloaded from tvheadend and displayed.

 

-- Tolotos

 

Hello, installation is made under ubuntu, which would be the route to clear cache?

thanks

Edited by saed
Link to comment
Share on other sites

Try a search in

- /var/lib/emby/cache 

- /var/lib/emby-server/cache

- /var/lib/media-browser/cache

I think one of these path are correct. I have currently only my Windows server available.

Link to comment
Share on other sites

Try a search in

- /var/lib/emby/cache 

- /var/lib/emby-server/cache

- /var/lib/media-browser/cache

I think one of these path are correct. I have currently only my Windows server available.

 

 

thank you very much

 

solved.

 

the route: /var/lib/emby-server/cache

Edited by saed
Link to comment
Share on other sites

Rhy_Llew

Could it be possible to include an option for the TVHeadend webroot in the plugin? For example I have my tvheadend server displayed at <server_ip>:9981/tvheadend for reverse proxy reasons, however I cannot seem to set this path in the plugin. The plugin does not work until the webroot is removed (which I need active for the reverse proxy).

 

Thanks

Link to comment
Share on other sites

Tolotos

Could it be possible to include an option for the TVHeadend webroot in the plugin? For example I have my tvheadend server displayed at <server_ip>:9981/tvheadend for reverse proxy reasons, however I cannot seem to set this path in the plugin. The plugin does not work until the webroot is removed (which I need active for the reverse proxy).

 

Thanks

 

Please try the attached version and report.

TVHeadEnd.zip

Link to comment
Share on other sites

Hi.

 

since upgrade to the latest version of Emby, I can not see the channels through tvheadend.

 

I get the following error

 

"There was an error playing the video.

Please Ensure there is an open tuner availalble. "

 

any ideas?

It seems to be some authorizations?

 

Deputy log.

 

 

 

 

 



 

{"Protocol":"Http","Id":"18","Path":"http://192.168.22.140:9981//stream/channelid/1912827356?ticket=A4E21793B1109BA5D2F98973ECF1D2A684C672FE","Type":"Default","ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":false,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":true,"LiveStreamId":"1a755974de5dc3461dc6ecae8ddec68b_41c95b6de5174f82acbc56fe82d0a2f8_18","MediaStreams":[{"NalLengthSize":"0","IsInterlaced":true,"BitRate":8000000,"IsDefault":false,"IsForced":false,"Type":"Video","Index":-1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false},{"DisplayTitle":"","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Audio","Index":-1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":8000000,"RequiredHttpHeaders":{}}

 

/usr/bin/ffmpeg -fflags +genpts -i "http://192.168.22.140:9981//stream/channelid/1912827356?ticket=A4E21793B1109BA5D2F98973ECF1D2A684C672FE"-sn -codec:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -vf "yadif=0:-1:0" -pix_fmt yuv420p -preset superfast -crf 23 -b:v 8000000 -maxrate 8000000 -bufsize 16000000 -vsync -1 -profile:v high -level 41 -map_metadata -1 -threads 0 -codec:a:0 libmp3lame -ac 2 -ab 192000 -af "aresample=async=1" -y "/var/lib/emby-server/transcoding-temp/7e3ff0685bcab149ad56013a93b496fe.mkv"

 

 

ffmpeg version N-79139-gde1a0d4 Copyright © 2000-2016 the FFmpeg developers

  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)

  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab

  libavutil      55. 19.100 / 55. 19.100

  libavcodec     57. 30.100 / 57. 30.100

  libavformat    57. 29.101 / 57. 29.101

  libavdevice    57.  0.101 / 57.  0.101

  libavfilter     6. 40.102 /  6. 40.102

  libavresample   3.  0.  0 /  3.  0.  0

  libswscale      4.  0.100 /  4.  0.100

  libswresample   2.  0.101 /  2.  0.101

  libpostproc    54.  0.100 / 54.  0.100

[http @ 0x3e065a0] HTTP error 401 Unauthorized



 

 

 

 

Greetings,

Link to comment
Share on other sites

Hello,

ive got a problem to playback any channel.

 

I'm using this Version of TvHeadend:

HTS Tvheadend 4.1-2249~g747ed01

 

When i try to start a channel there comes an error:

no free Tuner

 

If updated from TVH 4.09 to this newer Version.

 

Thanks for any reply.

Link to comment
Share on other sites

Tolotos

The plugin is only tested with the stable TVHeadend 4.0.9.

 

@@chvb  @@saed Can you please post the complete Emby log?

Edited by Tolotos
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...