Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is my little how-to file on getting MPD to finally goddamn work.
- For reference, I'm running Ubuntu 11.10 64-bit, using PulseAudio.
- - First step, make sure you've got mpd, mpc and pavucontrol installed.
- - Second, copy /etc/mpd.conf to ~/.mpdconf
- - Create a ~/.mpd directory. Inside that directory, create the files mpd.log,
- mpd.pid, mpdstate and mpddb. You could probably name mpddb something else.
- The command I used was 'touch {mpddb,mpd.log,mpd.pid,mpdstate}'
- - Create a playlist directory. I created mine in ~/audio/mp3/playlists, but
- you could just as easily (as well as perhaps more appropriately) create
- yours in ~/.mpd/playlists.
- - I'm not sure if this is necessary, as I did this before I commented out the
- relevant line in mpdconf. Regardless, if things don't work otherwise, give
- it a shot: If you're using a firewall/router, make sure you're forwarding
- port 6600 for mpd. My machine's on 192.168.1.104, so I did it for that IP
- address.
- - Editing .mpdconf: Most things in the conf file can be left alone. There
- are a few things that need to be changed, however. Open ~/.mpdconf in your
- text editor of choice and change the music_directory, playlist_directory,
- db_file, log_file, pid_file and state_file settings to their appropriate
- settings. music_directory might be /home/YOU/Music, for instance. If you've
- been following this text, then log_file (for example) would be in
- '/home/YOU/.mpd/mpd.log'.
- Make sure everything is commented out as you scroll down, until you get to the
- Input section. Mine was uncommented by default, so I just left it as-is. The
- exceptions being (and I can't quite remember 100%) the sections related to
- binding an address and what user MPD should run as. Make sure those are
- commented out.
- Scroll a little further to the Audio Output section. Comment out the ALSA
- section (all of it) and scroll down to the PulseAudio example. Uncomment the
- line with 'audio_output {', as well as the two below it. The lines with
- 'server' and 'sink' can stay commented. Uncomment the closing bracket and
- you're good. Here's what my section looks like:
- audio_output {
- type "pulse"
- name "MPD"
- # server "remote_server" # optional
- # sink "remote_server_sink" # optional
- }
- After that, scroll down to the Volume control mixer settings. You can leave
- this alone if you want, but I prefer to uncomment the software mixter_type line.
- This lets you adjust the volume with mpc.
- And now... you're done! There are a couple of other misc options (character
- encoding, etc.), but I just leave those alone.
- - Run mpd. Just typing 'mpd' should do the trick. It'll crunch some numbers
- for a few seconds while it's populating your database with songs from the
- directory you supplied in .mpdconf. It might give you some guff about
- 'corrupt database' or something. Just ignore that.
- - After it stops eating your CPU, see if mpc works. Try 'mpc listall'. If it
- lists some stuff, the battle's almost won. Now you need to add some of
- these things to a playlist.
- - To find an artist's songs, type 'mpc find artist <artist>'. For example, to
- find Radiohead songs, type mpc find artist Radiohead. To find and add these
- to a playlist at the same time, type mpc findadd artist Radiohead.
- - Type mpc play. It should start playing music now, though you probably won't
- hear anything. If you do: awesome. If you're like me, you need to run
- 'pavucontrol', look in the Playback tab, make sure it's showing Applications
- (drop-down menu near the bottom of the window), and adjust the Music Play Daemon
- section. What I had to do was click the box next to the little volume meter for
- that channel, and select 'Internal Audio Analog Stereo', though you might need
- to pick something else.
- And now... you should hear the music playing. Congratulations, you're done.
- Check 'man mpc' to get an idea of the other commands and how to manipulate
- playlists. I'm still new to this myself, so I barely know what I'm doing.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement