Giter Site home page Giter Site logo

acestream-launcher's Introduction

Acestream Launcher

Acestream Launcher allows you to open Acestream links with a Media Player of your choice

Dependencies

python, pyhon-acestream, libnotify, acestream-engine

Since v1.0.0 acestream-launcher uses Acestream Engine HTTP API that is available on acestream-engine v3.1 or later.

Usage

acestream-launcher URL [--player PLAYER] [--engine ENGINE]

Positional arguments

URL                    The acestream url to play

Optional arguments

-h, --help             Show this help message and exit
-p, --player  PLAYER   The media player command to use (default: mpv)
-e, --engine  ENGINE   The engine command to use (default: acestreamengine --client-console)
-t, --timeout TIMEOUT  Time in seconds to wait for stream playback (default: 30)
-l, --hls              Get HLS stream instead of HTTP stream
-v, --verbose          Show engine and media player output in console

Configuration

Create ~/.config/acestream-launcher/config file to override the default arguments. Use tty and browser sections to set different options when executing the script from the console or the web browser.

[DEFAULT]
player = vlc
verbose = true
timeout = 60
host = 127.0.0.1
port = 6878

[tty]
engine = acestreamengine --client-console --log-file /home/jonian/.ACEStream/engine.log

[browser]
engine = acestreamengine --client-gtk --log-file /home/jonian/.ACEStream/browser.log
verbose = false

Requirements

Install required dependencies (compatible with python 2 and 3):

sudo apt-get install python python-pip

Install optional dependencies (support for desktop notifications):

sudo apt-get install libnotify

Install Acestream engine manually (you can find actual links here and detailed instructions here):

sudo apt-get install python-setuptools python-m2crypto python-apsw

wget "http://download.acestream.media/linux/acestream_3.1.49_ubuntu_18.04_x86_64.tar.gz"
tar zxvf acestream_3.1.49_ubuntu_18.04_x86_64.tar.gz
sudo mv acestream_3.1.49_ubuntu_18.04_x86_64 /opt/acestream

sudo sed -i "/ROOT=/c\ROOT=\/opt\/acestream" /opt/acestream/start-engine
sudo ln -sf /opt/acestream/start-engine /usr/bin/acestreamengine

Install Acestream engine Snap package:

sudo snap install acestreamplayer

Installation

Install the package with the Python Package Index using pip command.

pip install acestream-launcher

Packages

Arch Linux: AUR Package
OpenSUSE: Build Service by @Drommer

Browser integration

Once it is installed, you can set it as default for the acestream:// links in your browser. Check your browser preferences for default applications.

acestream-launcher's People

Contributors

demanuel avatar jonian avatar thepante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

acestream-launcher's Issues

Execution results in error: AttributeError: 'LooseVersion' object has no attribute 'version'

This is a minor issue but you may want to know that it happens.
Executing launcher while providing acestreamengine value for optional argument --engine results in exception.

Example:
acestream-launcher acestream://2aae6c35c94fcfb415dbe95f408b9ce91ee846ed --engine acestreamengine

Output:

Cannot connect to Acestream engine!

Exiting...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.9/site-packages/acestream/engine.py", line 52, in _start_process
    self.emit('started')
  File "/usr/lib/python3.9/site-packages/acestream/object.py", line 21, in emit
    event['callback_fn'](*callback_args)
  File "/usr/lib/python3.9/site-packages/acestream_launcher/stream.py", line 84, in _on_engine_started
    self._start_stream()
  File "/usr/lib/python3.9/site-packages/acestream_launcher/stream.py", line 50, in _start_stream
    self.stream.start()
  File "/usr/lib/python3.9/site-packages/acestream/stream.py", line 71, in start
    response = self.server.getstream(pid=self.pid, hls=hls, **kwparams)
  File "/usr/lib/python3.9/site-packages/acestream/server.py", line 116, in getstream
    if LooseVersion(self.version) < LooseVersion('3.1.29'):
  File "/usr/lib/python3.9/distutils/version.py", line 52, in __lt__
    c = self._cmp(other)
  File "/usr/lib/python3.9/distutils/version.py", line 339, in _cmp
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version

Tested on Manjaro distribution
acestream-launcher version 2.0.3-1
acestreamengine version version: 3.1.49 revision: dc5eac3

Thank you for your great work

Player doesn't show up

I've been trying several streams but the player window never opens and there is no output on the console. How could I debug this?

I am running Arch Linux with Linux kernel 4.18.10-arch-1-ARCH x86_64.

Can't make it work under Mint 18.3

Hi,
My Acestream installation is working fine under Mint 18.3 Mate, but I wanted to try your launcher to see the acestreams with mpv or other players. For some reason I always get that the "Stream unavailable!" error (I'm trying working streams under the normal installation).
I am in China so I am trying both with my vpn on or off.
I've also got this other error when trying to use it with my vpn on:

Stream unavailable!

Exiting...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/acestream/engine.py", line 56, in _start_process
    self.process.communicate()
AttributeError: 'NoneType' object has no attribute 'communicate'

Any ideas? Thanks

Port forwarding

Is it possible to set/change the ports acestreamengine uses?

Import Error

when I try to use it I get:

ImportError: cannot import name __m2crypto
Error authenticating to Acestream!
Media Player not running...

Don't work in GUI mode on openSUSE Tumbleweed KDE

I installed the package using the install.sh script. When starting from the console it works fine, but when you try to open a link from the browser or call the command with a link through the global search (Alt + F2), there are no notifications, you can see that acestreamengine has just started, then nothing happens.
System: openSUSE Tumbleweed KDE
AceStream Engine 3.1.16 (x64)
Browser: Firefox Nightly
Use "/opt/acestream-engine/start-engine --client-gtk" instead "acestreamengine --client-console".

P.S. Acestream Launcher is in the list of options, with which you can open links like "acestream://", after clicking on the "run" button, the launch icon appears on the taskbar for a few seconds.

acestreamengine not starting automatically

When I'm trying to launch stream with acestream-launcher i'm getting message

Stream unavailable!

Exiting...

But when I manually start acestreamengine --client-gtk or acestreamengine --client-console then acestream-launcher works

Doesn't start player if runs not in console

Engine never change self.live if stats not updated. They updated only if launcher started in tty.
When I start launcher as acestream protocol handler from browser there is no tty.
Change this to while not self.is_live: fixes issue.

acestream-launcher: command not found

I have followed all of the instructions and download the latest versions from http://wiki.acestream.org/wiki/index.php/Install_Ubuntu

I noticed there was a install.sh file that I wonder if this defined the acestream-launcher?

hutber@hutber:/opt/acestream$ ll
total 36
drwxr-xr-x 4 hutber hutber  4096 Aug 11 14:46 ./
drwxr-xr-x 9 root   root    4096 Aug 11 14:20 ../
-rw-r--r-- 1 hutber hutber   250 Jul 15 14:53 acestream.conf
-rwxr-xr-x 1 hutber hutber 10224 Jul 15 14:29 acestreamengine*
drwxr-xr-x 6 hutber hutber  4096 Jul 15 14:53 data/
drwxr-xr-x 3 hutber hutber  4096 Jul 15 14:53 lib/
-rwxr-xr-x 1 hutber hutber   105 Aug 11 14:46 start-engine*

Does this work on MacOS?

I'd appreciate a clearer installation guide. How do I install the dependencies and what commands do I type into the terminal?

Which operating systems does this run on? I assume it's just Linux, but I want to be sure, since I haven't been able to find a good acestream solution for Mac.

Acestream channel unavailable

After following the tutorial to install and run acestream-launcher I always get the title mentioned message for different acestream urls tested

Cannot connect to Acestream engine! python3.6/site-packages/acestream/engine.py

misery@srv02 ~/.local/bin $ ./acestream-launcher acestream://5d05292814f6768e6635c17475336d88d4fff9a6 --player mpv
Connecting to Acestream engine.../bin/sh: warning: shell level (1000) too high, resetting to 1
/bin/sh: warning: shell level (1000) too high, resetting to 1
Cannot connect to Acestream engine!

Exiting...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/misery/.local/lib64/python3.6/site-packages/acestream/engine.py", line 53, in _start_process
self.process.communicate()
AttributeError: 'NoneType' object has no attribute 'communicate'

No module named 'notify2'

Hi, first of all, thanks for the fantastic repository.
It used to work perfectly on my machine but now I'm getting the following error on Ubuntu 16.04:

6f9fef81f4076 Traceback (most recent call last): File "/usr/bin/acestream-launcher", line 12, in <module> import notify2 ModuleNotFoundError: No module named 'notify2'

notify2 is installed on my machine, and I have tried to remove/reinstall the repository but it didn't solve the issue.

Many thanks,

Feature request: "Don't kill acestreamengine"

As an optional argument.

Example use case: watching multiple streams. Since the first launch of the script starts the engine and when you close that stream, the engine is killed too. Sometimes you might want to close the first stream and continue watching other one(s).

passing options to engine

Hi,

I somehow doubt this is a bug (sorry if it isn't) I've been trying different ways to pass options to the engine but nothing seems to work.

$ acestream-launcher 03ce2e15acf616aaf3cb94d64460993590095b30 -e --live-cache-type memory

usage: acestream-launcher [-h] [-e ENGINE] [-p PLAYER] URL
acestream-launcher: error: argument -e/--engine: expected one argument

any idea what might be wrong?

if acestream engine is not in the system-path

my distribution does not have the acestream package in repo so I had to download and install it manually and I have to start the engine this way ..

/opt/acestream/acestreamengine --lib-path "/opt/acestream"   <....>

therefore acestream-launcher is unable to find it and run it ..

Portabillity issue

I've got this warning running ./install on Ubuntu 18.04 LTS

./install.sh: 18: [: Illegal number:

To fix it I replaced the shebang on file install.sh
from #! /bin/sh to #!/usr/bin/env bash
As you should use it for portability ๐Ÿ‘

Stopped working since DE change.

Using Arch, changed from gnome to xfce and now I am getting this problem:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.Notifications': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/acestream-launcher", line 161, in
main()
File "/usr/bin/acestream-launcher", line 151, in main
AcestreamLauncher()
File "/usr/bin/acestream-launcher", line 41, in init
notify2.init(self.appname)
File "/usr/lib/python3.6/site-packages/notify2.py", line 103, in init
'/org/freedesktop/Notifications')
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python3.6/site-packages/dbus/proxies.py", line 248, in init
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.Notifications exited with status 127.

Don't work with openssl-1.0-1.0.2.k-3

Acestream-launcher does not work with the new version openssl
Acestream engine running. xx Cannot load libraries: path /opt/acestream/lib Traceback (most recent call last): File "<entry>", line 9, in <module> File "core.c", line 132, in ImportError: /usr/lib/libcrypto.so.1.0.0: version OPENSSL_1.0.0' not found (required by /opt/acestream/lib/acestreamengine/pycompat.so)
Error authenticating to Acestream!
Media Player not running...`
openssl-1.0-1.0.2.k-3
With version openssl-1.0-1.0.2.k-2 there are no problems

Stream unavailable

Installed using given procedure. Says stream unavailable all the time.

player wont launch

When I launch a stream, I am connected to peers and start to stream the data, but when the player is launched I am exited from acestream.

i get this message:
acestream-launcher acestream://ad07b5a5f2ce733b08bb863b2a58b74d93386351 Streaming started, launching player... Exiting...

I have all the dependancies installed as well as MPV.
Am running MANJARO 17.1

Any help is apreciated.

Problem with KDE Plasma 5

When I launch the acestream link from the browser (Firefox / Opera) I see a notification that the Acestream Launcher is running, then plasmashell crashes with the error:

[7545: 7545: 0225 / 110743.707507: ERROR: zygote_communication_linux.cc (314)] Failed to send GetTerminationStatus message to zygote

There is no problem when I run through the console.

OS Antergos 18.2 (based on Arch Linux), KDE Frameworks 5.43.0, Qt 5.10.1
Acestream Launcher v1.0.0-2 (installed from AUR)

Syntax error: invalid syntax

I am receiving the following error when attempting to use 'acestream-launcher'

Reproduce (on my machine) using:
#: acestream-launcher acestream://<acestreamURLhere>

Error:

stream-launcher acestream://b4d3f167b07dfd4d1421bc72a123456789123456
File "/usr/bin/acestream-launcher", line 100
subprocess.run(['notify-send', *args], **self.stdo)
-------------------------------^
SyntaxError: invalid syntax

I am running:
Linux Ubuntu 4.13.0-32-generic #35~16.04.1-Ubuntu SMP [2018 x86_64 x86_64 x86_64 GNU/Linux]

Ubuntu 16.04 (Xenial)

VLC is unable to open the MRL

Dear developers,

I receive the following error from VLC whenever I try to play a stream:

Your input can't be opened:
VLC is unable to open the MRL 'http://127.0.0.1:6878/ace/r/e45bd8ff300a36b01c90e7c1e1800d3cd284f694/d0b70def16a821fde6f2083994c7ea8e'. Check the log for details.

Here is the command that I used in this particular case:

acestream-launcher "acestream://eda51c7f96e415583a311bc79771ad3974b4e809" -v -p vlc

Acestream-launcher claims no errors, and the log from VLC says the following:

http error: failed to read answer
access error: HTTP connection failure
main error: read error: Operation now in progress
http error: failed to read answer
access error: HTTP connection failure
http error: cannot connect to 127.0.0.1:6878

MPV works as desired, but it doesn't support chromecast.

Thank you in advance for your work.

How do I... Record one or more acestreams to the HDD?

I would like to record one or more acestreams at a set time (HH:MM:SS) to be stored on my local hard-drive as either a .ts file or a .mp4 file.

Ideally I do not want to use mpv to record those streams.
There are so many acestream switches I do not know where to start.
Thanks, David.

acestream-launcher function with last 32bit version?

I arrived to install acestream engine 3.1.6 on MX Linux and Sparky Linux 64 bit.With acestream-engine running on background a started acestream-launcher to play ace streams. Works perfectly.The method is described here:
https://forum.mxlinux.org/viewtopic.php?p=452024&sid=5e36d2b8336bb20940391d69c844798b#p452024
I wanted also to install it on MX Linux 32 bit and Sparky Linux 32 bit. The latest acestream engine for Debian 32bit is version 3.0.2 and can be downloaded here:
http://dl.acestream.org/debian/7/acestream_3.0.2_debian_7.6_i686.tar.gz
or
http://dl.acestream.org/ubuntu/14/acestream_3.0.3_ubuntu_14.04_i686.tar.gz.
I used the same method described for version 64 bit. Script file start_engine is missing on version 32 bit.Because I did not know how to start acestream engine,I copied it from 64 bit. Follow is Start_Engine,sh file
+++++++++++++++++++++++
#!/bin/sh
ROOT=$(readlink -f $(dirname $0))
LD_LIBRARY_PATH=${ROOT}/lib ${ROOT}/acestreamengine --lib-path $ROOT "$@"
++++++++++++++++++++++++
Some packages need to be installed also, as desrcibed here https://aur.archlinux.org/packages/acestream-engine-i686/

python-m2crypto
python-apsw
python3-apsw
python3-lxml
python3-setuptools
python-typing

I arrived to start acestream-engine with command:
/opt/acestrem/Start_engine acestreamengine --client-console --bind-all
and with acestreamengine running on background, the next step :

acestream-launcher acestream://b7a25312cd8bd517e2a5c3a97eee6b4d0ebef451
(this stream is a functional stream on this moment), gives me this error :
Stream unavailable!

Exiting...
Is acestream-launcher valid for the version acestream-engine 32 bit (3.0.2)?

python-m2crypto

If the package python-m2crypto is upgraded to any version higher than 0.24.0-1.1 then acestream-launcher does not work.
A dirty solution is to hold the package using apt but this is not ideal.
Will you fix this issue?

Thanks.

Acestream Cache

acestream-launcher is working fine since the last patch, but I noticed that I was losing available disk every time I used it. .ACEstream was at about 7gb in size . Is it supposed to do that?

install

sorry, but how can i install it on ubuntu?

Change default player

That's pretty much it: is it possible to change the default player for acestream-launcher when opening a acestream:// from the browser?

Not working on Updated Arch

So, here I am trying to use acestream and it stopped working in the past few days.
I'm on Arch (with Cinnamon) with everything up to date.
Here's the error:

Traceback (most recent call last):
  File "/usr/bin/acestream-launcher", line 12, in <module>
    import notify2
ModuleNotFoundError: No module named 'notify2'

Any tips?

license_file parameter is deprecated

Got warning during build:

Deprecated config in `setup.cfg`
The license_file parameter is deprecated, use license_files instead.

By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.

See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.