Music Player Daemon aka mpd [Réglé]
Y a-t-il un utilisateur de mpd dans le forum ?
Logiciels / Musique MAO Synthèse vocale
nic80 Membre non connecté
-
- Voir le profil du membre nic80
- Inscrit le : 06/08/2018
- Groupes :
-
Modérateur
Reprise du message précédent
Bonjour,Pour la base de données, le si elle n'existe pas ce n' est visiblement pas un problème.
En revanche est ce que le "systemctl status mpd" ne donne pas un autre message d' erreur ( du genre unknown mixer ) ?
J' ai commenté la partie mixer et ce qui est lié à Alsa pour que cela fonctionne.
zwykx Membre non connecté
-
- Voir le profil du membre zwykx
- Inscrit le : 21/01/2013
- Groupes :
nic80 :Pour la base de données, le si elle n'existe pas ce n' est visiblement pas un problème.
En revanche est ce que le "systemctl status mpd" ne donne pas un autre message d' erreur ( du genre unknown mixer ) ?
J' ai commenté la partie mixer et ce qui est lié à Alsa pour que cela fonctionne.
Je viens d'essayer:
1- sans audio_output
2- et avec :
audio_output {
type "alsa"
name "My ALSA Device"
}
c'est-à-dire la conf par défaut.
Et dans les 2 cas, j'obtiens les mêmes messages d'erreur :
Code BASH :
[root@mpd ~]# systemctl restart mpd.service [root@mpd ~]# systemctl status mpd.service × mpd.service - Music Player Daemon Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; preset: disabled) Active: failed (Result: exit-code) since Wed 2026-11-11 14:57:11 CET; 2s ago Invocation: 573bd87a6762448bba1d439d9dbf83d4 Docs: man:mpd(1) man:mpd.conf(5) Process: 1919 ExecStart=/usr/bin/mpd --systemd (code=exited, status=1/FAILURE) Main PID: 1919 (code=exited, status=1/FAILURE) Mem peak: 22M CPU: 1.261s nov. 11 14:57:11 mpd mpd[1919]: 2026-11-11T14:57:11 opus: libopus 1.6.1 nov. 11 14:57:11 mpd mpd[1919]: 2026-11-11T14:57:11 adplug: adplug 2.4 nov. 11 14:57:11 mpd mpd[1919]: 2026-11-11T14:57:11 sndfile: libsndfile-1.2.2-exp nov. 11 14:57:11 mpd mpd[1919]: 2026-11-11T14:57:11 simple_db: reading DB nov. 11 14:57:11 mpd mpd[1919]: 2026-11-11T14:57:11 exception: Database corrupted nov. 11 14:57:11 mpd mpd[1919]: 2026-11-11T14:57:11 exception: Unrecognized mixer type nov. 11 14:57:11 mpd systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE nov. 11 14:57:11 mpd systemd[1]: mpd.service: Failed with result 'exit-code'. nov. 11 14:57:11 mpd systemd[1]: Failed to start Music Player Daemon. nov. 11 14:57:11 mpd systemd[1]: mpd.service: Consumed 1.261s CPU time, 22M memory peak.
PC : Z80 SoftCard, CPU Z80, 64 K RAM
zwykx Membre non connecté
-
- Voir le profil du membre zwykx
- Inscrit le : 21/01/2013
- Groupes :
- Database corrupted (avec un fichier vide) ou Failed to open "/var/lib/mpd/mpd.db": No such file or directory (si je le supprime)
- exception: Unrecognized mixer type
Vous êtes sûrs que le fichier spec est OK ?
L'auteur n'accepte les rapports de bug que si ils concernent la dernière version. Mais si je lui écris pour lui dire que mon rpm de sa dernière version marche pas, il va me répondre de faire le build directement à partir de son tarball !
Je me dis que ça serait bien d'avoir un générateur indépendant pour cette db.
Au moins ça soulagerait un peu. On pourrait passer à la 2ème erreur "Unrecognized mixer type" :-/
PC : Z80 SoftCard, CPU Z80, 64 K RAM
nic80 Membre non connecté
-
- Voir le profil du membre nic80
- Inscrit le : 06/08/2018
- Groupes :
-
Modérateur
Je pense qu'ici ç'est le unrecognized mixer type qui est fatal.
Dans mon cas, j' ai enlevé le mpd.db et j' ai commenté tout ce qui est relatif aux mixer (ici dans mon cas alsa).
Le fait de définir un mixer aide mpd, mais de ce que j' ai compris, il est capable de se débrouiller tout seul (je suppose que ç'est ce qu' il a fait dans mon cas).
Si cela fonctionnait avec Mageia 9, il ne faut pas oublier que sur Mageia 10, on est plus passé sur pipewire (sauf erreur de ma part), du coup peut être que le mixer alsa n' est plus valable ?
Attention dans le fichier de conf il y a la partie mentionnée mais aussi une ligne mixer alsa (qu' il gaut aussi commenter , en.faisant debuter la ligne par le caractère #
Edit: je n'ai pas verifié que cela fonctionnait par la suite, juste que le service démarrait.
edit 2: mon fichier /etc/mpd.conf ressemble à ceci
Code TEXT :
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
######################## REQUIRED PATHS ########################
music_directory "~/music"
playlist_directory "~/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
################################################################
######################## OPTIONAL PATHS ########################
#
# If you wish to use mpd --kill to stop MPD, then you must
# specify a file here in which to store MPD's process ID.
#
pid_file "/run/mpd/mpd.pid"
#
# If specified, MPD will save its current state (playlist,
# current song, playing/paused, etc.) at exit. This will be
# used to restore the session the next time it is run.
#
state_file "/var/lib/mpd/mpdstate"
#
################################################################
######################## DAEMON OPTIONS ########################
#
# If started as root, MPD will drop root privileges and run as
# this user instead. Otherwise, MPD will run as the user it was
# started by. If left unspecified, MPD will not drop root
# privileges at all (not recommended).
#
user "mpd"
#
# The address and port to listen on.
#
bind_to_address "localhost"
port "6600"
#
# Controls the amount of information that is logged. Can be
# "default", "secure", or "verbose".
#
#log_level "default"
#
# If Zeroconf is configured, the service name to publish. This
# should be unique on your local network, but name collisions
# will be taken care of for you.
#
#zeroconf_name "Music Player"
#
################################################################
########################## PERMISSIONS #########################
#
# MPD can require that users specify a password before using it.
# You may specify one ore more here, along with what users who
# log in with that password are allowed to do.
#
#password "password@read,add,control,admin"
#
# Specifies what permissions a user who has not logged in with a
# password has. By default, all users have full access to MPD
# if no password is specified above, or no access if one or
# more passwords are specified.
#
#default_permissions "read,add,control,admin"
#
################################################################
########################## AUDIO OUTPUT ########################
#
# MPD supports many audio output types, as well as playing
# through multiple audio outputs at the same time. You can
# specify one or more here. If you don't specify any, MPD will
# automatically scan for a usable audio output.
#
# 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
# options "dev=default"
#}
#
# An example of an OSS output:
#
#audio_output {
# type "oss"
# name "My OSS Device"
# device "/dev/dsp" # optional
# format "44100:16:2" # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
# type "shout"
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
# user "source" # optional
# description "My Stream Description" # optional
# genre "jazz" # optional
# public "no" # optional
#}
#
# Force all decoded audio to be converted to this format before
# being passed to the audio outputs.
#
#audio_output_format "44100:16:2"
#
# If MPD has been compiled with libsamplerate support, this
# specifies the sample rate converter to use. Possible
# values can be found in the mpd.conf man page or the
# libsamplerate documentation.
#
#samplerate_converter "Fastest Sinc Interpolator"
#
################################################################
############################# MIXER ############################
#
# MPD needs to know what mixer settings to change when you
# adjust the volume. If you don't specify one here, MPD will
# pick one based on which ones it was compiled with support for.
#
# An example for controlling an ALSA mixer:
#
#mixer_type "alsa"
#
# An example for controlling an OSS mixer:
#
#mixer_type "oss"
#
# If you want MPD to adjust the volume of audio sent to the
# audio outputs, you can tell it to use the software mixer:
#
#mixer_type "software"
#
################################################################
######################### NORMALIZATION ########################
#
# Specifies the type of ReplayGain to use. Can be "album" or
# "track". ReplayGain will not be used if not specified. See
# <http://www.replaygain.org> for more details.
#
#replaygain "album"
#
# Sets the pre-amp used for files that have ReplayGain tags.
#
#replaygain_preamp "0"
#
# Enable on the fly volume normalization. This will cause the
# volume of all songs played to be adjusted so that they sound
# as though they are of equal loudness.
#
#volume_normalization "no"
#
################################################################
########################### BUFFERING ##########################
#
# The size of the buffer containing decoded audio. You probably
# shouldn't change this.
#
#audio_buffer_size "2048"
#
# How much of the buffer to fill before beginning to play.
# Increase this if you hear skipping when changing songs.
#
#buffer_before_play "10%"
#
# Similar options for the HTTP stream buffer. If you hear
# skipping while playing HTTP streams, you may wish to increase
# these.
#
#http_buffer_size "128"
#http_prebuffer_size "25%"
#
################################################################
########################### HTTP PROXY #########################
#
# Specifies the HTTP proxy to use for playing HTTP streams.
#
#http_proxy_host "proxy.isp.com"
#http_proxy_port "8080"
#http_proxy_user "user"
#http_proxy_password "password"
#
################################################################
############################# LIMITS ###########################
#
# These are various limits to prevent MPD from using too many
# resources. You should only change them if they start
# restricting your usage of MPD.
#
#connection_timeout "60"
#max_connections "5"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
#
################################################################
###################### CHARACTER ENCODINGS #####################
#
# If file or directory names do not display correctly, then you
# may need to change this. In most cases it should be either
# "ISO-8859-1" or "UTF-8".
#
#filesystem_charset "ISO-8859-1"
#
# The encoding that ID3v1 tags should be converted from.
#
#id3v1_encoding "ISO-8859-1"
#
################################################################
######################### OTHER OPTIONS ########################
#
# Try disabling this if you have MP3s which appear to end
# abruptly. If this solves the problem, it is highly
# recommended that you fix your MP3s with vbrfix (available from
# <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point you can re-enable support for gapless MP3 playback.
#
#gapless_mp3_playback "yes"
#
# Enable this if you wish to use your MPD created playlists in
# other music players.
#
#save_absolute_paths_in_playlists "no"
#
# A list of tag types that MPD will scan for and make available
# to clients.
#
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
#
################################################################
ici j' commenté tout ce qui est audio output et mixer
Code TEXT :
[...]
# An example of an ALSA output:
#
#audio_output {
# type "alsa"
# name "My ALSA Device"
# device "hw:0,0" # optional
# format "44100:16:2" # optional
# options "dev=default"
#}
[...]
############################# MIXER ############################
#
# MPD needs to know what mixer settings to change when you
# adjust the volume. If you don't specify one here, MPD will
# pick one based on which ones it was compiled with support for.
#
# An example for controlling an ALSA mixer:
#
#mixer_type "alsa"Édité par nic80 Le 11/11/2026 à 19h39
Yuusha Membre non connecté
-
- Voir le profil du membre Yuusha
- Inscrit le : 04/07/2017
- Groupes :
-
Modérateur
-
Administrateur
-
Forgeron
Il semble que mixer_type devrait être : hardware, software ou none (https://mpd.readthedocs.io/en/latest/mpd.conf.5.html)
Il faudrait peut-être essayer cette configuration donnée au paragraphe 1.1 : https://wiki.archlinux.org/title/Music_Player_Daemon/Troubleshooting
nic80 Membre non connecté
-
- Voir le profil du membre nic80
- Inscrit le : 06/08/2018
- Groupes :
-
Modérateur
Par défaut la configuration en 1.1 de Arch est dans le fichier de conf de mpd. Du coup ce n' est pas un problème d' autodetection (le fichier de conf est celui que j' avais de base -je crois -(donc avec le mixer_type alsa et l'output correspondant, j' ai juste commenté pour laisser mpd se debrouiller). Je n' ai pas verifié ce qui est auto detecté (il faudrait que je regarde ce que me dit le systmectl status mpd (j' ai modifié l' unité systemd en rajoutant verbose et stderr (j'ose espérer que cela indique quelque chose (peut être que les fichiers de log restent vide à cause du paramètre stderr que j' ai rajouté au systemd)
Édité par nic80 Le 11/11/2026 à 21h46
zwykx Membre non connecté
-
- Voir le profil du membre zwykx
- Inscrit le : 21/01/2013
- Groupes :
nic80 :Je pense qu'ici ç'est le unrecognized mixer type qui est fatal.
Ouiiiiiiiiiii !
J'avais essayé en commentant :
Code BASH :
#audio_output { # type "alsa" # name "My ALSA Device" # device "hw:0,0" # optional # format "44100:16:2" # optional # options "dev=default" #}
et j'avais pas vu qu'il restait :
Code BASH :
plus bas dans le fichier :-(mixer_type "alsa"Au premier restart, j'ai l'exception :
Failed to open "/var/lib/mpd/mpd.db" : No such file or directory
mais j'ai un status : active (running)
et au 2ème restart, la DB a bien été créée ; l'exception est remplacée par :
simple_db: reading DB
Par contre, il reste évidemment :
output: No 'audio_output' defined in config file
Yuusha :Il semble que mixer_type devrait être : hardware, software ou none...
C'est un peu ambigüe parce que "mixer_type" est déclaré à la fois au premier niveau dans le fichier de conf fourni. C'est d'ailleurs ce qui fait planter le daemon au démarrage. Mais il est aussi déclaré dans la structure "audio_output" de l'exemple de configuration sur https://wiki.archlinux.org/title/Music_Player_Daemon/Troubleshooting. Le man de mpd. conf n'est pas très détaillé à ce niveau.
Maintenant que le daemon tourne, il me reste plus qu'à faire des essais !
PC : Z80 SoftCard, CPU Z80, 64 K RAM
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie