Skip to content

Instantly share code, notes, and snippets.

@sheeeng
Forked from lirenlin/mpd.md
Created October 30, 2024 19:05
Show Gist options
  • Save sheeeng/e3d8db23b1f5bc0d5bba7ad506e72100 to your computer and use it in GitHub Desktop.
Save sheeeng/e3d8db23b1f5bc0d5bba7ad506e72100 to your computer and use it in GitHub Desktop.
simple mpd and ncmpcpp setup

https://wiki.archlinux.org/index.php/Music_Player_Daemon

sudo apt-get install mpd mpc ncmpcpp  

mkdir .mpd  
mkdir -p ~/.mpd/playlists
touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate}  

cp /usr/share/doc/mpd/mpdconf.example ~/.mpd/mpd.conf
vim ~/.mpd/mpd.conf
# Required files
db_file            "~/.config/mpd/database"
log_file           "~/.config/mpd/log"

# Optional
music_directory    "~/Music"
playlist_directory "~/.config/mpd/playlists"
pid_file           "~/.config/mpd/pid"
state_file         "~/.config/mpd/state"
sticker_file       "~/.config/mpd/sticker.sql"

#run as current local user
#user                 "mpd"

#To change the volume for mpd independent from other programs
mixer_type            "software"

# for visualization
audio_output {
    type                    "fifo"
    name                    "my_fifo"
    path                    "/tmp/mpd.fifo"
    format                  "44100:16:2"
}
$ mpd config_file

if you got the following message: Failed to bind to '[::]:6600': Address already in use

$ sudo service mpd stop

https://wiki.archlinux.org/index.php/Ncmpcpp

$ cp /usr/share/doc/ncmpcpp/config ~/.ncmpcpp/
$ vim ~/.ncmpcpp/config
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_output_name = "my_fifo"
visualizer_sync_interval = "30" 
visualizer_in_stereo = "yes"
#visualizer_type = "wave" (spectrum/wave)
visualizer_type = "spectrum" (spectrum/wave)
$ ncmpcpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment