[SOLVED] MPD: empty playlist
Hi,
I just installed and configured MPD, but I'm not able to play anything. There are simply no items in my playlist. This is what I did so far:
- I installed MPD using pacman
- I adjusted /etc/mpd.conf according to the official wiki. This is what it looks like atm:
music_directory "/home/sigma/music2"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd/mpd.pid"
state_file "/var/lib/mpd/mpdstate"
user "mpd"
input {
plugin "curl"
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
I checked that any file and directory existed. I put 2 mp3's in the directory /home/sigma/music2. I added the section audio_output after I saw it didn't work. You can't find that at the arch linux wiki, but here.
- I started mpd: '/etc/rc.d/mpd start'
- I started ncmpcpp and pressed 'u' for a database update.
Unfortunately, there are still no items in my playlist.
Last edited by sigma91 (2010-12-27 12:07:53)
skottish wrote:
I set mine up as my user instead of the mpd user. This is all of the uncommented stuff:
music_directory "~/music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/state"
user "skottish"
bind_to_address "127.0.0.1"
bind_to_address "/home/skottish/.mpd/socket"
input {
plugin "curl"
and this is exactly how it should be done. using the "mpd" user and having the music in your own users home folder is plain stupid. The wiki should really highlight this. I will probably change it later today.
Last edited by Rasi (2010-12-27 08:30:34)
Similar Messages
-
[SOLVED] Mpd and sonata doesn't seem to work
Hi guys!
I 'm facing with an issue . I can't seem to configure mpd correctly to run it with sonata .
I've followed the alternative setup from archwiki and this is my config file .
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "/home/andreas/Downloads/Torrents"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
playlist_directory "/home/andreas/.mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "/home/andreas/.mpd/mpd.db"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
log_file "/home/andreas/.mpd/mpd.log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "/home/andreas/.mpd/mpd.pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "/home/andreas/.mpd/mpdstate"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
user "andreas"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
#bind_to_address "any"
# And for Unix Socket
#bind_to_address "~/.mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
#gapless_mp3_playback "yes"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. Optionally, 'comment' can be added to this
# list.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Input #######################################################################
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
# other audio outputs.
# An example of an ALSA output:
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## format "44100:16:2" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## format "44100:16:2" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# 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"
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#audio_output {
# type "pulse"
# name "My Pulse Output"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# This setting will change all decoded audio to be converted to the specified
# format before being passed to the audio outputs. By default, this setting is
# disabled.
#audio_output_format "44100:16:2"
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Volume control mixer ########################################################
# These are the global volume control settings. By default, this setting will
# be detected to the available audio output device, with preference going to
# hardware mixing. Hardware and software mixers for individual audio_output
# sections cannot yet be mixed.
# An example for controlling an ALSA, OSS or Pulseaudio mixer; If this
# setting is used other sound applications will be affected by the volume
# being controlled by MPD.
#mixer_type "hardware"
# An example for controlling all mixers through software. This will control
# all controls, even if the mixer is not supported by the device and will not
# affect any other sound producing applications.
#mixer_type "software"
# This example will not allow MPD to touch the mixer at all and will disable
# all volume controls.
#mixer_type "disabled"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "album" or "track". See <http://www.replaygain.org> for more
# details. This setting is disabled by default.
#replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#replaygain_preamp "0"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "2048"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting. After modification of this setting mpd
# --create-db must be run to change the database.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
#id3v1_encoding "ISO-8859-1"
All the files required are in my /home/andreas/.mpd/ directory
config
mpd.db
mpd.error
mpd.log
mpd.pid
mpdstate
playlists
I've also added to my .xinitrc file
mpd /home/andreas/.mpd/config
I 'm sure i've done something wrong but don't know what it is . If anyone could help me out i would be grateful
THanks a for all your help!
Last edited by shak (2010-04-19 23:08:09)shak wrote:
I've followed the first method with the mpd daemon and everything worked fine .
THanks for all your help everyone !
The add of MPD : ALL to hosts.allow seems to solved it .
Thanks again!
Nice.
Please mark threads as [SOLVED] when they are. You can do so by editing the opening post. -
[SOLVED]mpd does not detect the music directory
I recently installed mpd with the gmpc gui, set my "music_directory" in /etc/mpd.conf to the location of all of my music (which contains lots of other folders and subfolders), but there's no listing of the audio files in the database in gmpc.
Here's the /etc/mpd.conf if that helps:
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "/var/lib/mpd/music"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
playlist_directory "/var/lib/mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "/var/lib/mpd/mpd.db"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
log_file "/var/log/mpd/mpd.log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "/var/run/mpd/mpd.pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "/var/lib/mpd/mpdstate"
# The location of the sticker database. This is a database which
# manages dynamic information attached to songs.
#sticker_file "~/.mpd/sticker.sql"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
user "mpd"
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#group "nogroup"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
#bind_to_address "any"
# And for Unix Socket
#bind_to_address "~/.mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
#gapless_mp3_playback "yes"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. Optionally, 'comment' can be added to this
# list.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
#auto_update "yes"
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself. There is no limit by default.
#auto_update_depth "3"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Input #######################################################################
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
# other audio outputs.
# An example of an ALSA output:
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## format "44100:16:2" # optional
## mixer_type "hardware" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## format "44100:16:2" # optional
## mixer_type "hardware" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
## mixer_type "software" # optional
# An example of a recorder output:
#audio_output {
# type "recorder"
# name "My recorder"
# encoder "vorbis" # optional, vorbis or lame
# path "/var/lib/mpd/recorder/mpd.ogg"
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# max_clients "0" # optional 0=no limit
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
audio_output {
type "pulse"
name "My Pulse Output"
server "remote_server" # optional
sink "remote_server_sink" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# mixer_type "none" # optional
# This setting will change all decoded audio to be converted to the specified
# format before being passed to the audio outputs. By default, this setting is
# disabled.
#audio_output_format "44100:16:2"
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album" or "track". See <http://www.replaygain.org>
# for more details. This setting is off by default.
#replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#replaygain_preamp "0"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "2048"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
#id3v1_encoding "ISO-8859-1"
# SIDPlay decoder #############################################################
# songlength_database:
# Location of your songlengths file, as distributed with the HVSC.
# The sidplay plugin checks this for matching MD5 fingerprints.
# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
# default_songlength:
# This is the default playing time in seconds for songs not in the
# songlength database, or in case you're not using a database.
# A value of 0 means play indefinitely.
# filter:
# Turns the SID filter emulation on or off.
#decoder {
# plugin "sidplay"
# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt"
# default_songlength "120"
# filter "true"
Last edited by vlad951 (2011-05-07 09:36:11)vlad951 wrote:
Thanks, I successfully launched mpd as a user and it detected all of my music. However, if I launch mpd with the mpd.conf that I created in my home directory, it launches, but outputs the following:
[vladislav@vladislav .mpd]$ mpd ~/.mpd/mpd.conf
listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
Is this normal?
*sigh* i answer this for the 3rd time in a row... this is no error it just says that binding to your ipv6 interface happened before the binding to ipv4.
If you want to use your ipv4 interface hardcode it in mpd.conf
bind_to_address "127.0.0.1"
you can also have several binds:
bind_to_address "127.0.0.1"
bind_to_address "192.168.1.13"
to make it listen on localhost and the external IP of your network card.
If your music is on the same machine as your mpd i recommend to use a unix socket in addition.
bind_to_address "/path/to/some/file/that/does/not/exist/yet"
and make your client connect to that file instead of the IP. Speeds things up a log e.g. in ncmpcpp
and btw: you can save your mpd.conf file as ~/.mpdconf and mpd will automatically use it.
Last edited by Rasi (2011-05-07 08:41:30) -
[SOLVED]MPD, PulseAudio & Systemd/User
Since the advent of skype 4.3 I've had to switch to using pulseaudio. Things seems to be working fine except for the interaction between pulseaudio and mpd. My goal is to attain the same functionality as I had before when I was just using alsa. The main problem seems to be that the mpd daemon starts before pulseaudio. This means that when I reboot, for example, my music doesn't automatically keep playing. However if I toggle mpc (or open ncmpcpp and unpause) then it works fine.
What I have done
1) I installed mpd using the script found on the wiki
1a) copied ~/.config/mpd/mpd.conf to /etc/mpd.conf and uncomment #user line so it runs as my user
1b) enabled the mpd service with systemctl so it starts on boot, as directed to from 1)
2) Applied the workaround detailed here to make pulseaudio play nice with mpd
From what I can understand this results in the mpd daemon using the /etc/mpd.conf file which mirrors my local one (but I think the process is still started as root?)
If I don't do 2) then I get a problem where if I try to open pavucontrol I get an error saying I'm unable to connect and the system feels very unresponsive. Two second delays navigating around in thunar for example.
fuser /dev/snd/* outputs
» sudo fuser /dev/snd/*
/dev/snd/controlC0: 440
/dev/snd/controlC1: 440
/dev/snd/pcmC0D0p: 440m
» ps aux | grep 440
quiv 440 1.2 0.1 495964 13248 ? Sl 15:16 0:05 /usr/bin/pulseaudio --start --log-target=syslog
quiv 2259 0.0 0.0 11668 2296 pts/0 S+ 15:23 0:00 grep --color=auto 440
For now I have added in
if grep -q "state: pause" /home/quiv/.config/mpd/state; then
mpc toggle
fi
to my ~/.xinitrc as a work around to get pulse and mpd to work together properly. However it doesn't seem to work all the time. If I leave my music playing then when I reboot the system with reboot it seems that somtimes the state is being saved as paused, and other times as play. I suppose I could just mpc toggle without checking, but I don't want a situation where if I happen to not be playing music that every time I reboot my music starts playing.
Other things I have tried are;
A) not using pulseaudio with mpd.
B) not using systemd to manage mpd. Instead I manually started it in .xinitrc and pointed it to my ~/.config/mpd/mpd.conf file. I believe this means it runs as my own user instead of as root. When I did this I commented the username line and also undid 2) from above in ~/.config/mpd/mpd.conf
The problem with A) is that if I use alsa with mpd, mpd hogs my soundcard. My card becomes unselectable in pavucontrol and I cannot use it with pulseaudio., meanng no skype. The benefit of doing this (this is how I used to do it before I needed pulseaudio) is I have no problems with mpd's state being saved incorrectly.
The problem with B) is the mpdstate is saved incorrectly when for example I issue reboot. I can reproduce this by changing my currently played song then rebooting. When I boot back up mpd resumes playback from the previous session instead of recognizing the last thing I was playing. I had a search around on the forums and I found this issue which seems to describe what is happening. There doesn't seem to be a solution there instead a suggestion to user systemd (which I would like to do!) instead to manage mpd. Rasi's post details a unit file but I'm unsure what to do with this.
Looking at the wiki it seems like maybe I am supposed to provide this file so that it overwrites the default mpd.service unit. So I followed the steps listed there. First I created the directory /etc/systemd/system/mpd.d/ then made the user.conf file inside. I tried just putting the additional arguments in
[Service]
User=YOUR_USER
PAMName=system-local-login
I also remember trying to overwrite the entire [Service] section of the original by using
[Service]
User=YOUR_USER
PAMName=system-local-login
ExecStart=
ExecStart=/usr/bin/mpd --no-daemon
because I think just adding the addtional parameters might not have worked. But I'm not sure on this point, maybe both ways worked. This seemed to work but I had the same problem as above. The state was still being saved incorrectly sometimes when I rebooted. I would get a previous session instead of the most recent change. So I tried the other method for overwriting systemd unit files and made the file /etc/systemd/system/mpd.service in which I pasted Rasi's entire unit file. This also seemed to work, but still the incorrect state problem happened.
At this point I didn't know what to try. It seemed like the only option left was to set up mpd using a local configuration and setting up a systemd/User session and managing it that way. The wiki indiciated that if I did it this way I would not have to use the method 2) above. However I was/still am hesistant about doing this. I'm new to arch and the systemd/User wiki page seems very intimidating. I worry that I will create problems that I won't understand how to solve using this method just for the chance that mpd will function correclty with pulse. However I seemed to have exhausted all my possible options so I thought whatever I'll try it anyway! I'm certain I probably haven't done it right however.
So once again I turned to the wiki to help me with setting this up. However I can't make sense of the article. I don't know if I should follow ONLY the Setup since systemd 206 or if I should follow both setup sections? I decided to follow only the first section. I use no DE so I commented out the
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
line in my ~/.zprofile. When I set up my system I followed the Automatic login to virtual console. I left this file alone, but upon second thoughts maybe I should have disabled this too? I don't understand if using xlogin-git to austoart Xorg, as described in the systemd/User page, requires me to get rid of this too. I think xlogin-git just starts Xorg so automatic login via getty should be fine?
Immediately when I boot in using systemd to manage my session I notice that there are problems. I don't think my environment variables are being sourced from .zshenv because my panel fails to load. If I kill the panel and load it again it works. This makes me think there is something wrong with the order of units started with systemd.
» sudo journalctl --this-boot --no-pager | grep -i panel ~
Jul 05 16:25:39 lorelai bash[494]: /home/quiv/.config/bspwm/panel/panel: line 16: : No such file or directory
Jul 05 16:25:39 lorelai bash[494]: /home/quiv/.config/bspwm/panel/panel: line 17: : No such file or directory
Jul 05 16:25:39 lorelai bash[494]: /home/quiv/.config/bspwm/panel/panel: line 18: : No such file or directory
In each instance panel is trying to do things based on $PANEL_FIFO which is exported from ~/.zshenv but it doesn't appear to be set at the time systemd starts things up. Apart from these problems, which are probably undoubtedly due to the fact I failed to set up systemd/User properly, I still have problems with mpd. The state seems to be remembered correctly now, however when I reboot I still have to toggle mpc for it to start playback. It seems to be the same problem as when I use setup detailed intially. I suspect perhaps once again there is something wrong with the order here. MPD starts before pulse so it doesn't find anything to play through, then once I issue the mpc toggle command pulse is started and all is happy.
A final note is that I was getting this error yesterday when using systemd/User
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/system/mpd.service; enabled)
Active: inactive (dead)
Jul 05 03:11:41 lorelai pulseaudio[450]: [pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jul 05 03:11:41 lorelai pulseaudio[450]: [pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: "channels=2"): initialization failed.
Jul 05 03:11:41 lorelai pulseaudio[450]: [pulseaudio] main.c: Module load failed.
Jul 05 03:13:35 lorelai systemd[1]: Stopping Music Player Daemon...
Jul 05 03:13:35 lorelai systemd[1]: Stopped Music Player Daemon.
but it doesn't seem to happen anymore.
Also I have no idea if I'm even supposed to use it like this but
» sudo systemctl --user enable mpd ~
Failed to get D-Bus connection: Connection refused
I tried this because I was wondering if mpd was even using the correct service when using systemd/User. I thought perhaps it just was using the one in /etc/systemd/system/ instead of /usr/lib/systemd/user/. I'm still not sure about this.
In the end I've exhausted whatever I can think of. I'm sure I've done a lot of things wrong but I tried my best. Hopefully somebody knows what I've done wrong and can help me.
~/.config/mpd/mpd.conf
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "~/Music"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
playlist_directory "~/.config/mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "~/.config/mpd/database"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
log_file "~/.config/mpd/log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "~/.config/mpd/pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "~/.config/mpd/state"
# The location of the sticker database. This is a database which
# manages dynamic information attached to songs.
sticker_file "~/.config/mpd/sticker.sql"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#user "quiv"
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#group "nogroup"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
bind_to_address "127.0.0.1"
# And for Unix Socket
bind_to_address "~/.config/mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
gapless_mp3_playback "yes"
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#restore_paused "no"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. The complete list of possible values can be
# found in the mpd.conf man page.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
auto_update "yes"
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself. There is no limit by default.
auto_update_depth "3"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Database #######################################################################
#database {
# plugin "proxy"
# host "other.mpd.host"
# port "6600"
# Input #######################################################################
input {
plugin "curl"
proxy "proxy.isp.com:8080"
proxy_user "user"
proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# An example of an ALSA output:
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## mixer_type "hardware" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
audio_output {
type "pulse"
name "pulse audio"
format "48000:16:2"
## server "127.0.0.1"
## sink "remote_server_sink" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## mixer_type "hardware" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## url "http://example.com" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
## mixer_type "software" # optional
# An example of a recorder output:
#audio_output {
# type "recorder"
# name "My recorder"
# encoder "vorbis" # optional, vorbis or lame
# path "/var/lib/mpd/recorder/mpd.ogg"
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# max_clients "0" # optional 0=no limit
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#audio_output {
# type "pulse"
# name "My Pulse Output"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
# An example of a winmm output (Windows multimedia API).
#audio_output {
# type "winmm"
# name "My WinMM output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
# or
## device "0" # optional
## mixer_type "hardware" # optional
# An example of an openal output.
#audio_output {
# type "openal"
# name "My OpenAL output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# mixer_type "none" # optional
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <http://www.replaygain.org> for more details about ReplayGain.
# This setting is off by default.
replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
replaygain_preamp "0"
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#replaygain_missing_preamp "0"
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#replaygain_limit "yes"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "4096"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
#id3v1_encoding "ISO-8859-1"
# SIDPlay decoder #############################################################
# songlength_database:
# Location of your songlengths file, as distributed with the HVSC.
# The sidplay plugin checks this for matching MD5 fingerprints.
# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
# default_songlength:
# This is the default playing time in seconds for songs not in the
# songlength database, or in case you're not using a database.
# A value of 0 means play indefinitely.
# filter:
# Turns the SID filter emulation on or off.
#decoder {
# plugin "sidplay"
# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt"
# default_songlength "120"
# filter "true"
/etc/mpd.config
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "~/Music"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
playlist_directory "~/.config/mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "~/.config/mpd/database"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
log_file "~/.config/mpd/log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "~/.config/mpd/pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "~/.config/mpd/state"
# The location of the sticker database. This is a database which
# manages dynamic information attached to songs.
sticker_file "~/.config/mpd/sticker.sql"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
user "quiv"
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#group "nogroup"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
bind_to_address "127.0.0.1"
# And for Unix Socket
bind_to_address "~/.config/mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
gapless_mp3_playback "yes"
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#restore_paused "no"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. The complete list of possible values can be
# found in the mpd.conf man page.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
auto_update "yes"
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself. There is no limit by default.
auto_update_depth "3"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Database #######################################################################
#database {
# plugin "proxy"
# host "other.mpd.host"
# port "6600"
# Input #######################################################################
input {
plugin "curl"
proxy "proxy.isp.com:8080"
proxy_user "user"
proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# An example of an ALSA output:
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## mixer_type "hardware" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
audio_output {
type "pulse"
name "pulse audio"
format "48000:16:2"
server "127.0.0.1"
## sink "remote_server_sink" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## mixer_type "hardware" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## url "http://example.com" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
## mixer_type "software" # optional
# An example of a recorder output:
#audio_output {
# type "recorder"
# name "My recorder"
# encoder "vorbis" # optional, vorbis or lame
# path "/var/lib/mpd/recorder/mpd.ogg"
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# max_clients "0" # optional 0=no limit
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#audio_output {
# type "pulse"
# name "My Pulse Output"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
# An example of a winmm output (Windows multimedia API).
#audio_output {
# type "winmm"
# name "My WinMM output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
# or
## device "0" # optional
## mixer_type "hardware" # optional
# An example of an openal output.
#audio_output {
# type "openal"
# name "My OpenAL output"
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# mixer_type "none" # optional
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <http://www.replaygain.org> for more details about ReplayGain.
# This setting is off by default.
replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
replaygain_preamp "0"
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#replaygain_missing_preamp "0"
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#replaygain_limit "yes"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "4096"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
#id3v1_encoding "ISO-8859-1"
# SIDPlay decoder #############################################################
# songlength_database:
# Location of your songlengths file, as distributed with the HVSC.
# The sidplay plugin checks this for matching MD5 fingerprints.
# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
# default_songlength:
# This is the default playing time in seconds for songs not in the
# songlength database, or in case you're not using a database.
# A value of 0 means play indefinitely.
# filter:
# Turns the SID filter emulation on or off.
#decoder {
# plugin "sidplay"
# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt"
# default_songlength "120"
# filter "true"
/etc/X11/xinit/xinitrc.d/pulseaudio [not sure if I even need this?]
#!/bin/bash
case "$DESKTOP_SESSION" in
gnome|kde*|xfce*) # PulseAudio is started via XDG Autostart
# Extra checks in case DESKTOP_SESSION is not set correctly
if [[ -z $KDE_FULL_SESSION && -z $GNOME_DESKTOP_SESSION_ID ]]; then
/usr/bin/start-pulseaudio-x11
fi
esac
/etc/pulse/daemon.conf
# This file is part of PulseAudio.
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out. Use either ; or # for
## commenting.
; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no
; high-priority = yes
; nice-level = -11
; realtime-scheduling = yes
; realtime-priority = 5
exit-idle-time=0
; exit-idle-time = 20
; scache-idle-time = 20
; dl-search-path = (depends on architecture)
; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa
; log-target = auto
log-level = error
; log-meta = no
; log-time = no
; log-backtrace = 0
resample-method = speex-float-7
; enable-remixing = yes
; enable-lfe-remixing = no
flat-volumes = no
; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 1000000
default-sample-format = s24le
default-sample-rate = 48000
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 76
; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0
/etc/pulse/default.pa
#!/usr/bin/pulseaudio -nF
# This file is part of PulseAudio.
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)
.nofail
### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
.fail
### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties
### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available
### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink
### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif
### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif
### Automatically load driver modules for Bluetooth hardware
#.ifexists module-bluetooth-policy.so
#load-module module-bluetooth-policy
#.endif
#.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover
#.endif
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
#load-module module-zeroconf-publish
### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv
### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore
### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams
### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink
### Honour intended role device property
load-module module-intended-roles
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
### Enable positioned event sounds
load-module module-position-event-sounds
### Cork music/video streams when a phone stream is active
load-module module-role-cork
### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply
# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.
### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system
### Register ourselves in the X11 session manager
#load-module module-x11-xsmp
### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif
### Make some devices default
#set-default-sink output
#set-default-source input
~/.xinitrc [currently using daemon mpd]
#!/bin/sh
# ~/.xinitrc
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
#if grep -q "state: pause" /home/quiv/.config/mpd/state; then
# mpc toggle
#fi
#mpd ~/.config/mpd/mpd.conf
~/.config/bspwm/panel/notify_mpd
xrdb ~/.Xresources
xset +fp ~/.fonts
xset +fp /usr/share/fonts/misc
xset fp rehash
xsetroot -cursor_name left_ptr &
# imlibsetroot -x e -s f /home/quiv/Pictures/bloom_one_desktop.jpg
sh ~/.fehbg &
compton -CGb --backend glx --paint-on-overlay --vsync opengl-swc &
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
sxhkd &
exec bspwm
~/.zprofile [currently trying to use systemd/User]
#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
EDIT:A small update; it seems I don't need to have /etc/systemd/system/[email protected]/autologin.conf when using systemd to manag my user session as I removed it and I'm both automatically logged on and in X-session.
Last edited by quiv (2014-07-05 13:40:30)o_caino wrote:
Setting mpd as a systemd user service is very simple. This is what I did.
In ~/.config/systemd/user/mpd.service
[Unit]
Description=Music Player Daemon
After=network.target sound.target
[Service]
ExecStart=/usr/bin/mpd --no-daemon
ExecStop=/usr/bin/mpd --kill
[Install]
WantedBy=default.target
To enable
systemctl --user enable mpd
Done.
Well shit. I guess I didn't need to do all that other stuff. I only wish I'd known about this before wasting most of my day. Thank you very much, everything appears to be working flawlessly now. -
[SOLVED] mpd and sonata issue
Hi again!
I've installed mpd and sonata but i don't see my library in sonata .
This is my /etc/mpd.conf file
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "/home/andreas/Downloads"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#playlist_directory "~/.mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "/var/lib/mpd/mpd.db"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
log_file "/var/log/mpd/mpd.log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "/var/run/mpd/mpd.pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "/var/lib/mpd/mpdstate"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
user "mpd"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
#bind_to_address "any"
# And for Unix Socket
#bind_to_address "~/.mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
#gapless_mp3_playback "yes"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. Optionally, 'comment' can be added to this
# list.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Input #######################################################################
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
# other audio outputs.
# An example of an ALSA output:
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## format "44100:16:2" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## format "44100:16:2" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# 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"
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#audio_output {
# type "pulse"
# name "My Pulse Output"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# This setting will change all decoded audio to be converted to the specified
# format before being passed to the audio outputs. By default, this setting is
# disabled.
#audio_output_format "44100:16:2"
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Volume control mixer ########################################################
# These are the global volume control settings. By default, this setting will
# be detected to the available audio output device, with preference going to
# hardware mixing. Hardware and software mixers for individual audio_output
# sections cannot yet be mixed.
# An example for controlling an ALSA, OSS or Pulseaudio mixer; If this
# setting is used other sound applications will be affected by the volume
# being controlled by MPD.
#mixer_type "hardware"
# An example for controlling all mixers through software. This will control
# all controls, even if the mixer is not supported by the device and will not
# affect any other sound producing applications.
#mixer_type "software"
# This example will not allow MPD to touch the mixer at all and will disable
# all volume controls.
#mixer_type "disabled"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "album" or "track". See <http://www.replaygain.org> for more
# details. This setting is disabled by default.
#replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#replaygain_preamp "0"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "2048"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting. After modification of this setting mpd
# --create-db must be run to change the database.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
#id3v1_encoding "ISO-8859-1"
I've add the mpd daemon in rc.conf and i've chosen my directory /home/andreas/Downloads in sonata .Also i put mpd:ALL to etc/hosts.allow
Sonata connects fine to the server but i can't see my libary .
What might be the issue ?
Thanks again
Last edited by shak (2010-06-10 11:27:13)If you continue to have issues with permissions, the solution i use is to simply run MPD as my normal user, storing all the necessary directories and files under ~/.mpd and just pointing it at the config file I stuck there:
$ mpd ~/.mpd/config
No more permissions issues! There's an explanation of this in the wiki. -
[Solved] mpd + flash(?) = CRASH
When i open some audio|video.flash (ex: youtube) in any browser i have to stopped mpd to get audio.
Ok, but when the video has finished and stopped i can't start again or 'unpause' a song in mpd, i have to close the whole browser and even sometimes restart the mpd daemon
How must i configure my mpd?
I'm using ALSA.
My conf:
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "/home/ramon/Musica"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
playlist_directory "/home/ramon/.mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "/home/ramon/.mpd/mpd.db"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
log_file "/home/ramon/.mpd/mpd.log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "/home/ramon/.mpd/mpd.pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "/var/lib/mpd/mpdstate"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
user "ramon"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
bind_to_address "localhost"
# And for Unix Socket
#bind_to_address "~/.mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
#gapless_mp3_playback "yes"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. Optionally, 'comment' can be added to this
# list.
metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Input #######################################################################
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
# other audio outputs.
# An example of an ALSA output:
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
mixer_device "default" # optional
mixer_control "PCM" # optional
mixer_index "0" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
# device "/dev/dsp" # optional
# format "44100:16:2" # optional
# mixer_device "/dev/mixer" # optional
# mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
# protocol "icecast2" # optional
# user "source" # optional
# description "My Stream Description" # optional
# genre "jazz" # optional
# public "no" # optional
# timeout "2" # optional
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# 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"
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#audio_output {
# type "pulse"
# name "My Pulse Output"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# This setting will change all decoded audio to be converted to the specified
# format before being passed to the audio outputs. By default, this setting is
# disabled.
#audio_output_format "44100:16:2"
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Volume control mixer ########################################################
# These are the global volume control settings. By default, this setting will
# be detected to the available audio output device, with preference going to
# hardware mixing. Hardware and software mixers for individual audio_output
# sections cannot yet be mixed.
# An example for controlling an ALSA, OSS or Pulseaudio mixer; If this
# setting is used other sound applications will be affected by the volume
# being controlled by MPD.
#mixer_type "hardware"
# An example for controlling all mixers through software. This will control
# all controls, even if the mixer is not supported by the device and will not
# affect any other sound producing applications.
mixer_type "software"
# This example will not allow MPD to touch the mixer at all and will disable
# all volume controls.
#mixer_type "disabled"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "album" or "track". See <http://www.replaygain.org> for more
# details. This setting is disabled by default.
#replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#replaygain_preamp "0"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "2048"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting. After modification of this setting mpd
# --create-db must be run to change the database.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
id3v1_encoding "ISO-8859-1"
Last edited by teh (2009-10-26 08:28:11)# ALSA library configuration file
# pre-load the configuration files
@hooks [
func load
files [
"/etc/asound.conf"
"~/.asoundrc"
errors false
# load card-specific configuration files (on request)
cards.@hooks [
func load
files [
@func concat
strings [
{ @func datadir }
"/cards/aliases.conf"
func load_for_all_cards
files [
@func concat
strings [
{ @func datadir }
"/cards/"
{ @func private_string }
".conf"
errors false
# defaults
# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off
defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
# truncate files via file or tee PCM
defaults.pcm.file_format "raw"
defaults.pcm.file_truncate true
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0
# PCM interface
# redirect to load-on-demand extended pcm definitions
pcm.cards cards.pcm
pcm.default cards.pcm.default
pcm.front cards.pcm.front
pcm.rear cards.pcm.rear
pcm.center_lfe cards.pcm.center_lfe
pcm.side cards.pcm.side
pcm.surround40 cards.pcm.surround40
pcm.surround41 cards.pcm.surround41
pcm.surround50 cards.pcm.surround50
pcm.surround51 cards.pcm.surround51
pcm.surround71 cards.pcm.surround71
pcm.iec958 cards.pcm.iec958
pcm.spdif iec958
pcm.hdmi cards.pcm.hdmi
pcm.dmix cards.pcm.dmix
pcm.dsnoop cards.pcm.dsnoop
pcm.modem cards.pcm.modem
pcm.phoneline cards.pcm.phoneline
pcm.hw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
default {
@func refer
name defaults.pcm.card
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_PCM_DEVICE
default {
@func refer
name defaults.pcm.device
@args.SUBDEV {
type integer
default {
@func refer
name defaults.pcm.subdevice
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
show {
@func refer
name defaults.namehint.extended
description "Direct hardware device without any conversions"
pcm.plughw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
default {
@func refer
name defaults.pcm.card
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_PCM_DEVICE
default {
@func refer
name defaults.pcm.device
@args.SUBDEV {
type integer
default {
@func refer
name defaults.pcm.subdevice
type plug
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
show {
@func refer
name defaults.namehint.extended
description "Hardware device with all software conversions"
pcm.plug {
@args [ SLAVE ]
@args.SLAVE {
type string
type plug
slave.pcm $SLAVE
pcm.shm {
@args [ SOCKET PCM ]
@args.SOCKET {
type string
@args.PCM {
type string
type shm
server $SOCKET
pcm $PCM
pcm.tee {
@args [ SLAVE FILE FORMAT ]
@args.SLAVE {
type string
@args.FILE {
type string
@args.FORMAT {
type string
default {
@func refer
name defaults.pcm.file_format
type file
slave.pcm $SLAVE
file $FILE
format $FORMAT
truncate {
@func refer
name defaults.pcm.file_truncate
pcm.file {
@args [ FILE FORMAT ]
@args.FILE {
type string
@args.FORMAT {
type string
default {
@func refer
name defaults.pcm.file_format
type file
slave.pcm null
file $FILE
format $FORMAT
truncate {
@func refer
name defaults.pcm.file_truncate
pcm.null {
type null
hint {
show {
@func refer
name defaults.namehint.basic
description "Discard all samples (playback) or generate zero samples (capture)"
# Control interface
ctl.default {
type hw
card {
@func getenv
vars [
ALSA_CTL_CARD
ALSA_CARD
default {
@func refer
name defaults.ctl.card
ctl.hw {
@args [ CARD ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_CTL_CARD
ALSA_CARD
default {
@func refer
name defaults.ctl.card
type hw
card $CARD
ctl.shm {
@args [ SOCKET CTL ]
@args.SOCKET {
type string
@args.CTL {
type string
type shm
server $SOCKET
ctl $CTL
# RawMidi interface
rawmidi.default {
type hw
card {
@func getenv
vars [
ALSA_RAWMIDI_CARD
ALSA_CARD
default {
@func refer
name defaults.rawmidi.card
device {
@func igetenv
vars [
ALSA_RAWMIDI_DEVICE
default {
@func refer
name defaults.rawmidi.device
rawmidi.hw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_RAWMIDI_CARD
ALSA_CARD
default {
@func refer
name defaults.rawmidi.card
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_RAWMIDI_DEVICE
default {
@func refer
name defaults.rawmidi.device
@args.SUBDEV {
type integer
default -1
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
description "Direct rawmidi driver device"
device $DEV
rawmidi.virtual {
@args [ MERGE ]
@args.MERGE {
type string
default 1
type virtual
merge $MERGE
# Sequencer interface
seq.default {
type hw
seq.hw {
type hw
# HwDep interface
hwdep.default {
type hw
card {
@func getenv
vars [
ALSA_HWDEP_CARD
ALSA_CARD
default {
@func refer
name defaults.hwdep.card
device {
@func igetenv
vars [
ALSA_HWDEP_DEVICE
default {
@func refer
name defaults.hwdep.device
hwdep.hw {
@args [ CARD DEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_HWDEP_CARD
ALSA_CARD
default {
@func refer
name defaults.hwdep.card
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_HWDEP_DEVICE
default {
@func refer
name defaults.hwdep.device
type hw
card $CARD
device $DEV
# Timer interface
timer_query.default {
type hw
timer_query.hw {
type hw
timer.default {
type hw
class {
@func refer
name defaults.timer.class
sclass {
@func refer
name defaults.timer.sclass
card {
@func refer
name defaults.timer.card
device {
@func refer
name defaults.timer.device
subdevice {
@func refer
name defaults.timer.subdevice
hint.description "Default direct hardware timer device"
timer.hw {
@args [ CLASS SCLASS CARD DEV SUBDEV ]
@args.CLASS {
type integer
default {
@func refer
name defaults.timer.class
@args.SCLASS {
type integer
default {
@func refer
name defaults.timer.sclass
@args.CARD {
type string
default {
@func refer
name defaults.timer.card
@args.DEV {
type integer
default {
@func refer
name defaults.timer.device
@args.SUBDEV {
type integer
default {
@func refer
name defaults.timer.subdevice
type hw
class $CLASS
sclass $SCLASS
card $CARD
device $DEV
subdevice $SUBDEV -
How to create an Empty Playlist File on Mac?
Hello everyone, I'm working on a Music Player script, I was able to play a file via the default player as when we doubleclick on a file. The problem is I have no control over the Player, so to "stop" a file I could play a "silent" mp3, one with 1 second of silence in it for example. I discarded the idea since I had to distribute this silent.mp3 file along with the script. A better option is to play a "playlist", since playlist files are text only, I could create them an empty playlist file on the fly...
so, the question is, what's the default playlist extension on a mac? and how to create one on the Mac?
in windows the default player is Windows Media Player, the default playlist file extension is *.wpl.
here's the contents of an empty playlist
<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player -- 12.0.7601.18150"/>
<meta name="ItemCount" content="0"/>
<title>empyPlaylist</title>
</head>
</smil>
here's the script, so far Windows only, at least to stop the file being played.
// script.name = musicPlayer_Windows.jsx;
// script.needs = I need to create an Empty Playlist File for the Mac, that will play on the default music player when executed
// carlos canto, 10/12/2014
var w = new Window('dialog', 'Music Player');
var btnFile = w.add('button', undefined, 'Select an *.mp3 file to play...');
var lblSong = w.add('edittext', undefined, '');
lblSong.characters = 30;
var btnPlay = w.add('button', undefined, 'Play');
var btnStop = w.add('button', undefined, 'Stop');
var btnClose = w.add('button', undefined, 'Close');
btnPlay.enabled = btnStop.enabled = false;
var emptyPlaylist = getEmptyPlaylist ();
btnFile.onClick = function () {
var file = File.openDialog ("Select File to Play...", '*.mp3', false);
lblSong.text = file.displayName;
lblSong.file = file;
btnPlay.enabled = btnStop.enabled = true;
btnPlay.onClick = function () {
lblSong.file.execute();
$.sleep (300);
BridgeTalk.bringToFront('estoolkit');
btnStop.onClick = function () {
emptyPlaylist.execute();
$.sleep (300);
BridgeTalk.bringToFront('estoolkit');
btnClose.onClick = function () {
w.close();
w.show();
// this function creates an Empty Playlist file (Windows) on the fly, this file will be used to "stop" a playing file
// I need a similar function for Mac
function getEmptyPlaylist () {
var desk = Folder.desktop;
var f = new File(desk+'/emptyPlaylist.wpl');
if (!f.exists) {
var s_emptyPlaylist = (new String("<?wpl version=\"1.0\"?>\n<smil>\n <head>\n <meta name=\"Generator\" content=\"Microsoft Windows Media Player -- 12.0.7601.18150\"/>\n <meta name=\"ItemCount\" content=\"0\"/>\n <title>empyPlaylist</title>\n </head>\n</smil>\n"));
f.encoding = 'utf-8';
f.open('w');
f.write(eval(s_emptyPlaylist));
f.close();
return f;
thanks in advance
Carloshmm...I think it's going to be more complicated than I thought.
correct, this script targets the ESTK, it is part of a larger Illustrator script, which doesn't have doScript either...I would go with applescript as last resort. I think going with the playlist file is easier.
based on your comment I realized users might change their default players, so on Windows I'm going to change the playlist file from *.wpl to the more universal *.m3u, I guess whatever decent player made the default, supports this file.
so, will an *.m3u playlist file play on the default mac player (itunes) when executed?
File("~/Music/iTunes/iTunes Media/Music/emptyPlaylist.m3u").execute(); // will this play on itunes?
I noticed that the *.m3u file can be blank, it will still "play" when executed() and effectively "stops" any music file currently being played...if this happens on Mac also, that's what I'm after.
thanks for helping Dirk. -
Three libraries, three iPods, lost music, empty playlists
My wife, daughter, and I have three iPods and three libraries (we use the option key when starting up iTunes). We store all the music files on an external HD. Today, while cleaning up a bunch of duplicate files/folders from a system reinstall, I deleted all the music files Ouch! Not to worry, I have the iPods and Senuti. If I simply reimport the music, I get ! signs on every track, and empty playlists. With Senuti, I can drag playlists one at a time and they seem to repopulate the existing playlists nicely. But at over 150 playlists per iPod, it's a lengthy process. Can't select more than one playlist at a time in either Senuti or iTunes, and haven't been able to find a helpful Doug's script. Is there a way to speed up this process? After being unable to reassociate the songs in the library with the playlists, I simply deleted my whole library, and am now redragging one playlist at a time. I will do the same with my wife's iPod and then my daughter's, being careful not to sync and overwrite them. My daughter's nano is set to auto-update so I will have to move her library to a different location, I think, so it won't auto-update and delete all her music. Help!
marmerI haven't used it for awhile but can't you simply
download the playlist without downloading the music?
I wish, but it doesn't seem to work that way. Senuti will let you download the music IN the playlist, but not just the playlist info. Same, AFAICT, with iPodRip.
What I may do is the following:
1. Delete everything (scary).
2. Restore from my iPod first (I'm Dad, mine is biggest!).
3. Duplicate the resulting Library and playlists to a new library for my wife, and rename it.
4. Delete a few playlists she doesn't want and restore the playlists that (she wants but I don't want) from her iPod using Senuti.
5. Repeat for my daughter. She has a nano and not much music, so this will be much faster. Her tastes run to standard pop fare, no classical.
I think, when all is said and done, I will have one Music folder with all the actual MP3s, AACs, and the occasionall AIFF in it, and three libraries corresponding to the three iPods with Library subsets of the total Music folder.
Does that sound about right?
marmer -
I recently moved from a PC to a Mac and I had thousands of empty playlists in my iTunes library, which I know is a problem from iTunes Match. I thought I could fix the problem on a Mac using the Automator or a script, but now every time I try to do that, iTunes freezes, becomes non-responsive, and nothing happens. As it was, iTunes was taking about 10 minutes to open and become responsive, and then it would only work for a little while before becoming non-responsive again. Now, after running the Automator "Remove Empty Playlists" and a script, the playlists didn't go anywhere, and I can't get iTunes to open at all.
All day, I've been trying to fix this by turning off iTunes Match on all my iOS devices and getting the script to run, but nothing is working and somehow iTunes is running even worse. I don't know what else to try, but iTunes is completely unusable. Frankly, I don't even know if getting rid of all the playlists would fix the problem. I know I could check by just turning off iTunes Match on my Mac, but it would need to open first for me to do that.
Does anybody have any suggestions?Hello MrStuntman,
You may need to recreate your iTunes Library. The following article details this process.
iTunes: How to re-create your iTunes library and playlists
http://support.apple.com/kb/HT1451
Note: After re-creating your library, any devices that you sync with iTunes (Apple TV, iPod, iPhone, iPad) will see your iTunes library as a new library and will completely resync. The next sync with such a device will take longer and may reset some options since your rebuilt library isn't familiar to the device.
Cheers,
Allen -
Problem with a thousend empty playlist in iTunes Match.
I need a help to reset my itunes match because have a problem with a thousend empty playlist.
Funny thing: I just reset the iPad 2 again and was careful to shut off iTunes Match. Almost immediately my iPhone 4s updated and showed no more duplicate "recent" playlists. A check of my Laptop also shows none. So now it's isolated to the iPad. Guess I'll leave Match shut off for a day or two.
-
Deleting multiple empty playlists
I have recently purchased an iPhone and have transferred my itunes music library from my home computer to my laptop which is running Windows Vista. In doing so, I have successfully transferred my entire library. However, I have noted that all of the playlists in my library have been multiplied many times. When I attempt to open any of these multiple playlists, I find that they are empty. In other words, I have an enormous number of duplicated playlists on my newly authorized computer, nearly all of which are empty. Deleting them one by one would take a huge amount of time.
Is there any way that I can delete the lot of them and reinstall the playlists that I would like to keep without making an enormous amount of copies?The VBscript below will delete all empty playlists. You can either copy and paste from below into a .vbs file, or download it here
Option Explicit
Dim iTunes
Dim playlists
Dim i
Set iTunes = CreateObject("iTunes.Application")
Set playlists = iTunes.LibrarySource.Playlists
For i = playlists.Count to 1 Step -1
If playlists.Item(i).Size = 0 Then
wscript.echo "playlist " & playlists.Item(i).Name & " is 0 size, deleting "
playlists.Item(i).Delete
End If
Next -
Multiple empty playlists, iTunes freezes, incomplete syncs
I have a PC...don't hold it against. My iTunes freezes, I have incomplete syncs and a ridiculous number of empty playlists. I have some computer sense ( in other words if you are patient I have no problem trying to make changes to my computer). Was excited for iMatch...now not so much. Suggestions?
Assuming you've posted in the Windows forum because you have a Windows PC...
Click the link for KillEmptyPlaylists to visit the page where it is hosted. Click the link of the same name on that page to download the script to your computer. Double-click the script to run it. (You'll probably get some kind of security warning but your A-V scanner should have been happy with it - it is safe, but then I suppose if I had bad intent I would say that. You'll have to decide whether you think I can be trusted.). The script will ask you to make sure that you want it to go ahead, and then delete all the empty playlists for you if you want.
If you actually have a Mac I can point you in the right direction for an equivalent script.
tt2 -
I created a playlist on my iphone and it created multiple empty playlist
Does anyboydy have the same problem?
I created a playlist on my Iphone and suddently thousands of empty playlist with identifcal name appeared everywhere.
Since then, my music on my iphone freezes.
I tried to remove with automator on my computer, but when I refresh the Itune match, they reappear..If your Mac is signed into your account with Documents & Data syncing checked in System Preferences>iCloud, it should have received a copy on your Mac.
Open Finder and navigate to "~/Library/Mobile Documents/com~apple~Pages/Documents" (without the quotes) from the Go>Go to Folder Menu. If this folder exists on your hard drive, launch Time Machine and go back to an earlier point in time to see if your missing document appears. If it does, restore the most recent version available. -
[SOLVED] MPD: Failed to create socket
I've been attempting to get MPD working today and I'm rather stumped here. I got it to start out of its default directory, however, that denied it access to my music folder. So, I switched all of that to a ~/.mpd folder as the wiki page instructed me (https://wiki.archlinux.org/index.php/Mu … _as_a_User), and for purposes of keeping organized.
Now, however, I'm getting this error whenever I run "mpd ~/.mpd/mpd.conf"
Failed to bind to '[::]:6600': Failed to create socket: Address family not supported by protocol
I remember that happening before, and it had to do with user permissions and so on. I think I set "user" to "mpd" that time. "User" is now set to my user, where the .mpd folder is located. Is there a way to allow mpd to continue?
EDIT: My mpd.conf is:
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/mpdstate"
user "spencer"
mixer_type "software"
audio_output {
type "alsa"
name "Sound Card"
bind_to_address "any"
Last edited by DrKillPatient (2011-08-05 02:38:35)DrKillPatient wrote:
That worked, thanks. At first it gave "failed to open database" but in subsequent startups it's not doing that-- I suppose it created the file at the first time. audio_output's not defined, I suppose that's up to me to set it? It's autodetected at this point and seems to work fine. Should I leave it that way?
And out of curiosity, what was changed to fix my error?
First of all: thanks for testing. my setup creates 2 static hosts, instead of letting mpd autodetect it. sometimes ipv6 detection is prefered and this *can* lead to stuff not working properly.
Also i use absolute paths, to make sure everything works.
mpds audio output detection works decently, you can of course enable one in ~/.mpdconf to get rid of the warning.
Also you had one obvious error: you followed mpds wiki entry to start mpd as user. but you defined a user in mpd.conf. this will not work, since mpd can only drop previlegs to that user, when run as root.
Oh, please mark this thread as solved.
Last edited by Rasi (2011-08-05 01:26:43) -
[SOLVED] MPD does not start
I installed MPD, made configurations, but as I try to start it nothing happens.
Here is the output:
[root@hklinux hk]# mpd --no-daemon --stdout --verbose
config: loading file /etc/mpd.conf
listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
path: path_set_fs_charset: fs charset is: UTF-8
pcm: libsamplerate converter 'Fastest Sinc Interpolator'
database: reading DB
disabling the last.fm playlist plugin because account is not configured
disabling the soundcloud playlist plugin because API key is not set
daemon: opening pid file
daemon: writing pid file
avahi: Initializing interface
avahi: Client changed to state 101
avahi: Client is CONNECTING
state_file: Loading state file /var/lib/mpd/mpdstate
Any help please?
Last edited by hariskar (2012-11-01 17:57:31)I guess they are called "clients," but yeah you need one in order to interface with mpd. I had a lot of problems initially figuring out mpd myself so I totally understand when others also run into problems....
Don't forget to mark the thread as "solved."
Maybe you are looking for
-
HT4993 My iphone 4s is rebooting its self over and over again.
I phone is stuck in a loop of rebooting and can not get to home screen
-
Roland MC500 into logic - setting tempo for imported midi data
My mate has an Roland MC500, where he's programmed multi-tracked midi info for songs etc, and we've sussed how to import the channels into separate regions in logic. We've set the tempo as per the tempo on the MC500, but after importing the track, af
-
"why siri" doesn't seem to work unless we are charging the phone
"why Siri" doesn't work unless we are charging our phones, why?
-
How to get Meta tag information of a video
Hi, I want to read Meta tag information of a video file like Artist,Album,Year,etc.... I tryed "onMetaData" for a video file.But i didnt get information like Artist,Album,Year,etc... The video file can be mp4,avi,mpg,mov. I dont want them to play in
-
Anyone out there having problems using service pack 9 for Weblogic application server 5.1? I install it, and get a slew of java.lang.NoClassDefFoundError, and java.util.MissingResourceException (from a resource bundle) errors. Its really quirky cause