FreeBSD: virtualized acestream


Linux binary sopcast runs smoothly in FreeBSD but nowadays acestream transmissions are much more common. And there’s no binary acestream for FreeBSD. I have been unsuccessful in trying to run linux binary acestream in FreeBSD. The only way to get it running was with a virtualized (VirtualBox) linux running the acestream engine, the ValdikSS aceproxy running in FreeBSD and VLC for watching.

Steps:

acestream in a virtualized linux

With VirtualBox install a linux able to run acestream. My choice was Debian 8 Jessie i386.In order to be able to talk with the acestreamengine from FreeBSD Host the virtual machine run in Host-Only Adapter mode. Check my previous post https://nixbsd.wordpress.com/2016/09/03/freebsd-pf-and-nat-for-internal-network/.

The virtual machine has the address 192.168.56.101. The FreeBSD host has the address 192.168.56.1

After this install acestream engine from:

http://wiki.acestream.org/wiki/index.php/AceStream_3.0/en

In a terminal launch acestream with:

acestreamengine --client-console --bind-all

‘–bind-all’ parameter permit to the acestreamengine accept connections not only from 127.0.0.1. It’s needed in order to get the ValdikSS aceproxy working.

redirect port 8621 to the linux virtual machine

acestreamengine use by default the 8621 port to communicate with internet. So this port has to be redirected. In my pf.conf:

rdr pass on wlan0 inet proto udp from any to any port = 8621 -> 192.168.56.101
rdr pass on wlan0 inet proto tcp from any to any port = 8621 -> 192.168.56.101
rdr pass on em0 inet proto udp from any to any port = 8621 -> 192.168.56.101
rdr pass on em0 inet proto tcp from any to any port = 8621 -> 192.168.56.101

 

There are duplicated rules to cover when my computer is working with wifi and cable. 192.168.56.101, as I said before, is the linux guest running acestreamengine.

ValdikSS aceproxy in the FreeBSD Host

Get the software:

git clone https://github.com/ValdikSS/aceproxy.git

Follow the instructions at https://github.com/ValdikSS/aceproxy/wiki/Installation-and-configuration-(Linux)

Modify aceconfig.py to configure the acestreamengine address and to permit connections from the network 192.168.56.0/24:

acehost = '192.168.56.101'

. . .

firewallnetranges = (
'127.0.0.1',
'192.168.0.0/16',
'192.168.56.0/24',
)

Next you’ll need:

  • in a terminal launch:

vlc -I telnet --telnet-password admin

  • in another terminal:

python acehttp.py

It only rests test the configuration. Open a VLC instance pointing to:

http://127.0.0.1:8000/pid/CID/stream.mp4

where CID is the 40-digit Ace Stream ID.

 

KODI and Plexus

The other way to watch Ace Streams is with KODI and the plexus plugin (maybe P2Pstreams too). After install kodi and plexus (find the internet to know how) configure plexus with acestream in mode server remote engine and the AceStream engine IP address 192.168.56.101.

In my Thinkpad T420s watching a stream in HD VirtualBox consumes about 45% CPU in one core and VLC about 15%-20% in another one. The temperature is about 60-66ºC. It’s pretty acceptable.

 

 

 

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in FreeBSD, Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s