Comments (12)
Thanks! So there are two errors you've got in that output:
An object is already exported ...
: You probably have mpv-mpris installed twice, which is what is causing the second attempt to load to fail. Can you check your ~/.config/mpv/scripts
and /etc/mpv/scripts
directories to ensure you only have one copy.
g_variant_new_object_path ...
: This was due to a special case where mpv returned -1 for playlist-pos
which I wasn't aware of. I've handled this now in 81e3de9 which should fix that.
from mpv-mpris.
What version of mpv are you using? I'm using the latest mpv (0.28.2) and can't reproduce the issue.
Does it only happen on startup, or whenever g_dbus_connection_emit_signal
is called, namely when the file changes or the track is seeked.
from mpv-mpris.
I'm using 0.28.2 as well.
It happens only at startup (after the "Playing:" message appears), and in re-reproducing it myself, I've realized that it is also a very intermittent issue. It seemed yesterday that it happened every time, but now that I'm trying to reproduce it, I've only gotten it to happen like twice (out of maybe 30+ attempts). I'll let you know if I figure out how to consistently reproduce it, although it might just be that I notice it when it happens and it is actually quite rare.
from mpv-mpris.
I had a few glib messages at one point, when I realized I had the mpris.so file in ~/.config/mpv/scripts AND ~/.mpv/scripts, causing it to be loaded twice. Maybe that's your issue too?
from mpv-mpris.
I've been getting these warnings for at least a week or something (they went away for a bit, I think, after I started building this repo from its newest commit, but they've since returned. Its kind of annoying for cluttering up my terminal windows, but outside of that there is no noticeable effect I think. Here is the output I'm getting (its not entirely consistent, but it's there in some form 95% of the time):
$ mpv --no-audio --no-video --no-resume-playback vid.mkv
(process:425681): GLib-CRITICAL **: 22:14:20.472: g_variant_new_object_path: assertion 'g_variant_is_object_path(object_path)' failed
(process:425681): GLib-CRITICAL **: 22:14:20.474: g_variant_dict_insert_value: assertion 'value != NULL' failed
Video --vid=1 (*) (h264 1920x1040 23.976fps)
...
No video or audio streams selected.
Exiting... (Errors when loading file)
(process:425681): GLib-CRITICAL **: 22:14:20.492: g_variant_new_object_path: assertion 'g_variant_is_object_path(object_path)' failed
(process:425681): GLib-CRITICAL **: 22:14:20.492: g_variant_dict_insert_value: assertion 'value != NULL' failed
Version info
# build from source today
$ mpv --version
mpv 0.32.0-352-g530a0863b8 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on Sat Apr 11 20:27:18 CEST 2020
FFmpeg library versions:
libavutil 56.42.102
libavcodec 58.77.101
libavformat 58.42.100
libswscale 5.6.101
libavfilter 7.77.101
libswresample 3.6.100
FFmpeg version: N-97186-gda44bbefaa
$ uname -mor
5.6.3-arch1-1 x86_64 GNU/Linux
from mpv-mpris.
Hmm that g_variant_new_object_path
error is very strange. I've pushed up a new branch https://github.com/hoyon/mpv-mpris/tree/issue-11 which adds a debug log. Can you show what it outputs when you get that error?
from mpv-mpris.
This is a typical output:
$ mpv --no-audio --no-video vid.mkv
An object is already exported for the interface org.mpris.MediaPlayer2 at /org/mpris/MediaPlayer2
(process:8173): GLib-GIO-CRITICAL **: 18:37:52.666: 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
(process:8173): GLib-CRITICAL **: 18:37:52.675: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
(process:8173): GLib-CRITICAL **: 18:37:52.675: g_variant_dict_insert_value: assertion 'value != NULL' failed
Resuming playback. This behavior can be disabled with --no-resume-playback.
/0
/0
Video --vid=1 (*) (h264 1920x1040 23.976fps)
...
No video or audio streams selected.
Exiting... (Errors when loading file)
(process:8173): GLib-CRITICAL **: 18:37:52.688: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
(process:8173): GLib-CRITICAL **: 18:37:52.688: g_variant_dict_insert_value: assertion 'value != NULL' failed
/-1
(process:8173): GLib-CRITICAL **: 18:37:52.689: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
(process:8173): GLib-CRITICAL **: 18:37:52.689: g_variant_dict_insert_value: assertion 'value != NULL' failed
$
from mpv-mpris.
Perfect, works great! Thank you so much for the fix.
from mpv-mpris.
Great! I'll close this for now then. If there is any more extraneous error logging feel free to create a new issue.
from mpv-mpris.
An object is already exported ...: You probably have mpv-mpris installed twice, which is what is causing the second attempt to load to fail. Can you check your ~/.config/mpv/scripts and /etc/mpv/scripts directories to ensure you only have one copy.
FYI, such a script could also be located in ~/.mpv. In fact, this was the only place in one's HOME directory to put scripts and configs for a while, IIRC. (I just though I'd mention it in case someone finds this on a search engine - such as Google - and still can't figure out why they're getting such errors.)
from mpv-mpris.
Another FYI:
I use the mpv-mpris AUR package and didn't realise it had changed from having the file in the user config to loading it by default from /etc: https://aur.archlinux.org/cgit/aur.git/commit/?h=mpv-mpris&id=da5d1f8f6e725bbd7f0bca897310bc1d5e93f8a4
Removed the script from my user config file and now the errors are gone.
from mpv-mpris.
I have this issue and this script doesn't seem to be working.
mpv --config=no Videos/IMG_1456.mp4 --script=/etc/mpv/scripts/mpris.so
(+) Video --vid=1 (*) (h264 640x360 30.000fps)
(+) Audio --aid=1 (*) (aac 1ch 44100Hz)
(process:48): GLib-GIO-CRITICAL **: 02:51:23.989: g_dbus_connection_emit_signal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
AO: [pulse] 44100Hz mono 1ch float
VO: [gpu] 640x360 yuv420p
AV: 00:00:02 / 00:00:02 (95%) A-V: 0.000
Exiting... (End of file)
(process:48): GLib-GIO-CRITICAL **: 02:51:26.576: g_dbus_connection_emit_signal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(process:48): GLib-GIO-CRITICAL **: 02:51:26.576: g_dbus_connection_unregister_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(process:48): GLib-GIO-CRITICAL **: 02:51:26.576: g_dbus_connection_unregister_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Removed the script from my user config file and now the errors are gone.
@ammgws What do you mean?
I do not have ~/.config/mpv/scripts folder
ls /usr/lib/mpv/mpris.so
"/usr/lib/mpv/mpris.so": No such file or directory (os error 2)
ls /etc/mpv/scripts/mpris.so
/etc/mpv/scripts/mpris.so
from mpv-mpris.
Related Issues (20)
- Feature Request: show Youtube "artist" with Playerctl HOT 2
- mpv mpris doesn't work correctly in flatpak
- mpv-mpris shows unexpected behaviour while mpris indicator button (Gnome Shell extension) is installed HOT 1
- Empty value for url
- Can I use without MPV HOT 1
- Plugin doesn't work inside terminal. HOT 1
- Does not send an event on exit HOT 1
- Cover image in opus file is not shown in KDE media control in system tray HOT 7
- Setting or defining seek distance HOT 2
- Can you add fullscreen status signals (true/false)?
- g_dbus_connection_register_object: assertion 'error == NULL || *error == NULL' failed HOT 6
- test failed because not pass `--no-config `
- Multiple delimiters for splitting artist field
- Position provided by Seeked signal inaccuracies
- Stops working after waking up from standby HOT 2
- Cover Image in notification HOT 1
- mpv-mpris not detected HOT 4
- How to control only when focused ? HOT 1
- How to make this work on Windows? HOT 1
- Could not load SO plugin: libavformat.so.58 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 mpv-mpris.