Git Product home page Git Product logo

mpv-discordrpc's Introduction

This is yet another alternative version

I didn't like the way that the songs were displayed in rich presence, so now, it looks like this: preview

Discord Rich Presence intergation for mpv Media Player


This is alternative version, edited from mpv-discordRPC. I add metadata tags (Title, Artist and Album) support for 'details' and I use status-line for 'state'. I use 'elapsed' time mode when idle, while when playing, paused, and buffering use 'left' time mode. I add support and installer script for Linux, Mac and Windows. I also add custom configuration file and new features: info, cover art, url detections, and active/inactive toggle.

For more description read below.


Previews

Description Image
Idle Idle
Playing Playing
Paused Paused
Info: playlist and loop Info: playlist and loop
Cover art Cover art
YouTube playing YouTube playing
Crunchyroll paused Crunchyroll paused
SoundCloud playing SoundCloud playing
LISTEN.moe paused LISTEN.moe paused

Used softwares

  1. provided by user: mpv, Discord
  2. Included: Discord RPC, status-line, lua-discordRPC
  3. Optional: Python, pypresence

Downloads

  • Latest Releases download
  • All Releases download

Instalation

  1. For Linux, installing just run install-linux.sh on terminal.
  2. For Windows, installing just run install-win.bat by double-clicking it.
  3. For Mac, installing just run install-osx.sh on terminal.

Settings

Just edit mpv_discordRPC.conf file in lua-settings folder. Now Available 2 rpc_wrapper option, choose one. Example:

  • Configuration (A) rpc_wrapper and periodic_timer
     rpc_wrapper=lua-discordRPC
     periodic_timer=1
    
  • Configuration (B) rpc_wrapper and periodic_timer
     rpc_wrapper=pypresence
     periodic_timer=3
    

Setting to show playlist info and loop info. Example:

  • Configuration playlist_info and loop_info
     playlist_info=yes
     loop_info=yes
    

Setting to show cover art. Example:

  • Configuration cover_art
     cover_art=yes
    

Setting to active/inactive toggle the Discord RPC and the start states. Example:

  • Configuration active and key_toggle
     active=yes
     key_toggle=D
    

To use rpc_wrapper=lua-discordRPC, Important LuaJIT on mpv

Check LuaJIT, because it has FFI Library and it needed by lua-discordRPC.

  1. For Linux
    • Make sure your mpv binary linked to luajit~~ not lua~~ library.
       ldd $(which mpv) | grep luajit
       libluajit-5.1.so.2 => /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 (0x00007f32e9a83000)
    • If it's dynamic build while it's static build you can check with
       mpv -v -V | sed -rn 's/.*(luajit).*/\1/p'
       luajit
  2. For Windows (Don't worry)
    • You can skip this because available mpv Windows build by lachs0r and shinchiro already use LuaJIT and it static build which configured with --enable-static-build.
  3. For Mac (So sad)
    • Until now, LuaJIT still have problem on Mac OS X. Also build mpv with LuaJIT on Mac OS X (read mpv issue #1110), it maybe can build successfully but still can't load LuaJIT properly when run mpv (read mpv issue #5205). You can check with otool command.

To use rpc_wrapper=pypresence, Important to install pypresence

Support Mac, Windows, and Linux because can use with Lua ([email protected], [email protected]) or LuaJIT (luajit).

  1. Install Python 3 (python3.4 or python3.6) because this version has asyncio library which needed by pypresence.
  2. Install pypresence pip3 install pypresence or pip3 install https://github.com/qwertyquerty/pypresence/archive/master.zip you can use pip instead of pip3 if python2.7 not installed.

You may want to check again, run command mpv -v -V and find luajit or lua word on the line which beginning with [cplayer] List of enabled features: for Mac, Windows or Linux.


Testing

  1. Open your Discord then,
  2. Open your mpv then,
  3. Back to Discord and then check your profile.

Good Luck and have a nice day.

Feedback: If you have question, problem or request, please make new issue or contact me wachidadinugroho#7674 via Discord.

mpv-discordrpc's People

Contributors

cniw avatar nunner avatar mrniceforest avatar jerrynicki avatar

Watchers

James Cloos avatar

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.