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

Cannot Get mpv-mpris To Show Up In Playerctl #49

Open
ZachIndigo opened this issue Apr 9, 2021 · 2 comments
Open

Cannot Get mpv-mpris To Show Up In Playerctl #49

ZachIndigo opened this issue Apr 9, 2021 · 2 comments

Comments

@ZachIndigo
Copy link

If I load mpv without mpris.so, the video plays as normal, and nothing shows up in playerctl -l. However, if I load mpv with --script=~/.config/mpv/scripts/mpris.so, and add the relevant dbus interfaces in /usr/lib/dbus-1/system.d/, nothing shows up in playerctl -l, and I get the following output:
`An object is already exported for the interface org.mpris.MediaPlayer2 at /org/mpris/MediaPlayer2
(process:27778): GLib-GIO-CRITICAL **: 15:59:09.590: g_dbus_connection_register_object: assertion 'error == NULL || error == NULL' failed
An object is already exported for the interface org.mpris.MediaPlayer2 at /org/mpris/MediaPlayer2 (+) Video --vid=1 (
) (h264 1280x720
30.000fps)
(+) Audio --aid=1 (*) (aac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p
AV: 00:00:04 / 00:04:53 (1%) A-V: 0.000

Exiting... (Quit)`

@hoyon
Copy link
Owner

hoyon commented Apr 12, 2021

and add the relevant dbus interfaces in /usr/lib/dbus-1/system.d/

What do you mean by this?

It looks like you're loading the plugin multiple times. eg you're adding it to the command with --script and also have mpris.so installed in ~/.config/mpv/scripts/mpris.so and/or /etc/mpv/scripts.

The plugin doesn't currently protect against this and won't work correctly if loaded multiple times.

@ZachIndigo
Copy link
Author

ZachIndigo commented Apr 14, 2021

My dbus denies everything except what I allow in /usr/share/dbus-1/system.d/, I believe it has to do with how Arch Linux does pipewire.

So I tried running mpv without the command (using ~/.config/mpv/scripts/mpris.so), and moving mpris.so and loading it manually, and in both cases nothing pops up in dbus.

$ playerctl -l
mpd
mpd

$ dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames
method return time=1618424795.126584 sender=org.freedesktop.DBus -> destination=:1.282 serial=3 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.205"
      string "org.freedesktop.Notifications"
      string ":1.7"
      string "org.freedesktop.login1"
      string "org.freedesktop.ReserveDevice1.Audio0"
      string ":1.207"
      string ":1.72"
      string ":1.73"
      string ":1.40"
      string "org.freedesktop.DisplayManager"
      string ":1.41"
      string ":1.282"
      string ":1.75"
      string "org.freedesktop.PolicyKit1"
      string "org.bluez"
      string ":1.76"
      string ":1.10"
      string ":1.77"
      string ":1.33"
      string ":1.11"
      string "org.pulseaudio.Server"
      string ":1.14"
      string ":1.277"
      string ":1.38"
      string ":1.3"
      string ":1.39"
      string ":1.4"
      string "org.freedesktop.RealtimeKit1"
      string "org.mpris.MediaPlayer2.mpd"
   ]

And in both cases, mpv doesn't output any errors or messages except for what is playing

[file] This is a directory - adding to playlist.

Playing: /home/zachir/Videos/How+To+Enable+DRM+Restricted+Content+In+LibreWolf-bJsdnBxDKI8(1).mp4
 (+) Video --vid=1 (*) (h264 640x360 30.000fps)
 (+) Audio --aid=1 (*) (aac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 640x360 yuv420p
AV: 00:01:28 / 00:04:53 (30%) A-V:  0.000

Exiting... (Quit)

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