How To Set Up MPD & Media Key Support Through MPRIS

preview_player
Показать описание
People have been bugging me about setting up MPD for a long time now so I thought I might as well do so and I might as well make a bit of a tutorial out of it, in particular showing you how to setup your media keys with MPD if you want to use a tool like PlayerCTL rather than a tool specifically made for MPD, but it doesn't have mpris support out of the box so we need to fix that with mpdris2

==========Support The Channel==========

==========Resources==========

=========Video Platforms==========

==========Social Media==========

==========My Repos==========

==========Credits==========
🎨 Channel Art:
All my art has was created by Supercozman

🎵 Ending music

DISCLOSURE: Wherever possible I use referral links, which means if you click one of the links in this video or description and make a purchase we may receive a small commission or other compensation.

Рекомендации по теме
Комментарии
Автор

Emacs has some nice mpd players. (Had to be THAT guy :D )

DistroTube
Автор

5:27 This section isn't for just playing music. MPD is first and foremost a Daemon. If he left it in and hit 7 while in ncmpcpp he would see that there is two default outputs, one for the pulse audio second and the other for the visualizer, both can be toggled on an off. MPD has the ability to do output for multiple audio streams; the most common configuration is just an audio sink on Pulse or Alsa, a less common usage would be to add in an audio output that allowed you to listen to your MPD session over the internet.

Dropping in:
audio_output {
type "httpd"
name "MPD HTTP Server"
encoder "vorbis" # optional
port "8000"
# quality "5.0" # do not define if bitrate is defined
bitrate "128" # do not define if quality is defined
format "44100:16:1"
always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped.
tags "yes" # httpd supports sending tags to listening streams.
}
Exposing port 8000 on your router would allow you to direct your browser to your domain/ip and listen to the MPD stream like an internet radio station. Using an application like M.A.L.P. for Android would let you control it as well. MPD isn't just a music player as demonstrated in this video, its a music playing server. As for mpc, Brodie isn't using it to its full extent. As an example, I listen to local radio stations and some internet streams, we can see that mpd showcases title and artist info during playback from these stations. There is a python program called spotdl(Get it via pip or AUR) that pulls metadata from Spotify like album art and tagging info and yanks the song from youtube and tags it up. I can use spotdl to download it and use mpc to provide the song information to make the call like so:
spotdl --song "$(mpc -f %title% | head -n 1)"
or if I wanted to listen to a youtube station like the popular Lofi channel everyone hypes with mpd I could do
mpc add "$(youtube-dl -xg "$1")"

mpc is useful for extending your mpd server with scripts. I don't know why Brodie would shit on it.

Salastil
Автор

Ah yeah, ncwhateverthatapplicationiscalled, my favorite music player

Noukkis
Автор

It's nice to see you covering suggested videos, will be looking forward to the client videos :)

a_maxed_out_handle_of__chars
Автор

you got some great timing bro I was literally JUST trying to get this thing working and the example config file wasn't working at all

dolguth
Автор

"ncmpcpp" ends up being second nature, it just flows

twb
Автор

Couldn't find the mpd file in your dotfiles. Only mpv. :c

playerone
Автор

Mpd, love the tool once I got it configured.

henninb
Автор

If you mostly listen to music on spotify, you may want to check out mopidy, which is compatible with mpd clients and has support for plugins... including one for spotify (only works if you have a premium account, though)

ricardillapujagut
Автор

If you feel the wiki is wrong, edit the page.

amietinen
Автор

Thanks.
I'm not using it yet but why one symlinks music files?

reverseila
Автор

this didn't work for me i spend 3 hours trying to get this to work npcmpcc wouldn't connect tried changing the ports still nothing mpc update wouldn't connect. as much as I would like to use a terminal based music player its way beyond my knowledge to get working sadly

darrenrichard
Автор

Every time i get mpd working it "cannot connect to 6600 port" on start up and i have to uninstall, re install and reboot to get it working again .

DangerHiVolt
Автор

Not sure if this is new, but you can do things like `playerctl --all-players stop`.

BrazenNL
Автор

How to configure mpd for bluetooth headphones?

DFMN
Автор

Can i stream music from mi Nextcloud in mpd?

AndyRufasto
Автор

i have 2 gurus now. luke smith and broadie

randomguy-tmdf
Автор

How can you access your files with a preview of the content?

crissdell
Автор

mpDris2 is an overkill compared to some simple shell scripting when it comes to making the media keys functional for mpd as well as other players.
Here is mine for reference.

P.S.: The script has a lot going on for the sake of verbosity but the basic idea is the usage of the ||/Or operator.

salmanabedin
Автор

Brodie you make me want to abandon my macos days and install linux desktop. Halp.

JohnCodes