Coder Social home page Coder Social logo

Comments (12)

hoyon avatar hoyon commented on May 30, 2024 4

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.

hoyon avatar hoyon commented on May 30, 2024

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.

StopIteration avatar StopIteration commented on May 30, 2024

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.

tsjnachos117 avatar tsjnachos117 commented on May 30, 2024

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.

rien333 avatar rien333 commented on May 30, 2024

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.

hoyon avatar hoyon commented on May 30, 2024

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.

rien333 avatar rien333 commented on May 30, 2024

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.

rien333 avatar rien333 commented on May 30, 2024

Perfect, works great! Thank you so much for the fix.

from mpv-mpris.

hoyon avatar hoyon commented on May 30, 2024

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.

tsjnachos117 avatar tsjnachos117 commented on May 30, 2024

Hoyon said

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.

ammgws avatar ammgws commented on May 30, 2024

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.

mizzunet avatar mizzunet commented on May 30, 2024

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)

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.