Mpd
Aus Gentoo Linux Wiki
| MPD | |
| Ein Musik Player
| |
| Entwickler | Warren Dukes |
| Kategorie | media-sound/mpd |
| Lizenz | GPL-2 |
| Webseite | www.musicpd.org |
Inhaltsverzeichnis |
[Bearbeiten] Was ist MPD
MPD steht für Music Player Daemon und erlaubt den Fernzugriff auf die Playlist bzw. das Eingreifen in das momentan gespielte Geschehen. MPD ist für die Integration eines Computers in ein Stereosystem bestimmt, welches das Steuern über das lokale Netzwerk erlaubt.
* media-sound/mpd
Latest version available: 0.11.5-r2
Latest version installed: 0.11.5-r2
Size of files: 1,101 kB
Homepage: http://www.musicpd.org
Description: Music Player Daemon (mpd)
License: GPL-2
[Bearbeiten] Features
MPD verfügt über folgende Features:
- Das abspielen von MP3, Ogg Vorbis, FLAC, MP4/AAC, Mod, und Wave Datein.
- Der Fernzugriff über das lokale Netzwerk per IPv4 und IPv6.
- Das abspielen von MP3 und Ogg Vorbis streams.
- Das Speichern ,Laden und Managen von Playlisten.
- Lautstärkeregler per OSS, Alsa, und Software Mixers.
um nur einige zu nennen :)
[Bearbeiten] Installation
Um MPD auf unserem System zu installieren, brauchen wir noch folgende USE Flags: ( falls noch nicht vorhanden, ab in die make.conf )
aac alsa audiofile flac mad unicode ipv6 mikmod vorbis
Diese USE Flags sind nötig, um auch alle Features benutzen zu können. Wenn das erledigt ist, reicht wie üblich ein:
emerge -av mpd
um MPD mit sammt all seinen Abhänigkeiten zu installieren. Ist dies geschehen können wir ans konfigurieren gehen.
[Bearbeiten] Konfigurieren
MPD verfügt über eine .conf Datei welche wir unter /etc/mpd.conf finden werden. Editieren können wir sie mit jedem Editor unserer Wahl, in diesen Fall wird nano benutzt:
nano -w /etc/mpd.conf
so zum Beispiel sieht meine mpd.conf aus:
| Datei: /etc/mpd.conf |
# MPD CONFIG FILE # For a full description of all config parameters, # Check the mpd man page, "man mpd". ##################### REQUIRED ########################### port "6600" music_directory "/home/metacom/musik" playlist_directory "/home/metacom/playlist" log_file "/var/log/mpd.log" error_file "/var/log/mpd.error.log" ########################################################## ########################################################## # EVERYTHING ELSE IS OPTIONAL ########################################################## ################# FILESYSTEM SETTINGS #################### # # If the names of files or directories are # not correctly displayed then set the # following to the filesystem coding. # # Usually this is either: # ISO-8859-1 or UTF-8 # # After changing the filesystem_charset # you will need to recreate the db: # mpd --create-db # #filesystem_charset "ISO-8859-1" # ########################################################## #################### OPTIONAL FILES ###################### # # Location of DB file # #db_file "~/.mpd/mpd.db" # # The state file (if set) will be a file # for storing all current information # (playlist, playing/paused, etc...) from # the last MPD session. This will be used # to recreate your last MPD session after # restart. # state_file "/var/lib/mpd/state" # ########################################################## ################### VOLUME MIXER ######################### # # Examples: # ALSA Mixer mixer_type "alsa" mixer_device "default" mixer_control "PCM" # # OSS Mixer #mixer_type "oss" #mixer_device "/dev/mixer" #mixer_control "PCM" # # Software Mixer #mixer_type "software" # ########################################################## ################## AUDIO OUTPUT ########################## # # OSS Audio Output #ao_driver "oss" #ao_driver_options "dsp=/dev/dsp" # # ALSA Audio Output ao_driver "alsa09" ao_driver_options "dev=hw:0,0" # # Set this if you have problems # playing audio files. # This will resample your music so # that it comes out at the set rate. # #audio_output_format "44100:16:2" # # You should not need mess with # this value unless you know # what you're doing. # #audio_write_size "1024" # ########################################################## ################# REPLAYGAIN ############################# # # Use Replay Gain (album or title) # http://www.replaygain.org # #replaygain "album" # # Sets the pre-amp used for files that have replaygain # info. Valid values are between -15 to 15 (in dB). # #replaygain_preamp "0" # ########################################################## ################ OUTPUT BUFFER SETTINGS ################## # # You should not need to mess with this # unless you know what you're doing. # #audio_buffer_size "2048" # # This means exactly what it says, it will # buffer your file up to the percentage of # the buffer before it begins playing. # #buffer_before_play "25%" # ########################################################## ################### HTTP PROXY ########################### # # http_proxy_host "proxy.isp.com" # http_proxy_port "8080" # http_proxy_user "user" # http_proxy_password "password" # ########################################################## ################# SECURITY SETTINGS ###################### # # It is encouraged to run MPD as # non-superuser. If you start mpd as root # (for example, in an init script), set # this value, then mpd will drop root priveleges # and runs as the user specified. # user "metacom" # # Set this value if you only have one # address you want to allow connection to. # bind_to_address "localhost" # # If you want to setup MPD to use # passwords set them here # #password "password1@read,add,control,admin" #password "password2@read" # # Specify permissions used by default when no password is # given by for a connection/client. # #default_permissions "read,add,control,admin" # ########################################## ################ MISCELLANEOUS OPTIONS ################### # # This setting exists as precaution against attacks. # #max_playlist_length "16384" # # Valid options are "default", "secure" or "verbose". #log_level "default" # #connection_timeout "60" # # This should be fine for 2-3 people using clients # at the same time. # #max_connections "5" # # No need to change these unless you know better. # #max_command_list_size "2048" #max_output_buffer_size "2048" # # This will make playlists compatible with normal music # players. # #save_absolute_paths_in_playlists "no" # ########################################################## |
ich bin der Meinung das ist Selbsterklärend. Wenn man anstatt Alsa ,Oss benutz sollte das so aussehen:
| Datei: /etc/mpd.conf |
################### VOLUME MIXER ######################### # # Examples: # ALSA Mixer #mixer_type "alsa" #mixer_device "default" #mixer_control "PCM" # # OSS Mixer mixer_type "oss" mixer_device "/dev/mixer" mixer_control "PCM" # # Software Mixer #mixer_type "software" # ########################################################## ################## AUDIO OUTPUT ########################## # # OSS Audio Output ao_driver "oss" ao_driver_options "dsp=/dev/dsp" # # ALSA Audio Output #ao_driver "alsa09" #ao_driver_options "dev=hw:0,0" # # Set this if you have problems # playing audio files. # This will resample your music so # that it comes out at the set rate. # #audio_output_format "44100:16:2" # # You should not need mess with # this value unless you know # what you're doing. # #audio_write_size "1024" # ########################################################## |
Wenn wir die Conf Datei editiert haben und die Musik im angegebenen Ordner liegt, brauchen wir nur noch eine Datenbank erzeugen, welches ganz einfach mit diesen Befehl geht:
mpd --create-db
Ist das alles erledigt, gehts ans starten.
[Bearbeiten] Starten
MPD starten wir per init Script :
/etc/init.d/mpd start
wer gerne möchte das dies beim Booten geschieht muss nur ein :
rc-update add mpd default
machen .
[Bearbeiten] Client
Nachdem das alles erledigt ist, brauchen wir noch einen Clienten. Und genau hier gibs die Qual der Wahl =). Ich persönlich benutze ncmpc, da ich gerne in der Konsole arbeite. Hier mal eine Auflistung aller mir bekannten Clients:
[Bearbeiten] Ncmpc
ist ein exzellenter curses basierender MPD Client.
* media-sound/ncmpc
Latest version available: 0.11.1-r1
Latest version installed: 0.11.1-r1
Size of files: 267 kB
Homepage: http://www.musicpd.org/?page=ncmpc
Description: A ncurses client for the Music Player Daemon (MPD)
License: GPL-2
[Bearbeiten] Installation
Installieren per:
emerge -s ncmpc
[Bearbeiten] Screen
[Bearbeiten] Mpc
Ein konsolenbasierter MPD Client.
* media-sound/mpc
Latest version available: 0.11.2-r1
Latest version installed: [ Not Installed ]
Size of files: 101 kB
Homepage: http://www.musicpd.org
Description: A commandline client for Music Player Daemon (media-sound/mpd)
License: GPL-2
[Bearbeiten] Installation
Installieren per:
emerge -s mpc
[Bearbeiten] Screen
[Bearbeiten] Cookies
Ein einfacher GTK2 Client geschrieben in C
[Bearbeiten] Installation
Installieren per:
svn co http://svn.syscrash.ca/cookies/trunk/ make && make install
Da es leider nicht im Portage ist.
[Bearbeiten] Screen
[Bearbeiten] Gmpc
Gnome Music Player Client
* media-sound/gmpc
Latest version available: 0.13.0
Latest version installed: [ Not Installed ]
Size of files: 465 kB
Homepage: http://cms.qballcow.nl/index.php?page=Gnome_Music_Player_Client
Description: A Gnome client for the Music Player Daemon.
License: GPL-2
[Bearbeiten] Installation
Installieren per:
emerge -av gmpc
[Bearbeiten] Screen
[Bearbeiten] Links
--metacOm 15:38, 10. Juli 2006 (GMT)




