cniw / mpv-discordrpc Goto Github PK
View Code? Open in Web Editor NEWDiscord Rich Presence integration for mpv Media Player
License: MIT License
Discord Rich Presence integration for mpv Media Player
License: MIT License
As title suggests. I don't see the point is sharing the fact I have a show paused. Or that I'm watching nothing.
[mpv_discordRPC] Discord Rich Presence integration for mpv Media Player [mpv_discordRPC] Upstream: https://github.com/cniw/mpv-discordRPC [mpv_discordRPC] Version: 1.4.1-UNKNOWN (+) Video --vid=1 (*) (vp9 1920x1080 29.970fps) (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz) AO: [pulse] 44100Hz stereo 2ch float [mpv_discordRPC] [mpv_discordRPC] stack traceback: [mpv_discordRPC] [C]: in function 'require' [mpv_discordRPC] ...nd/.config/mpv/scripts/mpv-discordRPC/lua-discordRPC.lua:1: in main chunk [mpv_discordRPC] [C]: in function 'require' [mpv_discordRPC] [string "/home/uend/.config/mpv/scripts/mpv-discordRPC..."]:228: in function 'cb' [mpv_discordRPC] mp.defaults:351: in function 'process_timers' [mpv_discordRPC] mp.defaults:520: in function 'dispatch_events' [mpv_discordRPC] mp.defaults:493: in function <mp.defaults:492> [mpv_discordRPC] [C]: in ? [mpv_discordRPC] [C]: in ? [mpv_discordRPC] Lua error: ...nd/.config/mpv/scripts/mpv-discordRPC/lua-discordRPC.lua:1: module 'ffi' not found: [mpv_discordRPC] no field package.preload['ffi'] [mpv_discordRPC] no file '/home/uend/.config/mpv/scripts/mpv-discordRPC/ffi.lua' [mpv_discordRPC] no file '/usr/local/share/lua/5.2/ffi.lua' [mpv_discordRPC] no file '/usr/local/share/lua/5.2/ffi/init.lua' [mpv_discordRPC] no file '/usr/local/lib/lua/5.2/ffi.lua' [mpv_discordRPC] no file '/usr/local/lib/lua/5.2/ffi/init.lua' [mpv_discordRPC] no file '/usr/share/lua/5.2/ffi.lua' [mpv_discordRPC] no file '/usr/share/lua/5.2/ffi/init.lua' [mpv_discordRPC] no file '/usr/local/lib/lua/5.2/ffi.so' [mpv_discordRPC] no file '/usr/lib/x86_64-linux-gnu/lua/5.2/ffi.so' [mpv_discordRPC] no file '/usr/lib/lua/5.2/ffi.so' [mpv_discordRPC] no file '/usr/local/lib/lua/5.2/loadall.so'
Mplug is like a package manager but for mpv scripts.
Please add your script there (if already not there) and also installation instructions in manifest - https://github.com/Nudin/mpv-script-directory/blob/master/HOWTO_ADD_INSTALL_INSTRUCTIONS.md
When trying to use on M1 MacBook Air, I get this error:
[mpv_discordRPC] Lua error: ...wl/.config/mpv/scripts/mpv-discordRPC/lua-discordRPC.lua:2: dlopen(libdiscord-rpc.dylib, 0x0005): tried: '/usr/lib/swift/libdiscord-rpc.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libdiscord-rpc.dylib' (no such file), 'libdiscord-rpc.dylib' (no such file), '/usr/local/lib/libdiscord-rpc.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libdiscord-rpc.dylib' (no such file), '/Users/wl/libdiscord-rpc.dylib' (no such file)
Can it only display file name instead of its title?
When hovering over the cover art for a web stream, it shows the URL, and afaik there is no way to hide that.
It is usually not a big deal but for my IPTV provider it leaks my login information. I know it's a bad design on their part but might be useful in other scenarios as well.
Image illustrating:
can u make it so it woks with mpv.net
Hello,
I am trying to use this on a fresh install of Kubuntu 19.10 but for some reason pypresence is giving me issues. When running mpv from the terminal, I can see the script is giving this error over and over:
Traceback (most recent call last): File "/home/user/.config/mpv/scripts/mpv-discordRPC/python-pypresence.py", line 6, in <module> import pypresence ImportError: No module named pypresence
However, pypresence IS installed. Python 3 is at version 3.7.5. and pip3 list
shows pypresence 3.3.2 is there. Further, if I open a terminal and manually run python3 and then import pypresence, it works just fine.
I have been getting segmentation fault pretty much after playing a song for 5-10 min
Which I didn't really get before.
mpv --no-video --loop STUDY\ WITH\ ME\ 24\ HOURS\ ๐ง\ lofi\ Music\ ๏ฝ\ Lofi\ Study\ ๏ฝ\ Chill\ music\ ~\ 35\ min\ study\ x\ 15\ min\ chill\ [Tq7523sJc6I].opus
[mpv_discordRPC] Discord Rich Presence integration for mpv Media Player
[mpv_discordRPC] Upstream: https://github.com/cniw/mpv-discordRPC
[mpv_discordRPC] Version: 1.4.1-UNKNOWN
(+) Audio --aid=1 --alang=eng 'STUDY WITH ME 24 HOURS ๐ง lofi Music | Lofi Study | Chill music ~ 35 min study x 15 min chill' (opus 2ch 48000Hz)
File tags:
Artist: Mimi Lofi Chill
Comment: https://www.youtube.com/watch?v=Tq7523sJc6I
Date: 20230114
Title: STUDY WITH ME 24 HOURS ๐ง lofi Music | Lofi Study | Chill music ~ 35 min study x 15 min chill
AO: [pipewire] 48000Hz stereo 2ch floatp
zsh: segmentation fault (core dumped) mpv --no-video --loop
Hi, im currently having a issue where mpv hangs on exit sometimes, I have only just opened GDB to see where it is getting stuck and it seems to be on the closing on the RPC connection in the discord provided RPC library. I am not sure if this is a upstream issue or an issue with how mpv-discordRPC tells the libary to quit
I would like to see uninstall script.
Or can I made it.
When using a custom appID and state, every 15 seconds the status will go back to the default title and (Playing) state, and then turn back after a second. It's super frustrating, so if anyone has a fix please let me know.
On Windows 10,
mpv version 0.32.0-288-gee70e8ce50
and mpv-discordRPC version 1.4.1-UNKNOWN
I did not change any settings after installation.
When mpv is paused, Discord presence updates properly to show that the player is paused, but the remaining time continues ticking down, for around 15 seconds, after which, it jumps back to the proper time and continues ticking down.
e.g.:
Everything else works fine i.e. the current timestamp ("AV:") does not change while the time left counter is ticking down.
Here's a screen recording from the Discord desktop app to better illustrate my issue (username and tag blurred for privacy):
[mpv_discordRPC] Discord Rich Presence integration for mpv Media Player
[mpv_discordRPC] Upstream: https://github.com/cniw/mpv-discordRPC
[mpv_discordRPC] Version: 1.4.1-UNKNOWN
(+) Video --vid=1 () (h264 1520x1080 23.976fps)
(+) Audio --aid=1 --alang=jpn () (aac 2ch 48000Hz)
File tags:
Title: [Kagura] Serial Experiments Lain - 01 [BDRip 1520x1080 x264 Hi10P FLAC]
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1520x1080 yuv420p
AV: 00:01:39 / 00:23:56 (7%) A-V: 0.000042 Vb: 2.602 mbps Ab: 161 kbps
I'm having trouble running this, when i try to run mpv, it shows me this:
[mpv_discordRPC] Lua error: ...su/.config/mpv/scripts/mpv-discordRPC/lua-discordRPC.lua:1: module 'ffi' not found: [mpv_discordRPC] no field package.preload['ffi'] [mpv_discordRPC] no file '/home****/.config/mpv/scripts/mpv-discordRPC/ffi.lua' [mpv_discordRPC] no file '/usr/share/lua/5.2/ffi.lua' [mpv_discordRPC] no file '/usr/share/lua/5.2/ffi/init.lua' [mpv_discordRPC] no file '/usr/lib/lua/5.2/ffi.lua' [mpv_discordRPC] no file '/usr/lib/lua/5.2/ffi/init.lua' [mpv_discordRPC] no file '/usr/lib/lua/5.2/ffi.so' [mpv_discordRPC] no file '/usr/lib/lua/5.2/loadall.so'
Manjaro Linux 5.6.10-3
mpv 0.32.0
Lua 5.3.5
Running this script with -v, i see the following error...
[cplayer] Can't load unknown script: /home/user/.config/mpv/scripts/mpv-discordRPC
The scripts are correctly there. I tried referencing main.lua directly using --script=...
but that ended up failing to import the catalogs.lua script.
Then I tried moving catalogs.lua and the other lua script into the PWD, I had the config file point to python, but for some reason it wasn't respecting the scripts-opt folder and tried to run the lua script (which failed because I don't have ffi installed).
I was wondering if this was related to mpv-player/mpv#7399
Hi, it seems that after getting the basic functionalities of this to work, the cover art doesn't show up for any of my songs.
Hi,
with the recent changes in MPV regarding scripts, this stopped working with the following errors (tested with mpv-x86_64-20200202-git-77a74d9):
cplayer: Cannot find main.* for any supported scripting backend in: C:/Program Files/MPV/scripts/mpv-discordRPC
mpv_discordRPC: Discord Rich Presence integration for mpv Media Player
mpv_discordRPC: Upstream: https://github.com/cniw/mpv-discordRPC
mpv_discordRPC: Version: 1.4.1
mpv_discordRPC:
mpv_discordRPC: stack traceback:
mpv_discordRPC: C:/Program Files/MPV/scripts/mpv-discordRPC.lua:126: in function 'cb'
mpv_discordRPC: mp.defaults:346: in function 'process_timers'
mpv_discordRPC: mp.defaults:506: in function 'dispatch_events'
mpv_discordRPC: mp.defaults:479: in function <mp.defaults:478>
mpv_discordRPC: [C]: at 0x00d18430
mpv_discordRPC: [C]: at 0x00d17b00
mpv_discordRPC: Lua error: C:/Program Files/MPV/scripts/mpv-discordRPC.lua:126: module 'mpv-discordRPC.catalogs' not found:
mpv_discordRPC: no field package.preload['mpv-discordRPC.catalogs']
mpv_discordRPC: no file '.\mpv-discordRPC\catalogs.lua'
mpv_discordRPC: no file 'C:\Program Files\MPV\lua\mpv-discordRPC\catalogs.lua'
mpv_discordRPC: no file 'C:\Program Files\MPV\lua\mpv-discordRPC\catalogs\init.lua'
mpv_discordRPC: no file '.\mpv-discordRPC\catalogs.dll'
mpv_discordRPC: no file 'C:\Program Files\MPV\mpv-discordRPC\catalogs.dll'
mpv_discordRPC: no file 'C:\Program Files\MPV\loadall.dll'
mpv_discordRPC: no file '.\mpv-discordRPC.dll'
mpv_discordRPC: no file 'C:\Program Files\MPV\mpv-discordRPC.dll'
mpv_discordRPC: no file 'C:\Program Files\MPV\loadall.dll'
This however can be easily fixed.
The files from "scripts\mpv-discordRPC" just need to be placed into the directory "lua\mpv-discordRPC" (or as above, in any other of the named directories, but the "lua" ones seems the most elegant, however the "lua" directory needs to be created if not already present).
Perhaps this can be considered with the installer script.
Log (colorized):
- Can't load unknown script: C:\Users\X4\AppData\Roaming/mpv/scripts/mpv-discordRPC_pypresence.py
! [mpv_discordRPC] script-opts/mpv_discordRPC.conf:21 unknown key mpv_version, ignoring
[mpv_discordRPC] Discord Rich Presence integration for mpv Media Player
[mpv_discordRPC] Upstream: https://github.com/cniw/mpv-discordRPC
[mpv_discordRPC2] Discord Rich Presence integration for mpv Media Player
[mpv_discordRPC] Version: 1.4.1
[mpv_discordRPC2] Upstream: https://github.com/cniw/mpv-discordRPC
[mpv_discordRPC2] Version: 1.4.1-UNKNOWN
I have no issues with using python version (tried it as well before), but I still use lua, however mpv now after update throwing errors about this file.
Also it have some problems with mpv_version
variable, may be need to rename it?
Can't seem to get it working anymore. Following the install script and editing the config to use pypresence gives this error:
[mpv_discordRPC_lua_discordRPC]
[mpv_discordRPC_lua_discordRPC] stack traceback:
[mpv_discordRPC_lua_discordRPC] [C]: in function 'require'
[mpv_discordRPC_lua_discordRPC] ...in/.config/mpv/scripts/mpv-discordRPC_lua-discordRPC.lua:1: in main chunk
[mpv_discordRPC_lua_discordRPC] [C]: in ?
[mpv_discordRPC_lua_discordRPC] [C]: in ?
[mpv_discordRPC_lua_discordRPC] Lua error: ...in/.config/mpv/scripts/mpv-discordRPC_lua-discordRPC.lua:1: module 'ffi' not found:
[mpv_discordRPC_lua_discordRPC] no field package.preload['ffi']
[mpv_discordRPC_lua_discordRPC] no file '/usr/local/share/lua/5.2/ffi.lua'
[mpv_discordRPC_lua_discordRPC] no file '/usr/local/share/lua/5.2/ffi/init.lua'
[mpv_discordRPC_lua_discordRPC] no file '/usr/local/lib/lua/5.2/ffi.lua'
[mpv_discordRPC_lua_discordRPC] no file '/usr/local/lib/lua/5.2/ffi/init.lua'
[mpv_discordRPC_lua_discordRPC] no file '/usr/share/lua/5.2/ffi.lua'
[mpv_discordRPC_lua_discordRPC] no file '/usr/share/lua/5.2/ffi/init.lua'
[mpv_discordRPC_lua_discordRPC] no file './ffi.lua'
[mpv_discordRPC_lua_discordRPC] no file '/home/lain/.config/mpv/scripts/ffi.lua'
[mpv_discordRPC_lua_discordRPC] no file '/usr/local/lib/lua/5.2/ffi.so'
[mpv_discordRPC_lua_discordRPC] no file '/usr/lib/x86_64-linux-gnu/lua/5.2/ffi.so'
[mpv_discordRPC_lua_discordRPC] no file '/usr/lib/lua/5.2/ffi.so'
[mpv_discordRPC_lua_discordRPC] no file '/usr/local/lib/lua/5.2/loadall.so'
[mpv_discordRPC_lua_discordRPC] no file './ffi.so'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.