📜 ⬆️ ⬇️

Television via Acestream on Raspberry PI. Now in docker containers

On Habré, AceStream was repeatedly mentioned: a technology that provides the user access to video streams using the AceStream private P2P protocol, the so-called. torrent tv. AceStream provides access to a distributed content delivery network, i.e. watching the channel, the user transmits data to other users, which allows to drastically reduce the cost of services.


And now the good news for owners of a raspberry-based media player (OSMC, LibreELEC): found acestream under the arm , which allowed it to be installed directly on raspberry pi. This article offers installation instructions for acestream, and everything you need to watch TV in docker containers under raspberry. At the time of this writing, the proposed solution allows you to watch a large number of TV channels for free, but without guarantees: acestream may cease to be free at any time.


kodi live tv channels list screenshot


1. Installing docker on raspbian / osmc


For docker, there is a native installation script: https://get.docker.com/ . Of course, it was created for the curl-pipe-bash hipster method and I will not advise it to you :) In addition, at the time of this writing, it was a bit broken and did not work on RPi. Therefore, you need to run several commands as root:


apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D mkdir -p /etc/apt/sources.list.d echo deb \[arch=armhf\] http://apt.dockerproject.org/repo raspbian-jessie main > /etc/apt/sources.list.d/docker.list sleep 3; apt-get update; apt-get install -y -q docker-engine 

Thus, we added a new repository to the system, keys for it, and installed the docker-engine package. Now, to start the docker of the daemon, you can use the systemctl start docker


2. Installing acestream


To install acestream, simply put the service file in the / etc / systemd / system directory and run it using systemd, for example:


 curl -sSL https://raw.githubusercontent.com/aaaler/acestreamproxyvlc-pi/master/acestream.service > /etc/systemd/system/acestream.service systemctl daemon-reload systemctl enable acestream systemctl start acestream 

If the required docker image is not found when launching, the docker will download it himself. therefore, the first launch of the service will take considerable time. If you want to see the download progress, you can download the image in advance with the docker pull aaaler/acestream-pi .


AceStream is now running and responding on port 62062 . This is enough, for example, to run add-ons to Kodi such as torrent-tv, lostfilm, and other applications that use acestream directly. However, you can go further, and set up in Live TV in Kodi. To do this, you need to raise a couple more containers.


3. Install aceproxy


For Live TV to work, you need to transfer Kodi the list of channels as a playlist, and for this ValdikSS wrote a special proxy. He listens to requests via HTTP and sends them to AceStream, and the video stream coming from AceStream distributes via VLC. Since The author's repository has not been updated for a long time, this fork was chosen to build the image.


First you need to expand the configs:


 mkdir /etc/aceproxy/ curl -sSl https://raw.githubusercontent.com/aaaler/acestreamproxyvlc-pi/master/etc/torrenttv.py > /etc/aceproxy/torrenttv.py curl -sSl https://raw.githubusercontent.com/aaaler/acestreamproxyvlc-pi/master/etc/p2pproxy.py > /etc/aceproxy/p2pproxy.py 

If you have a vip account on torrent-tv - write the link to the AceStream playlist (from your personal account) in the file /etc/aceproxy/torrenttv.py. It is not necessary to use torrent-tv, there are other sources that do not require registration.


In addition, it is possible to configure the p2pproxy plugin to view channels via DNLA.
Now, download the service file and launch the containers using systemd:


 curl -sSL https://raw.githubusercontent.com/aaaler/acestreamproxyvlc-pi/master/aceproxy.service > /etc/systemd/system/aceproxy.service curl -sSL https://raw.githubusercontent.com/aaaler/acestreamproxyvlc-pi/master/vlc-nox.service > /etc/systemd/system/vlc-nox.service systemctl daemon-reload systemctl enable aceproxy systemctl start aceproxy 

When running aceproxy, all necessary components will be launched automatically. Now usual m3u playlists of the corresponding plug-ins are available for download:


playlist urlservice
http://127.0.0.1:8000/torrenttv/playlist.m3utorrent-tv.ru
http://127.0.0.1:8000/torrent-teliktorrent-telik.ru
http://127.0.0.1:8000/allfonallfon.org

You can read more about using aceproxy at ValdikSS on the Wiki.


4. Configure the KODI Player


All of the above is used by me to watch TV in a KODI player. It has the Live TV show function, it is included in SYSTEMSettingsTVGeneral .


kodi settings enable live tv screenshot


After that, Kodi will inform you that you need to enable PVR addon, and will show their list. (If this does not happen, the PVR addons list can be found in SYSTEMAdd-onsMy add-ons ). Select PVR IPTV Simple Client , enable it (enable), and select the selected plugin in the playlist url settings.


kodi settings live tv playlist screenshot


In the EPG Settings section, you can specify a link to the program guide - epg. I used http://api.torrent-tv.ru/ttv.xmltv.xml.gz


In addition, switching channels in acestream can take considerable time, so I recommend to increase the timeout for switching channels in the expert mode settings SYSTEMSettingsTV


kodi settings timeout channel switch screenshot


After confirming the options, it is recommended to restart kodi. The next time you start, the channels should load and the TV section will appear in the main menu.


kodi settings live tv playlist screenshot


UPD 12/30/2016: If there is a desire to participate in testing updates - they are published in containers with the tag :newest . For example, the aaaler/acestream-pi:newest image now corresponds to version 3.1.14. After some testing, the containers with the tag :latest will be updated.


')

Source: https://habr.com/ru/post/316208/


All Articles