Closed tobiasfaust closed 10 months ago
Hello Tobias, from the compose file you posted, you are using a volume (music) instead of a bind directory. So /music does not really contains what you would expect. Just to be sure, please post the results of this two commands along with the full docker-compose.yaml file:
docker volume ls | grep music
The music files should usually be stored in the music folder, not in the playlist folder. Maybe please post the full path of the music folder so I can suggest you a hopefully correct docker-compose file.
Also, mounting directly the audio device is something I have never tried, does it play any sound? I usually simply mount /dev/snd to /dev/snd
And the property:
ALSA_OUTPUT_DEVICE=hw:/dev/snd/controlC3
does not look correct to me... maybe also post the result of:
cat /proc/asound/cards
Let me know!
Cheers
i simplified this without my huge music dir.
mpd1: image: giof71/mpd-alsa container_name: mpd-kizi hostname: mpd-kizi restart: unless-stopped volumes: - ./mpd/music:/music:r - ./mpd/playlists:/playlists:rw devices: - /dev/snd:/dev/snd environment: - MPD_ENABLE_LOGGING=yes - MPD_LOG_LEVEL=verbose - ALSA_OUTPUT_DEVICE=hw:/dev/snd/controlC3 - ALSA_OUTPUT_CREATE=yes - ALSA_OUTPUT_ENABLED=yes - ALSA_OUTPUT_NAME=sound_og_kizi - ALSA_OUTPUT_MIXER_TYPE=software - ALSA_OUTPUT_OUTPUT_FORMAT=44100:16:2
my sample track i copied it into local music dir and changed playlist too, pls see below:
root@server:/usr/local/svn/docker-compose-test# ls -ail mpd/music/ insgesamt 5184 13909655 drwxr-xr-x 2 root root 4096 29. Okt 10:09 . 13893861 drwxr-xr-x 4 root root 4096 29. Okt 10:09 .. 13909657 -rwxr-xr-x 1 root root 5296256 29. Okt 10:09 Track01.mp3 root@server:/usr/local/svn/docker-compose-test# ls -ail mpd/playlists/ insgesamt 12 13909653 drwxr-xr-x 2 root root 4096 29. Okt 10:10 . 13893861 drwxr-xr-x 4 root root 4096 29. Okt 10:09 .. 13909656 -rw-r--r-- 1 root root 12 29. Okt 10:10 myplaylist.m3u root@server:/usr/local/svn/docker-compose-test# cat mpd/playlists/myplaylist.m3u Track01.mp3
Here is the output regarding your questions:
root@server:/usr/local/svn/docker-compose-test# docker volume ls | grep music local docker-compose-test_music
root@server:/usr/local/svn/docker-compose-test# cat /proc/asound/cards 0 [Generic ]: HDA-Intel - HD-Audio Generic HD-Audio Generic at 0xfeb44000 irq 30 1 [SB ]: HDA-Intel - HDA ATI SB HDA ATI SB at 0xfeb40000 irq 16 2 [Device ]: USB-Audio - USB PnP Sound Device C-Media Electronics Inc. USB PnP Sound Device at usb-0000:00:13.2-2.1, full spe 3 [Set ]: USB-Audio - C-Media USB Headphone Set C-Media USB Headphone Set at usb-0000:00:13.2-2.4.1, full speed 4 [Set_1 ]: USB-Audio - C-Media USB Headphone Set C-Media USB Headphone Set at usb-0000:00:13.2-2.2, full speed root@server:/usr/local/svn/docker-compose-test# ls -ail /dev/snd/by-path/ insgesamt 0 540 drwxr-xr-x 2 root root 140 28. Okt 13:16 . 331 drwxr-xr-x 4 root root 480 28. Okt 13:16 .. 541 lrwxrwxrwx 1 root root 12 19. Okt 16:14 pci-0000:00:01.1 -> ../controlC0 641 lrwxrwxrwx 1 root root 12 28. Okt 13:16 pci-0000:00:13.2-usb-0:2.1:1.0 -> ../controlC2 650 lrwxrwxrwx 1 root root 12 28. Okt 13:16 pci-0000:00:13.2-usb-0:2.2:1.0 -> ../controlC4 645 lrwxrwxrwx 1 root root 12 28. Okt 13:16 pci-0000:00:13.2-usb-0:2.4.1:1.0 -> ../controlC3 569 lrwxrwxrwx 1 root root 12 19. Okt 16:14 pci-0000:00:14.2 -> ../controlC1
Inside of docker it is showing like that:
root@server:/usr/local/svn/docker-compose-test# docker exec -it mpd-kizi bash root@mpd-kizi:/app/bin# ls -ail /dev/snd/ total 0 11 drwxr-xr-x 2 root root 440 Oct 29 09:11 . 1 drwxr-xr-x 6 root root 360 Oct 29 09:11 .. 12 crw-rw---- 1 root audio 116, 4 Oct 29 09:11 controlC0 13 crw-rw---- 1 root audio 116, 10 Oct 29 09:11 controlC1 14 crw-rw---- 1 root audio 116, 13 Oct 29 09:11 controlC2 15 crw-rw---- 1 root audio 116, 16 Oct 29 09:11 controlC3 16 crw-rw---- 1 root audio 116, 19 Oct 29 09:11 controlC4 17 crw-rw---- 1 root audio 116, 3 Oct 29 09:11 hwC0D0 18 crw-rw---- 1 root audio 116, 9 Oct 29 09:11 hwC1D0 19 crw-rw---- 1 root audio 116, 2 Oct 29 09:11 pcmC0D3p 20 crw-rw---- 1 root audio 116, 6 Oct 29 09:11 pcmC1D0c 21 crw-rw---- 1 root audio 116, 5 Oct 29 09:11 pcmC1D0p 22 crw-rw---- 1 root audio 116, 7 Oct 29 09:11 pcmC1D1p 23 crw-rw---- 1 root audio 116, 8 Oct 29 09:11 pcmC1D2c 24 crw-rw---- 1 root audio 116, 12 Oct 29 09:11 pcmC2D0c 25 crw-rw---- 1 root audio 116, 11 Oct 29 09:11 pcmC2D0p 26 crw-rw---- 1 root audio 116, 15 Oct 29 09:11 pcmC3D0c 27 crw-rw---- 1 root audio 116, 14 Oct 29 09:11 pcmC3D0p 28 crw-rw---- 1 root audio 116, 18 Oct 29 09:11 pcmC4D0c 29 crw-rw---- 1 root audio 116, 17 Oct 29 09:11 pcmC4D0p 30 crw-rw---- 1 root audio 116, 1 Oct 29 09:11 seq 31 crw-rw---- 1 root audio 116, 33 Oct 29 09:11 timer root@mpd-kizi:/app/bin#
The output of mpc hasn´t changed :(
root@mpd-kizi:/app/bin# mpc lsplaylists myplaylist root@mpd-kizi:/app/bin# mpc load myplaylist loading: myplaylist root@mpd-kizi:/app/bin# mpc listall myplaylist MPD error: No such directory root@mpd-kizi:/app/bin#
and this is the log output:
root@server:/usr/local/svn/docker-compose-test# docker compose up mpd1 [+] Running 1/1 ✔ Container mpd-kizi Recreated 13.4s Attaching to mpd-kizi mpd-kizi | Build mode: [full] mpd-kizi | MPD from repo is available at [/usr/bin/mpd] mpd-kizi | Integer upsampling supported: [yes] mpd-kizi | Compiled mpd binary: [/app/bin/compiled/mpd] mpd-kizi | Compiled mpd ups binary: [/app/bin/compiled/mpd-ups] mpd-kizi | MAX_OUTPUTS=[20] mpd-kizi | Selected binary: [/app/bin/compiled/mpd] mpd-kizi | Loading built-in alsa_presets... mpd-kizi | Loading preset [dac.device]=[hw:DAC] mpd-kizi | Loading preset [x20.device]=[hw:x20] mpd-kizi | Loading preset [aune-s6-sw.name]=[Aune S6 USB DAC] mpd-kizi | Loading preset [aune-s6-sw.device]=[hw:DAC] mpd-kizi | Loading preset [aune-s6-sw.mixer-type]=[software] mpd-kizi | Loading preset [aune-s6.name]=[Aune S6 USB DAC] mpd-kizi | Loading preset [aune-s6.device]=[hw:DAC] mpd-kizi | Loading preset [aune-s6.mixer-type]=[hardware] mpd-kizi | Loading preset [aune-s6.mixer-device]=[hw:DAC] mpd-kizi | Loading preset [aune-s6.mixer-control]=[S6 USB DAC Output] mpd-kizi | Loading preset [gustard-x12-sw.name]=[Gustard X12 USB DAC] mpd-kizi | Loading preset [gustard-x12-sw.device]=[hw:x20] mpd-kizi | Loading preset [gustard-x12-sw.mixer-type]=[software] mpd-kizi | Loading preset [gustard-x12.name]=[Gustard X12 USB DAC] mpd-kizi | Loading preset [gustard-x12.device]=[hw:x20] mpd-kizi | Loading preset [gustard-x12.mixer-type]=[hardware] mpd-kizi | Loading preset [gustard-x12.mixer-device]=[hw:x20] mpd-kizi | Loading preset [gustard-x12.mixer-control]=[xCORE USB Audio 2.0 Output] mpd-kizi | Loading preset [gustard-u12-sw.name]=[Gustard U12 USB DDC] mpd-kizi | Loading preset [gustard-u12-sw.device]=[hw:x20] mpd-kizi | Loading preset [gustard-u12-sw.mixer-type]=[software] mpd-kizi | Loading preset [gustard-u12.name]=[Gustard U12 USB DDC] mpd-kizi | Loading preset [gustard-u12.device]=[hw:x20] mpd-kizi | Loading preset [gustard-u12.mixer-type]=[hardware] mpd-kizi | Loading preset [gustard-u12.mixer-device]=[hw:x20] mpd-kizi | Loading preset [gustard-u12.mixer-control]=[xCORE USB Audio 2.0 Output] mpd-kizi | Loading preset [topping-d10-sw.name]=[Topping D10] mpd-kizi | Loading preset [topping-d10-sw.device]=[hw:D10] mpd-kizi | Loading preset [topping-d10-sw.mixer-type]=[software] mpd-kizi | Loading preset [topping-d10.name]=[Topping D10] mpd-kizi | Loading preset [topping-d10.device]=[hw:D10] mpd-kizi | Loading preset [topping-d10.mixer-type]=[hardware] mpd-kizi | Loading preset [topping-d10.mixer-device]=[hw:D10] mpd-kizi | Loading preset [topping-d10.mixer-control]=[D10 ] mpd-kizi | Loading preset [topping-d10s-sw.name]=[Topping D10s] mpd-kizi | Loading preset [topping-d10s-sw.device]=[hw:D10s] mpd-kizi | Loading preset [topping-d10s-sw.mixer-type]=[software] mpd-kizi | Loading preset [topping-d10s.name]=[Topping D10s] mpd-kizi | Loading preset [topping-d10s.device]=[hw:D10s] mpd-kizi | Loading preset [topping-d10s.mixer-type]=[hardware] mpd-kizi | Loading preset [topping-d10s.mixer-device]=[hw:D10s] mpd-kizi | Loading preset [topping-d10s.mixer-control]=[D10s ] mpd-kizi | Loading preset [topping-d10-balanced-sw.name]=[Topping D10 Balanced] mpd-kizi | Loading preset [topping-d10-balanced-sw.device]=[hw:Balanced] mpd-kizi | Loading preset [topping-d10-balanced-sw.mixer-type]=[software] mpd-kizi | Loading preset [topping-d10-balanced.name]=[Topping D10 Balanced] mpd-kizi | Loading preset [topping-d10-balanced.device]=[hw:Balanced] mpd-kizi | Loading preset [topping-d10-balanced.mixer-type]=[hardware] mpd-kizi | Loading preset [topping-d10-balanced.mixer-device]=[hw:Balanced] mpd-kizi | Loading preset [topping-d10-balanced.mixer-control]=[D10 Balanced] mpd-kizi | Loading preset [hifiberry-dac-plus.name]=[Hifiberry DAC] mpd-kizi | Loading preset [hifiberry-dac-plus.device]=[hw:sndrpihifiberry] mpd-kizi | Loading preset [fiio-e18-sw.name]=[FiiO E18] mpd-kizi | Loading preset [fiio-e18-sw.device]=[hw:DACE18] mpd-kizi | Loading preset [fiio-e18-sw.mixer-type]=[software] mpd-kizi | Loading preset [fiio-e18.name]=[FiiO E18] mpd-kizi | Loading preset [fiio-e18.device]=[hw:DACE18] mpd-kizi | Loading preset [fiio-e18.mixer-control]=[PCM] mpd-kizi | Loading preset [fiio-e18.mixer-type]=[hardware] mpd-kizi | Loading preset [fiio-e18.mixer-device]=[hw:DACE18] mpd-kizi | Loading preset [yulong-d200-sw.name]=[Yulong D200 USB DAC] mpd-kizi | Loading preset [yulong-d200-sw.device]=[hw:DAC] mpd-kizi | Loading preset [yulong-d200.name]=[Yulong D200 USB DAC] mpd-kizi | Loading preset [yulong-d200.device]=[hw:DAC] mpd-kizi | Loading preset [yulong-d200.mixer-control]=[YULONG Audio 384k DSD DAC ] mpd-kizi | Loading preset [yulong-d200.mixer-type]=[hardware] mpd-kizi | Loading preset [yulong-d200.mixer-device]=[hw:DAC] mpd-kizi | Loading preset [aune-x1s.name]=[Aune X1S] mpd-kizi | Loading preset [aune-x1s.device]=[hw:DAC] mpd-kizi | Loading preset [peachtree-dacit.name]=[PeachTree DacIt] mpd-kizi | Loading preset [peachtree-dacit.device]=[hw:DAC] mpd-kizi | Loading preset [pi-headphones.name]=[Raspberry Pi Headphones] mpd-kizi | Loading preset [pi-headphones.device]=[hw:Headphones] mpd-kizi | Loading preset [ifi-zen-dac.name]=[Ifi Zen USB DAC] mpd-kizi | Loading preset [ifi-zen-dac.device]=[hw:Audio,0] mpd-kizi | Loading preset [topping-dx5.name]=[Topping DX5 USB DAC] mpd-kizi | Loading preset [topping-dx5.device]=[hw:DX5] mpd-kizi | Loading preset [gustard-x16.name]=[Gustard X16 USB DAC] mpd-kizi | Loading preset [gustard-x16.device]=[hw:G20] mpd-kizi | Loading preset [topping-e30.name]=[Topping E30 USB DAC] mpd-kizi | Loading preset [topping-e30.device]=[hw:E30] mpd-kizi | Finished loading built-in alsa_presets mpd-kizi | No additional preset file found mpd-kizi | There are [81] available alsa_presets mpd-kizi | ANY_PULSE=[0] mpd-kizi | ANY_ALSA=[1] mpd-kizi | Pulse packages not needed. mpd-kizi | User mode disabled mpd-kizi | Processing HOST_PERMISSIONS index 0 mpd-kizi | HOST_PERMISSIONS at index 0 is set to mpd-kizi | Processing HOST_PERMISSIONS index 1 mpd-kizi | HOST_PERMISSIONS at index 1 is set to mpd-kizi | Processing HOST_PERMISSIONS index 2 mpd-kizi | HOST_PERMISSIONS at index 2 is set to mpd-kizi | Processing HOST_PERMISSIONS index 3 mpd-kizi | HOST_PERMISSIONS at index 3 is set to mpd-kizi | Processing HOST_PERMISSIONS index 4 mpd-kizi | HOST_PERMISSIONS at index 4 is set to mpd-kizi | Processing HOST_PERMISSIONS index 5 mpd-kizi | HOST_PERMISSIONS at index 5 is set to mpd-kizi | Processing HOST_PERMISSIONS index 6 mpd-kizi | HOST_PERMISSIONS at index 6 is set to mpd-kizi | Processing HOST_PERMISSIONS index 7 mpd-kizi | HOST_PERMISSIONS at index 7 is set to mpd-kizi | Processing HOST_PERMISSIONS index 8 mpd-kizi | HOST_PERMISSIONS at index 8 is set to mpd-kizi | Processing HOST_PERMISSIONS index 9 mpd-kizi | HOST_PERMISSIONS at index 9 is set to mpd-kizi | Processing HOST_PERMISSIONS index 10 mpd-kizi | HOST_PERMISSIONS at index 10 is set to mpd-kizi | Processing PASSWORD index 0 mpd-kizi | PASSWORD at index 0 is set to mpd-kizi | Processing PASSWORD index 1 mpd-kizi | PASSWORD at index 1 is set to mpd-kizi | Processing PASSWORD index 2 mpd-kizi | PASSWORD at index 2 is set to mpd-kizi | Processing PASSWORD index 3 mpd-kizi | PASSWORD at index 3 is set to mpd-kizi | Processing PASSWORD index 4 mpd-kizi | PASSWORD at index 4 is set to mpd-kizi | Processing PASSWORD index 5 mpd-kizi | PASSWORD at index 5 is set to mpd-kizi | Processing PASSWORD index 6 mpd-kizi | PASSWORD at index 6 is set to mpd-kizi | Processing PASSWORD index 7 mpd-kizi | PASSWORD at index 7 is set to mpd-kizi | Processing PASSWORD index 8 mpd-kizi | PASSWORD at index 8 is set to mpd-kizi | Processing PASSWORD index 9 mpd-kizi | PASSWORD at index 9 is set to mpd-kizi | Processing PASSWORD index 10 mpd-kizi | PASSWORD at index 10 is set to mpd-kizi | Qobuz Plugin Enabled: [] mpd-kizi | Creating Alsa output for output [0] mpd-kizi | Alsa preset for ALSA Out [0] is [] mpd-kizi | Searching alsa preset value for PresetName [device] Key [] mpd-kizi | Not found alsa preset value for PresetName [device] Key [] mpd-kizi | Searching alsa preset value for PresetName [mixer-type] Key [] mpd-kizi | Not found alsa preset value for PresetName [mixer-type] Key [] mpd-kizi | Searching alsa preset value for PresetName [mixer-device] Key [] mpd-kizi | Not found alsa preset value for PresetName [mixer-device] Key [] mpd-kizi | Searching alsa preset value for PresetName [mixer-control] Key [] mpd-kizi | Not found alsa preset value for PresetName [mixer-control] Key [] mpd-kizi | Searching alsa preset value for PresetName [mixer-index] Key [] mpd-kizi | Not found alsa preset value for PresetName [mixer-index] Key [] mpd-kizi | ALSA_OUTPUT_AUTO_FIND_MIXER for output [0] = [] mpd-kizi | c_mixer_device for output [0] = [] mpd-kizi | ALSA OUTPUT [0] requires INTEGER_UPSAMPLING [] mpd-kizi | No additional outputs provided mpd-kizi | # mpd configuration file mpd-kizi | database { mpd-kizi | plugin "simple" mpd-kizi | path "/db/tag_cache" mpd-kizi | } mpd-kizi | music_directory "/music" mpd-kizi | playlist_directory "/playlists" mpd-kizi | state_file "/db/state" mpd-kizi | state_file_interval "10" mpd-kizi | sticker_file "/db/sticker" mpd-kizi | bind_to_address "0.0.0.0" mpd-kizi | port "6600" mpd-kizi | log_file "/log/mpd.log" mpd-kizi | log_level "verbose" mpd-kizi | zeroconf_enabled "no" mpd-kizi | decoder { mpd-kizi | plugin "wildmidi" mpd-kizi | enabled "no" mpd-kizi | } mpd-kizi | input { mpd-kizi | plugin "curl" mpd-kizi | } mpd-kizi | audio_output { mpd-kizi | type "alsa" mpd-kizi | name "sound_og_kizi" mpd-kizi | enabled "yes" mpd-kizi | device "hw:/dev/snd/controlC3" mpd-kizi | mixer_type "software" mpd-kizi | output_format "44100:16:2" mpd-kizi | } mpd-kizi | replaygain "off" mpd-kizi | replaygain_preamp "0" mpd-kizi | replaygain_missing_preamp "0" mpd-kizi | replaygain_limit "yes" mpd-kizi | volume_normalization "no" mpd-kizi | filesystem_charset "UTF-8" mpd-kizi | Removing player state information from state file [/db/state] mpd-kizi | CMD_LINE=[/app/bin/compiled/mpd --stderr --no-daemon /app/conf/mpd.conf] mpd-kizi | libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator' mpd-kizi | vorbis: Xiph.Org libVorbis 1.3.7 mpd-kizi | opus: libopus 1.3.1 mpd-kizi | sndfile: libsndfile-1.2.0 mpd-kizi | hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled mpd-kizi | adplug: adplug 2.3.3 mpd-kizi | simple_db: reading DB mpd-kizi | input: Input plugin 'qobuz' is not configured: No Qobuz app_id configured mpd-kizi | curl: version 7.88.1 mpd-kizi | curl: with GnuTLS/3.7.9 mpd-kizi | state_file: Loading state file /db/state mpd-kizi | config: option 'output_format' on line 29 was not recognized mpd-kizi | event: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted mpd-kizi | client: [0] opened from 127.0.0.1:33614 mpd-kizi | client: [0] process command list mpd-kizi | client: process command "tagtypes "clear"" mpd-kizi | client: command returned 0 mpd-kizi | client: [0] process command list returned 0 mpd-kizi | client: [0] process command "lsinfo """ mpd-kizi | client: [0] command returned 0 mpd-kizi | client: [0] closed mpd-kizi | client: [1] opened from 127.0.0.1:56984 mpd-kizi | client: [1] process command list mpd-kizi | client: process command "load "myplaylist"" mpd-kizi | client: command returned 0 mpd-kizi | client: [1] process command list returned 0 mpd-kizi | client: [1] closed mpd-kizi | client: [2] opened from 127.0.0.1:38270 mpd-kizi | client: [2] process command "listall """ mpd-kizi | client: [2] command returned 0 mpd-kizi | client: [2] closed mpd-kizi | client: [3] opened from 127.0.0.1:38272 mpd-kizi | client: [3] process command "listall "myplaylist"" mpd-kizi | exception: No such directory mpd-kizi | client: [3] command returned 3 mpd-kizi | client: [3] closed
Thanks a lot for your support 👍
Try replacing
mpc listall myplaylist
with simply
mpc listall
And please post the results. You might have seen that I just discovered a bug thanks to your issue, about that output_format which should become output. I would suggest to just remove the property until I fix this.
About the alsa output, which device do you actually want to use as the output?
the output of "mpc listall" is nothing :(
root@mpd-kizi:/app/bin# mpc listall root@mpd-kizi:/app/bin#
At host server, i have attached 3 USB Sound Devices. Each device belongs to one loudspeaker in one Room. For my test it doesn´t matter whether I´m using /dev/snd/controlC2 or C2 or C3. Currently I´m using controlC3.
But i think the problem is at file accessing, but I dont know why
Hello, I am trying to reproduce your issue but it works for me. I cannot seem to find the error in your case by looking at the outputs. Here's the walkthrough:
I have ./music
with just one mp3 file, drive-breakbeat-173062.mp3
In ./playlists
I have myplaylist.m3u, contents is:
drive-breakbeat-173062.mp3
In the compose file, ./music is mounted to /music and ./playlists to /playlists I then enter my container using bash with (adapt to your case):
docker-compose exec mpd bash
List music files:
root@gruesome03:/app/bin# ls -la /music
total 3444
drwxr-xr-x 2 mpd-user mpd-user 4096 Oct 29 10:08 .
drwxr-xr-x 1 root root 4096 Oct 29 11:01 ..
-rw-r--r-- 1 mpd-user mpd-user 3517544 Oct 29 10:08 drive-breakbeat-173062.mp3
show the playlist content:
root@gruesome03:/app/bin# cat /playlists/myplaylist.m3u
drive-breakbeat-173062.mp3
install mpc:
root@gruesome03:/app/bin# apt-get update && apt-get install -y mpc
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8780 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6408 B]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [88.9 kB]
Fetched 9127 kB in 3s (3393 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
mpc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 43.8 kB of archives.
After this operation, 127 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 mpc amd64 0.34-1+b1 [43.8 kB]
Fetched 43.8 kB in 0s (1260 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package mpc.
(Reading database ... 9829 files and directories currently installed.)
Preparing to unpack .../mpc_0.34-1+b1_amd64.deb ...
Unpacking mpc (0.34-1+b1) ...
Setting up mpc (0.34-1+b1) ...
List available playlists:
root@gruesome03:/app/bin# mpc lsplaylists
myplaylist
Load myplaylist:
root@gruesome03:/app/bin# mpc load myplaylist
loading: myplaylist
executing listall:
root@gruesome03:/app/bin# mpc listall
drive-breakbeat-173062.mp3
Playback finally:
root@gruesome03:/app/bin# mpc play
drive-breakbeat-173062.mp3
[playing] #1/1 0:00/1:50 (0%)
volume:100% repeat: off random: off single: off consume: off
Does this help?
For some reasons I don't find a line similar to this
mpd | update: added /drive-breakbeat-173062.mp3
on your output. Are you using an updated image?
Maybe try a mpc update
after installing mpc, before loading the playlist... let's see if this helps.
As the output device, considering your devices,
root@server:/usr/local/svn/docker-compose-test# cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfeb44000 irq 30
1 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfeb40000 irq 16
2 [Device ]: USB-Audio - USB PnP Sound Device
C-Media Electronics Inc. USB PnP Sound Device at usb-0000:00:13.2-2.1, full spe
3 [Set ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-0000:00:13.2-2.4.1, full speed
4 [Set_1 ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-0000:00:13.2-2.2, full speed
I would use something, alternatively, like the following:
always mount /dev/snd to /dev/snd as in your last compose file.
I am building a new image which fixes the "output_format" field, now it will create a (hopefully) correct configuration.
i did it:
root@mpd-kizi:/app/bin# mpc update Updating DB (#1) ... volume: 99% repeat: off random: off single: off consume: off root@mpd-kizi:/app/bin# mpc listall myplaylist MPD error: No such directory root@mpd-kizi:/app/bin# mpc listall Track01.mp3 root@mpd-kizi:/app/bin# mpc play 1 MPD error: Bad song index root@mpd-kizi:/app/bin# mpc play volume: 99% repeat: off random: off single: off consume: off root@mpd-kizi:/app/bin# mpc play 0 error parsing song numbers from: 0
the log output:
mpd-kizi | update: starting mpd-kizi | update: reading /Track01.mp3 mpd-kizi | update: added /Track01.mp3 mpd-kizi | simple_db: removing empty directories from DB mpd-kizi | simple_db: sorting DB mpd-kizi | simple_db: writing DB mpd-kizi | update: finished mpd-kizi | client: [12] opened from 127.0.0.1:56248 mpd-kizi | client: [12] process command "listall "myplaylist"" mpd-kizi | exception: No such directory mpd-kizi | client: [12] command returned 3 mpd-kizi | client: [12] closed mpd-kizi | client: [13] opened from 127.0.0.1:56252 mpd-kizi | client: [13] process command "listall """ mpd-kizi | client: [13] command returned 0 mpd-kizi | client: [13] closed mpd-kizi | client: [14] opened from 127.0.0.1:40190 mpd-kizi | client: [14] process command "play "0"" mpd-kizi | exception: Bad song index mpd-kizi | client: [14] command returned 3 mpd-kizi | client: [14] closed mpd-kizi | client: [15] opened from 127.0.0.1:38004 mpd-kizi | client: [15] process command "play" mpd-kizi | client: [15] command returned 0 mpd-kizi | client: [15] process command list mpd-kizi | client: process command "status" mpd-kizi | client: command returned 0 mpd-kizi | client: process command "currentsong" mpd-kizi | client: command returned 0 mpd-kizi | client: [15] process command list returned 0 mpd-kizi | client: [15] closed mpd-kizi | client: [16] opened from 127.0.0.1:33248 mpd-kizi | client: [16] closed
ok, a "mpc listall" shows me th track now :) But playing it still not possible :(
a last test without mpc, direct using mpd but without a better result:
root@mpd-kizi:/app/bin# telnet localhost 6600 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. OK MPD 0.23.5 status volume: 99 repeat: 0 random: 0 single: 0 consume: 0 partition: default playlist: 2 playlistlength: 0 mixrampdb: 0 state: stop OK volume 98 OK listall file: Track01.mp3 OK play 1 ACK [2@0] {play} Bad song index play OK status volume: 100 repeat: 0 random: 0 single: 0 consume: 0 partition: default playlist: 2 playlistlength: 0 mixrampdb: 0 state: stop OK
Try
mpc play 1
instead of 0
Let's see if this helps
i tried both, i know that mpd starts from 1 instead at 0. but same result
mpc stats:
root@mpd-kizi:/app/bin# mpc stats Artists: 1 Albums: 1 Songs: 1 Play Time: 0 days, 0:00:00 Uptime: 0 days, 0:07:30 DB Updated: Sun Oct 29 11:33:35 2023 DB Play Time: 0 days, 0:02:12
BTW a new image is building. You can now specify property "INSTALL_MPC=yes" and mpc will be installed at startup. I might also install mpc by default considering how small that program is... what do you tjhink?
i think its a good idea for testing purposes, its really very small :)
it seems you didn't load the playlist in your last attempt. Try:
mpc load myplaylist
then
mpc play 1
I am not an expert of mpc, I just took a look at the commands and from what I understand,
mpc listall
will display all files available to mpd, not your queue.
BTW release with mpc included is building right now. Edit: builds complete
Hi, your new image works perfectly :)
docker pull giof71/mpd-alsa:latest
The format appears in mpd.conf without error message, mpc is available
mpd1: image: giof71/mpd-alsa container_name: mpd-kizi hostname: mpd-kizi restart: unless-stopped volumes: - ./mpd/music:/music:r - ./mpd/playlists:/playlists:rw devices: - /dev/snd:/dev/snd environment: - INSTALL_MPC=yes - MPD_ENABLE_LOGGING=yes - MPD_LOG_LEVEL=verbose - ALSA_OUTPUT_DEVICE=hw:Set - ALSA_OUTPUT_CREATE=yes - ALSA_OUTPUT_ENABLED=yes - ALSA_OUTPUT_NAME=sound_og_kizi - ALSA_OUTPUT_MIXER_TYPE=software - ALSA_OUTPUT_OUTPUT_FORMAT=44100:16:2
and now my test:
root@mpd-kizi:/app/bin# mpc lsplaylists myplaylist root@mpd-kizi:/app/bin# mpc update Updating DB (#1) ... volume:100% repeat: off random: off single: off consume: off root@mpd-kizi:/app/bin# mpc playlist myplaylist V.A. - Nat King Cole - El Choclo root@mpd-kizi:/app/bin# mpc play 1 V.A. - Nat King Cole - El Choclo [playing] #1/1 0:00/2:12 (0%) volume:100% repeat: off random: off single: off consume: off root@mpd-kizi:/app/bin# mpc stop volume:100% repeat: off random: off single: off consume: off
I think, this command was missing previously: mpc playlist myplaylist
I think it would help to integrate a small "first start" section in your wiki for all the other newbies :)
Thanks a lot for your support
Sure! I am happy the issue is resolved. Also I have found a long-standing issue in the process, and added an almost obligatory feature like including mpc. How do I let you contribute to the wiki? Let me know if you can post content there.
Also, please consider starring the repo if that is ok for you.
Ah, by the way, INSTALL_MPC is no longer needed. That variable was quite short-lived! ALSA_OUTPUT_OUTPUT_FORMAT should be replace with ALSA_OUTPUT_FORMAT, although I tried to preserve the functionality for existing configurations. You should see a warning in the logs suggesting the change.
I read in a hurry, and I thought you wanted to contribute. But it's no problem, I can post something. Do you have an idea of what kind of content would be helpful?
No Problem, i will prepare something for you during the next days 👍
Hello, can we close this? About the documentation changes you wanted to propose, feel free to get in touch maybe with another issue, or with a pull request.
Yes, i will do that. Thanks a lot for your Support :)
Hi, my problem is, i cannot play a playlist. My Docker compose:
my playlist under /playlists/myplaylist,m3u
/music/Tanzmusik/Ballroom_Dance_Collection/Ballroom_Dance_Collection_Tango/01_-_Nat_King_Cole_-_El_Choclo.mp3
the path is correct:
Inside of docker i have installed mpc to test it:
I think the main problem is that:
My music directory is definaed as mpd music directory in docker-compose definition. Path is available inside of docker but mpd tells me "no such directory" Have anyone a hint what could be the problem?