An Ace Stream server Docker image & Python3 client to stream.
What this provides:
- Dockerized Ace Stream server (version
3.1.35
) running under Ubuntu 18.04. - Bash script to start server and present HTTP API endpoint to host.
- Python playback script
playstream.py
instructing server to:- Commence streaming of a given content ID.
- ...and optionally start a compatible media player (such as iina(OS X only)) to view stream.
Since a single HTTP endpoint exposed from the Docker container controls the server and provides the output stream, this provides one of the easier methods for playback of Ace Streams on traditionally unsupported operating systems such as OS X.
To build Docker image:
$ ./build.sh
Start the server via:
$ ./run.sh
Server will now be available from http://127.0.0.1:6878
:
$ curl http://127.0.0.1:6878/webui/api/service?method=get_version&format=jsonp&callback=
# {"result": {"code": 3013500, "platform": "linux", "version": "3.1.35"}, "error": null}
A program ID can be started with playstream.py
:
$ ./playstream.py --help
usage: playstream.py [-h] --content-id HASH [--player PLAYER]
[--server HOSTNAME] [--port PORT] [--multi-players] [-d]
Instructs server to commence a given content ID. Will execute a local media
player once playback has started.
optional arguments:
-h, --help show this help message and exit
--content-id HASH content ID to stream
--player PLAYER media player to execute once stream active
--server HOSTNAME server hostname, defaults to 127.0.0.1
--port PORT server HTTP API port, defaults to 6878
--multi-players play stream in multiple players mode, defaults to False
-d, --debug run client in debug mode
For example, to stream CONTENT_ID
and send playback to iina
when ready:
$ ./playstream.py \
--content-id CONTENT_ID \
--player /usr/bin/vlc \
INFO 2019-05-12 18:45:52,190 playstream.py 47 Client starts.
INFO 2019-05-12 18:45:52,202 playstream.py 91 acestream engine version: 3.1.35
INFO 2019-05-12 18:45:52,202 playstream.py 93 acestream engine version code: 3013500
INFO 2019-05-12 18:45:52,202 playstream.py 188 Acestream server is available
Status: | Peers: 0 | Down: 0KB/s | Up: 0KB/s
Status: prebuf | Peers: 0 | Down: 0KB/s | Up: 0KB/s
Status: prebuf | Peers: 4 | Down: 24KB/s | Up: 0KB/s
Status: prebuf | Peers: 4 | Down: 540KB/s | Up: 0KB/s
Status: dl | Peers: 4 | Down: 887KB/s | Up: 0KB/s
Status: dl | Peers: 4 | Down: 957KB/s | Up: 0KB/s
Status: dl | Peers: 4 | Down: 887KB/s | Up: 0KB/s
Status: dl | Peers: 4 | Down: 870KB/s | Up: 1KB/s
Status: dl | Peers: 4 | Down: 828KB/s | Up: 2KB/s
INFO 2019-05-10 19:31:23,590 playstream3.py 57 Client exit.
Send Ctrl + C to exit.
- Ace Stream Wiki (English).
- Binary downloads: http://wiki.acestream.org/wiki/index.php/Download.
- Ubuntu install notes: http://wiki.acestream.org/wiki/index.php/Install_Ubuntu.
- HTTP API usage: http://wiki.acestream.org/wiki/index.php/Engine_HTTP_API.
playstream.py
routines inspired by: https://github.com/magnetikonline/docker-acestream-server.