Syncplay / syncplay

Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE on many computers
http://syncplay.pl/
Apache License 2.0
2.1k stars 213 forks source link

Crash on using mpv discord rpc plugin #651

Open gsk143 opened 8 months ago

gsk143 commented 8 months ago

Describe the bug Application crashes when using discord RPC https://github.com/tnychn/mpv-discord

Version and platform:

This can very well be the plugin issue but wonder if something can done here image

Et0h commented 8 months ago

Discord RPC seems to rely on IPC and as such I think this might be related to the issue at https://github.com/Syncplay/syncplay/issues/529 and https://github.com/iamkroot/trakt-scrobbler/issues/266

I am not aware of any satisfactory solution to that issue from 2022, and this seems like it could be considered an upstream limitation of mpv.

One potential workaround is for someone to add rich presence to Syncplay. Someone requested this at https://github.com/Syncplay/syncplay/discussions/491 back in October 2021 but to date nobody has volunteered to implement it .

Et0h commented 6 months ago

The latest development build of Syncplay now creates a new IPC socket called mpvSyncplaySocket or \.\pipe\mpvSyncplaySocket that you can connect to with mpv-discord, or you can specify a different socket to use with by specifying a input-ipc-server player argument in Syncplay. See: https://github.com/Syncplay/syncplay/actions/runs/7766691704

So you should hopefully be able to get it to work with mpv and this version of Synplay by setting socket_path in /script-opts /discord.conf to the Syncplay IPC socket.

@gsk143 Please test it and let me know if it works.

Et0h commented 3 months ago

From Syncplay 1.7.3 the user will need to specify the pipe name (e.g. input-ipc-server=\\.\pipe\examplepipe) to connect to an mpv pipe. See #674 and #675 for details.