Skipped some songs from album

Need help with MPD?
Post Reply
bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Skipped some songs from album

Post by bern »

Hi,
When I play some 'hi-res' album on my BeagleBone Black machine some songs are skipped. I use satellite setup. Satellites are connected to server via home wifi. The same album played using squeezelite instead of MPD are played normally (without skipping).
Furthermore long time passes between selection of album songs. For example when I 'press' 'next' I have to wait about 10 sec before the next song starts. This concern not only hi-res content but also 44.1/16. When I use squeezelie on the same machine there is no such delay. I prefer MPD from SQ perspective :)
What should I do to improve/optimise this?
See details:
https://paste.ubuntu.com/p/pBQfxV8Gbh/

max
Forum team
Posts: 1093
Joined: January 15th, 2013, 3:43 pm

Re: Skipped some songs from album

Post by max »

FFmpeg has difficulties decoding some files. Could you send one such file to me? Maybe I can figure out how to help FFmpeg do it. (My email address is in the imprint)

bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Re: Skipped some songs from album

Post by bern »

Thanks, I send an email with the link.
Regards,

max
Forum team
Posts: 1093
Joined: January 15th, 2013, 3:43 pm

Re: Skipped some songs from album

Post by max »

I can play that file, both with FLAC and with FFmpeg.
But this log message looks suspicious:
"exception: smbc_read() failed: Software caused connection abort"
This means that libsmbclient reported an aborted connection to your file server. I don't know how this can happen, but it's a problem between libsmbclient and your file server, with MPD not (directly) involved.

bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Re: Skipped some songs from album

Post by bern »

Do you think that this libsmbclient issue is also responsible for long breakes after song selection?
How could we investigate this?
What should I check?
I have samba server 4.10.7 installed on home x64 Ubuntu server 19.10 with sata HD disks (containing music files) attached to server pcie controllers.
I have standard samba configuration in the /etc/samba/samba.conf among others with the share:

Code: Select all

[music]
	path = /var/lib/mpd/music
	writeable = yes
	browseable = yes
	valid users = mpd
in the etc/fstab I have some lines mounted directories contained music from different disks to '/var/lib/mpd/music' for example:

Code: Select all

/mnt/harddisk2/MUSIC /var/lib/mpd/music/Ber_Music     none     bind
/etc/MPD.conf on server side:

Code: Select all

music_directory		"/var/lib/mpd/music"
database {
  plugin "simple"
  path "/var/lib/mpd/db"
  cache_directory "/var/lib/mpd/cache"
}

playlist_directory		"/var/lib/mpd/playlists"

log_file			"/var/log/mpd/mpd.log"

state_file			"/var/lib/mpd/state"

sticker_file                   "/var/lib/mpd/sticker.sql"

user				"mpd"

group                          "audio"

bind_to_address		"10.10.10.1"

follow_inside_symlinks		"yes"

input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

# QOBUZ input plugin
input {
        enabled    "no"
        plugin     "qobuz"
#        app_id     "ID"
#        app_secret "SECRET"
#        username   "USERNAME"
#        password   "PASSWORD"
#        format_id  "N"
}

# TIDAL input plugin
input {
        enabled      "no"
        plugin       "tidal"
#        token        "TOKEN"
#        username     "USERNAME"
#        password     "PASSWORD"
#        audioquality "Q"
}

decoder {
        plugin                  "hybrid_dsd"
        enabled                 "no"
#       gapless                 "no"
}

audio_output {
	type		"alsa"
	name		"My ALSA Device"
	device		"iec958:CARD=Audio,DEV=0"	# optional
	mixer_type      "hardware"      # optional
#	mixer_device	"default"	# optional
#	mixer_control	"PCM"		# optional
#	mixer_index	"0"		# optional
}

filesystem_charset		"UTF-8"

neighbors {
    plugin "udisks"
}

max
Forum team
Posts: 1093
Joined: January 15th, 2013, 3:43 pm

Re: Skipped some songs from album

Post by max »

Maybe libsmbclient is responsible for that.
Maybe can you switch to NFS? MPD's NFS client is much better because libnfs is much better than libsmbclient.

bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Re: Skipped some songs from album

Post by bern »

ok.
I'm trying to set up NFS for MPD. Unfortunately I have no experience with this protocol.
I installed 'nfs-kernel-server' on Ubuntu server and 'nfs-common' on BBB.
and added:

Code: Select all

/var/lib/mpd/music 10.10.11.0/24(rw,sync,no_subtree_check)
to /etc/exports and made 'sudo exportfs -a' a restart 'nfs-kernel-server' service.

My music direcory on server side '/var/lib/mpd/music' has mpd:mpd permissions.

on client (BBB) i changed one line in the /etc.mpd.conf:

Code: Select all

music_directory		"nfs://10.10.10.1/var/lib/mpd/music"
I can added songs to playlist but unfortunately receive message in the log:

Code: Select all

Apr 20 17:40 : exception: NFS error on 10.10.10.1:/var/lib/mpd/music: nfs_mount_async() failed: RPC error: Mount failed with error MNT3ERR_ACCES(13) Permission denied(13)
Apr 20 17:40 : exception: Failed to decode nfs://10.10.10.1/var/lib/mpd/music/....
How to fix this?

max
Forum team
Posts: 1093
Joined: January 15th, 2013, 3:43 pm

Re: Skipped some songs from album

Post by max »

Apparently, you didn't read the manual: https://www.musicpd.org/doc/html/plugins.html#nfs
"Since MPD is not allowed to bind to “privileged ports”, the NFS server needs to enable the “insecure” setting"

I wonder why you give MPD write access...

bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Re: Skipped some songs from album

Post by bern »

Indeed I missed plugins descriptions...
SO I changed one line in /etc/exports to:

Code: Select all

/var/lib/mpd/music 10.10.11.0/24(ro,insecure)
uninstalled 'nfs-common' on BBB (since is unnecessary)
But still cannot play:

Code: Select all

Apr 20 20:53 : exception: Failed to decode nfs://10.10.10.1/var/lib/mpd/music/Ber_Music/Women of Ireland The Chieftains - Barry Lyndon.opus
Apr 20 20:53 : exception: nested: NFS: Lookup of /Ber_Music/Women of Ireland The Chieftains - Barry Lyndon.opus failed with NFS3ERR_NOENT(-2)
I tried give MPD broad access (just in case) and want limit later.

max
Forum team
Posts: 1093
Joined: January 15th, 2013, 3:43 pm

Re: Skipped some songs from album

Post by max »

The NFS server tells MPD that the file does not exist. Does it?

bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Re: Skipped some songs from album

Post by bern »

The files 'physically' exist for example in the '/mnt/harddisk2/MUSIC' directory but NFS seems not see the content of bind mounted directory /etc/fstab:

Code: Select all

/mnt/harddisk2/MUSIC /var/lib/mpd/music/Ber_Music     none     bind
/mnt/harddisk1/EL/music /var/lib/mpd/music/Ela_Music     none     bind
How to change that?

bern
Posts: 41
Joined: April 28th, 2019, 6:06 pm

Re: Skipped some songs from album

Post by bern »

Thank you so much for pointing NFS instead of SMB.
Now everything works fast. As it should.
The album I was having trouble works without a problem

I have to add crossmnt option to /etc/exports wchich is necessary to share exported directories inside an exported directory

Code: Select all

/var/lib/mpd/music 10.10.11.0/24(ro,insecure,crossmnt)

Post Reply