GithubHelp home page GithubHelp logo

Comments (31)

jaseg avatar jaseg commented on August 27, 2024 1

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.

jaseg avatar jaseg commented on August 27, 2024 1

https://github.com/mpv-player/mpv and https://mpv.io

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

What version of libmpv are you using? Ask your package manager for this.

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

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.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

I'll try to do it and tell you if it works. Thanks :)

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

Where can I find the source?

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

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.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

How can i do that? Sorry i'm newbie

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

You're in for a treat then ;)

Probably start here.

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

I have already used this guide, but install that old version :/

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

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.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

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.

jaseg avatar jaseg commented on August 27, 2024

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.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

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.

jaseg avatar jaseg commented on August 27, 2024

libmpv and mpv are two different packages. Try finding a libmpv package instead.

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

There is only one "libmpv" and it's inside the installation folder.
here:
/home/pi/Desktop/mpv-build/mpv/libmpv

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

Is there a .so file somewhere in there?

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

Oh, I see, and did you do what is described here?

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

There aren't any .so files.
I followed the "Istructions for debian and ubuntu"

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

Did you follow this?

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

No :/ . Did i need to rebuild it?

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

Yup

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

Ok, thank you. I'll do it

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

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.

jaseg avatar jaseg commented on August 27, 2024

Did you run ./clean as it says in the README?

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

Yes, i'll try it again

from python-mpv.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

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.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

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.

jaseg avatar jaseg commented on August 27, 2024

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.

DavideSegullo avatar DavideSegullo commented on August 27, 2024

Oh perfect! It works now :D . Thank you !

from python-mpv.

jaseg avatar jaseg commented on August 27, 2024

Hah! finally :D I'll close this now, then.

from python-mpv.

Related Issues (20)

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.