Run AceStream under OpenELEC on Raspberry Pi 2 (UPD. with 3.1.6 engine)

I have Raspberry Pi 2 with OpenELEC on it. Yesterday i’ve tried to watch torrent-tv on it without success, AceStreams developers ports it only to windows, linux and android-arm. Not only Torrent-tv requires AceStream, but many of p2p kodi streaming addons and they can’t be used without it.

This is how i run AceStream standalone on my Raspberry Pi 2.
This method also works on Raspberry Pi 3!

There is nasty bug in startup script right now. Please delete or comment excess line in start_acestream.sh like this:

$PERMISSION mount -o bind /dev $ACEADDON/$ACECHROOT/dev
# $PERMISSION mount –bind /dev $ACEADDON/$ACECHROOT/dev

This guide has been updated at 28th November with newer start/stop scripts, with small note to store cache on external drive and 3.1.6 engine!

1. Download acestream-rpi2_v2.zip from here (this archive contains newer engine and scripts) and upload it to your rpi device manually or with scp like this

scp acestream-rpi2_v2.zip root@rpi_ip_address:/storage/

2. Login to rpi via ssh

ssh root@rpi_ip_address

3. Extract engine and cleanup

cd /storage
mkdir .acestream
mv acestream-rpi2_v2.zip .acestream/
cd .acestream
unzip acestream-rpi2_v2.zip
rm acestream-rpi2_v2.zip

4. Fix permission for successful chrooting

chmod +x androidfs/system/data/data/org.acestream.engine/files/python/bin/*
chmod +x androidfs/system/bin/*

5.a. Now add AceStream to autostart.sh

nano /storage/.config/autostart.sh

And add this text and save:

#!/bin/sh
(
/storage/.config/.acestream/start_acestream.sh --client-console --live-cache-type disk --live-buffer 60
)&

5.b. Also we must add graceful shutdown to this file:

nano /storage/.config/shutdown.sh

Add this text and save:

#!/bin/sh
(
/storage/.acestream/stop_acestream.sh
)&

6. Check permissions for start/stop scripts:

chmod +x /storage/.config/autostart.sh
chmod +x /storage/.config/shutdown.sh
chmod +x /storage/.acestream/start_acestream.sh
chmod +x /storage/.acestream/stop_acestream.sh

7. Restart and test.

8. How to move cache to external drive:
Because this approach uses chroot, you can’t use any directory above chroot directory by the design. You have to create soft-link and point acestream to this folder OR run everything directly from external drive. Hard-link can’t be used across different devices also by the design.

My suggestion is to use mount/bind:

mkdir -p /storage/.acestream/androidfs/var/media/storage/.acestream_cache
mount --bind /var/media/storage/.acestream_cache /storage/.acestream/androidfs/var/media/storage/.acestream_cache

Where /var/media/storage/.acestream_cache is the path on your external drive.

And finally, you must edit acestreams pickle configuration file (will be created after first launch).

nano androidfs/system/data/data/org.acestream.engine/files/.ACEStream/playerconf.pickle

Replace everything with:

(dp0
S'total_max_upload_rate'
p1
I0
sS'download_dir'
p2
V/var/media/storage/.acestream_cache
p3
sS'total_max_download_rate'
p4
I0
sS'disk_cache_limit'
p5
L32212254720L
sS'ad_storage_limit'
p6
L536870912L
sS'max_peers'
p7
I50
s.

This changes from step 8 are incorporated into newer start/stop scripts, except pickle file. Just fill HDDPATH variable with yours values (in start and stop scripts). But anyway you MUST fix pickle config-file. Or grab it here.

Feel free to ask questions in comments.

Run AceStream under OpenELEC on Raspberry Pi 2 (UPD. with 3.1.6 engine)

80 thoughts on “Run AceStream under OpenELEC on Raspberry Pi 2 (UPD. with 3.1.6 engine)

  1. buri tv says:

    s there any way to use any ace link from shell and broadcast to any ports. I am asking this because I am using libreelec on intelnuc and I have got a Raspi 2 wit Rasbian.

    Like

Leave a comment