A rewrite/fork of cniw/mpv-discordRPC that uses the Discord Game SDK instead of the deprecated discord-RPC.
The script comes with some predefined conditionals, but it is up to users to customise how they want their activity to look depending on various media. You will need to create a Discord developer client ID if you want to use your own images.
These are some ideas of how to customise the script:
Default | |
Mostly default, with custom large image | |
Custom large image, custom 2nd line, custom 3rd line, custom time | |
Potential for even more customisation using other scripts and APIs. (Showing current radio programme with mpv-radio-title-script) |
It is assumed that the user of this script has basic Lua knowledge (just the syntax is fine), and knows their way around their file system.
- Download the Game SDK from the official page. This unfortunately cannot be included in this repository due to legal constraints.
- In the
lib/
folder in the ZIP, go into your distributionx86
orx86_64
, and copy all library files inside it (or just the necessary ones if you're sure). Paste them into mpv's installation directory. This is not your user configuration directory, but where the mpv binary lies (e.g.C:/Program Files/mpv/discord_game_sdk.dll
). - Download or clone this repository and place both main.lua and the SDK lua files into
scripts/mpvcord
of your mpv configuration directory. E.g.%appdata%/mpv/scripts/mpvcord/main.lua
. - Skim through main.lua and customise any of the code as you want. The SDK lua file needs no configuration.
- Optionally, create a
script-opts/mpvcord.conf
file in the mpv configuration directory to control options from a separate file. An example has been included in this repo.
It can take around 10-15 seconds since mpv starts for Discord to show the status on the client.
- Delete the relevant directory inside your
scripts
folder, and any SDK library files in your mpv installation folder.