Comments (31)
Ok. The problem is that your libmpv is really, really old. You can either try getting a current libmpv (e.g. by compiling from source) or use a really, really old version of this python module.
from python-mpv.
https://github.com/mpv-player/mpv and https://mpv.io
from python-mpv.
What version of libmpv are you using? Ask your package manager for this.
from python-mpv.
libmpv-dev/stable,now 0.6.2-2 armhf [installed]
libmpv1/stable,now 0.6.2-2 armhf [installed, automatic]
I'm working on Raspbian jessie
from python-mpv.
I'll try to do it and tell you if it works. Thanks :)
from python-mpv.
Where can I find the source?
from python-mpv.
BTW, you can cross-compile mpv on your normal computer (laptop/desktop). You don't have to do that on your Pi. You normal computer will be like infinitely faster!
from python-mpv.
How can i do that? Sorry i'm newbie
from python-mpv.
You're in for a treat then ;)
Probably start here.
from python-mpv.
I have already used this guide, but install that old version :/
from python-mpv.
Uninstall libmpv
using your package manager (libmpv-dev
and libmpv1
), and look whether there's anything looking like it might be a libmpv in /usr/local/lib
from python-mpv.
Inside /usr/local/lib there are three directory (pypy2.7,python2.7 and python3.4). I'm using python 3, so inside /usr/local/lib/python3.4/dist-packages there is only you're script "mpv.py".
from python-mpv.
If libmpv is installed correctly from the mpv-build
script, there should be something named similar to libmpv.so
in /usr/lib
, /usr/lib/mpv
, /usr/local/lib
or /usr/local/lib/libmpv
or similar.
from python-mpv.
There isn't any file named "libmpv.so".
I used the following command:
sudo dpkg -i mpv_2017.06.03.fdd75f9_armhf.deb
The "mpv" command works
from python-mpv.
libmpv
and mpv
are two different packages. Try finding a libmpv
package instead.
from python-mpv.
There is only one "libmpv" and it's inside the installation folder.
here:
/home/pi/Desktop/mpv-build/mpv/libmpv
from python-mpv.
Is there a .so
file somewhere in there?
from python-mpv.
Oh, I see, and did you do what is described here?
from python-mpv.
There aren't any .so files.
I followed the "Istructions for debian and ubuntu"
from python-mpv.
Did you follow this?
from python-mpv.
No :/ . Did i need to rebuild it?
from python-mpv.
Yup
from python-mpv.
Ok, thank you. I'll do it
from python-mpv.
During the compiling phase i get the following errors:
src/libavcodec/wmadec.c: In function โwma_decode_initโ:
src/libavcodec/wmadec.c:128:1: internal compiler error: Errore di segmentazione
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.9/README.Bugs for instructions.
CC libavcodec/wmalosslessdec.o
The bug is not reproducible, so it is likely a hardware or OS problem.
/home/pi/Desktop/mpv-build/ffmpeg/ffbuild/common.mak:59: set di istruzioni per l'obiettivo "libavcodec/wmadec.o" non riuscito
make[2]: *** [libavcodec/wmadec.o] Errore 1
make[2]: *** Attesa per i processi non terminati....
make[2]: uscita dalla directory "/home/pi/Desktop/mpv-build/ffmpeg_build"
debian/rules:63: set di istruzioni per l'obiettivo "ffmpeg_build" non riuscito
make[1]: *** [ffmpeg_build] Errore 2
make[1]: uscita dalla directory "/home/pi/Desktop/mpv-build"
debian/rules:23: set di istruzioni per l'obiettivo "build" non riuscito
make: *** [build] Errore 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
from python-mpv.
Did you run ./clean
as it says in the README
?
from python-mpv.
Yes, i'll try it again
from python-mpv.
Now i get the following errors:
[458/460] Linking build/mpv
[459/460] Linking build/libmpv.so
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../arm-linux-gnueabihf/Scrt1.o: nella funzione "_start":
/build/glibc-lGD2lt/glibc-2.19/csu/../ports/sysdeps/arm/start.S:128: riferimento non definito a "main"
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/pi/Desktop/mpv-build/mpv/build'
Build failed
-> task in 'mpv' failed with exit status 1 (run with -v to display more information)
debian/rules:70: set di istruzioni per l'obiettivo "override_dh_auto_build" non riuscito
make[1]: *** [override_dh_auto_build] Errore 1
make[1]: uscita dalla directory "/home/pi/Desktop/mpv-build"
debian/rules:23: set di istruzioni per l'obiettivo "build" non riuscito
make: *** [build] Errore 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
from python-mpv.
I've solved the compilation problems.
Now inside "/usr/local/lib" there are three files:
- libmpv.so
- libmpv.so.1
- libmpv.so.1.24.0
If i try to import "mpv" from python3 i get the following errors:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/mpv.py", line 49, in <module> backend = CDLL(sofile) File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__ self._handle = _dlopen(self._name, mode) OSError: libmpv.so.1: cannot open shared object file: No such file or directory
Do you know how I can solve it?
Thanks for your help
from python-mpv.
Ah, that sounds better. python-mpv
will search your system library path for libmpv.so
. On many linuxes, by default /usr/local/lib
is not part of that. The easiest way to fix this is to run your python interpreter with the LD_LIBRARY_PATH
environment variable set appropriately like this: env LD_LIBRARY_PATH=/usr/local/lib python my_script.py
.
from python-mpv.
Oh perfect! It works now :D . Thank you !
from python-mpv.
Hah! finally :D I'll close this now, then.
from python-mpv.
Related Issues (20)
- no-border not working as intended HOT 1
- tests/test_mpv.py::TestLifecycle::test_wait_for_event_shutdown hangs HOT 1
- Audio controls
- I do not literally know which DLLs does it need to consume HOT 2
- How to directly play audio bytes? HOT 2
- "Cannot find libmpv in the usual places" on Arch Linux, Hypnotix HOT 2
- How to replace mpv.MpvEventID.METADATA_UPDATE ? HOT 2
- Loadfile command broken by API change in mpv v0.38.0 HOT 5
- The PyPI package is not up to date HOT 3
- playlist_next() and playlist_prev() beyond end of playlist causes SystemError HOT 1
- [QUESTION] How do I add custom scripts? HOT 2
- QOpenGLWidget is displayed in its own window since ibmpv.so.2.3.0 HOT 3
- SyntaxError on Mac os with python3 on v1.0.6 HOT 2
- Unable to set Gapless Playback option HOT 3
- Is it possible to read music files from an USB key or HD ? HOT 1
- trying to capture mouse clicks when running mpv HOT 2
- wait_until_playing and wait_for_property throws exception HOT 3
- wait_until_playing() seems to be triggered too early HOT 2
- How to set User-Agent? HOT 6
- Flaky test `tests.test_mpv.RegressionTests.test_wait_for_property_concurrency` in Python3.12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-mpv.