Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[error] mpris: C plugin error: '$PATH/.config/mpv/scripts/mpris.so: undefined symbol: mpv_get_property' [error] mpris: Could not load SO plugin #43

Closed
bergercookie opened this issue Sep 27, 2020 · 1 comment

Comments

@bergercookie
Copy link

Hi there,

Thanks for this work!

I'm trying to load it from a python script in which I'm using the python-mpv ctypes bindings.
Here's my sample code:

import mpv

def debug_print(loglevel, component, message):
    print(f"[{loglevel}] {component}: {message}")

player = mpv.MPV(config=True, log_handler=debug_print)
url = "https://somafm.com/defcon130.pls"
player.play(url)

Here's the error I'm getting:

[error] mpris: C plugin error: '/home/berger/.config/mpv/scripts/mpris.so: undefined symbol: mpv_get_property'
[error] mpris: Could not load SO plugin /home/berger/.config/mpv/scripts/mpris.so

However, when I'm running mpv, and the extension is loaded automatically since it is in my scripts path, it is loaded successfully and it sends the song metadata as expected via dbus-send.

Here's my version of the mpv binary (this loads mpris.so successfully):

mpv 0.32.0-747-g5e4ec15e6c Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
 built on Sat Sep 26 22:10:14 BST 2020
FFmpeg library versions:
   libavutil       56.59.100
   libavcodec      58.107.100
   libavformat     58.59.100
   libswscale      5.8.100
   libavfilter     7.87.100
   libswresample   3.8.100
FFmpeg version: N-99386-g85195f6ae9

On the other hand, I've built libmpv.so from source using the latest tree and using the mpv-build repo.

Any hints as to what's causing this?
Thanks

@hoyon
Copy link
Owner

hoyon commented Dec 24, 2020

Hi sorry for the delay, I only just had time to look into this.

The issue is that the default build of mpris.so doesn't link against libmpv.so since it can share the symbols already loaded by the mpv binary.

The docs require this behaviour.

However linking with libmpv seems to make it work with your python script.

@hoyon hoyon closed this as completed Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants