Zattoo input stream

Zattoo is a very successfull European service provider for TV streaming. They offer a free and paid subscription. Lots of people use this in combination with chromecast as a replacement for cable, satelite or provider attached iptv solution.

If anyone is interested in an integration into PLEX there might be a solution now.

Fantastic commandline master sunsettrack4 has published a bash(!) script that extracts everything from Zattoo to pipe it into tvheadend. I installed it and it works like a charm.

The script is hosted on github: https://github.com/sunsettrack4/zattoo_tvh
It was announced in the german kodinerds.net forum in Feb 2018: https://www.kodinerds.net/index.php/Thread/60875-Skript-für-Zattoo-Live-TV-und-EPG-mit-tvHeadend-BETA-v0-4-2-2018-05-13/?pageNo=1

I am thinking that with tvhproxy https://github.com/jkaberg/tvhProxy it should be possible to make Plex see tvheadend and I would be really curious if someone got this up and running. If you do, please post here. For the european community this is quite a big thing.

With that said… is anyone up for adding a native Zattoo plugin for Plex?

Would be interesting if Pelx can hanlde such special m3u files directly (generate the streamlink on tuning). then you do not need this big chain of plex -> tvhproxy -> tvheadend -> zattoo. If yes, then put this stuff on a local webserver with a few json files (simulate hdhomerun).

Hi @efnats, thx for the hint of the bash script from Jan-Luca (sunsettrack4).

Zattoo streams through Plex are working !

I can confirm that his script is working nicely on my Synology DS918+. I just needed to adapt a few lines in order to fit the script to the environment. My Syno is running on the latest firmware (DSM 6.2.1-23824 Update 6).

The reason why I implemented the solution is to be independent of the availability of Zattoo clients (some of my TV´s are not supported, but they have Plex) and also to use the streams abroad on holiday/business trips. Recording via TVHeadend is possible.

I know that Plugins are no more supported by Plex, but they are still there and can be used. No deadline is given by Plex.

I can just line out a few suggestions for the use on Synology NAS servers:

  • Prerequisite is to have Entware installed in order to add additional packages needed by the script from sunsettrack4. (see README.md). Commands ascii2uni, phantomjs, uni2ascii and xmllint weren´t available via opkg, I downloaded them elsewhere by searching with Google for Intel 64bit. (https://global.discourse-cdn.com/plex/original/3X/9/8/98ea505b30be14a1896f90a736bc06ccfe27d63c.zip). Place them in /opt/bin and give execution rigths.

  • Tvheadend server package should be installed. You can grab it from the Syno community library via the source: http://packages.synocommunity.com .

  • Tvheadend Plex client can be found on : https://github.com/taligentx/LiveTVH.bundle . Please move the bundle as usual to the Plugin folder of Plex. You must specify the address of your tvheadend server: http://<server-ip>:9981

  • I created a new dedicated user. Download the files from sunsettrack4 and place them under a ztvh folder in the home folder of the new user. User should be assigned to group “users” and “administrators”.

  • I adapted the ztvh.sh script by removing the check of the internet connectivity (delete if/then/else/fi and the “ping” command, just leave the curl command in (no root users on Synology aren´t allowed to use protocol ICMP).

  • Check if SSL connectivity is OK with: openssl s_client -connect zattoo.com:443 (Result: "Verify return code: 0 (ok) “). In case you get errors probably the /opt/etc/ssl/certs folder is empty (check “openssl version -d”). On Synology you can remove the folder /opt/etc/ssl and instead create a symbol link with “ln -s /etc/ssl /opt/etc/ssl”

  • Go through the very good step by step guide in README.md and if all works fine think of donating sunsetrack4.

  • You can later organize the daily download of the EPG and the refresh of the channel list using the task scheduler of Synology (DSM)

  • Use tv_grab_file as internal EPG grabber within TVheadend. You can copy the script to the tvzh folder or to /usr/bin. In case it is in the home folder, you need at least to add the following sym link: “ln -s /volume1/homes/<USER>/ztvh/tv_grab_file /usr/bin/tv_grab_file” . Restart the tvheadend server. Now you will find the grabber module within the TVheadend server config.

  • Modify the tv_grab_file Script as follows (asuming that you download the extended EPG file with the ztvh.sh script):

    if (( $# < 1 ))
    then
    #cat ~/.xmltv/tv_grab_file.xmltv
    cat /volume1/homes/<USER>/ztvh/zattoo_ext_fullepg.xml
    exit 0
    fi

Before trying with Plex I tested the connectivity of the Tvheadend server with Zattoo on the very good TVHClient App (Android).

Some Unix skills would be appropriate for this topic. If someone is interested I can share more details…

hi @osca,

can you record TV-Shows as well? How did you paste the commands? By terminal/cmd or is there another way?

I’m using TVH with Zattoo Script on a Raspberry and would prefer to run it on my Synology as well.

Greetings…

Hi, yes of course. That’s also an added value. Adding content for recording works via the web page of the TVheadend server or via dedicated mobile apps. The Plex plugin allows just to playback the content.

As already mentioned, you need to have Entware installed. Usually this requires also root access to your Syno via SSH. There are many guides on internet for both topics. As this is a Plex forum, it’s not the right place to go into details of DSM, but as for version 6 it’s a bit tricky, do the following steps for the root access:

  • enable SSH in DSM configuration.
  • connect via putty /ssh
  • type: sudo -i
  • This will prompt you for a password
  • use your admin password
  • now you’ll be SSH in as Root
  • type this, it will set the password of your choosing to the root account:

synouser --setpw root [PASSWORD]

and assure that in /etc/ssh/sshd_config :

 PermitRootLogin yes 

is active

Brgds