Debian 9 Stretch

A DIY digital music streamer with exceptional performance

Moderator: Staff

fatjulio
Active Member
Active Member
Posts: 81
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio » 2019-01-12 01:47

Yes, I'm using Bubble upnp and kazoo on Android, same results.

tokenbrit
Very active member
Very active member
Posts: 759
Joined: 2012-03-22 19:47
Location: New England

Re: Debian 9 Stretch

Post by tokenbrit » 2019-01-15 17:00

Hi Sopper, can you help, again, please?
Prompted by recent discussions about the difference in stopping processes as opposed to changing process priority, I remembered the Sopper helpful step-by-step HAKAI install & setup guide.

In your original instructions you created user usbaudio, and installed mpd...
Sopper wrote:
2018-12-17 11:18
Debian 9 Stretch
.. get the right debian install version; i recommend the netinstall version...
.. Boot your system using the installation medium that you prepared and then proceed as follows
...
◾After the "root" is set up a "Normal User Account" is created. In this example we use the user "usbaudio"
...

So, now you have Debian installed...
(install alsa-utils, alsa-tools, mpd (& upmpdcli))
.. you need a proper mpd.conf file.
(music_directory "/home/usbaudio/share/music")
...
From mpd documentation, the music player daemon runs as user id at initialization - usbaudio, as above - and seems to configure itself to autostart...

In a later step, you mention creating a new user - audio - and setting the priority to audio:
Sopper wrote:
2018-12-17 11:19
Setting priority to audio
.. create a new usergroup "audio" in your debian:
.. Now set priority for this user...
I'm not sure whether this was specifically related to using a real-time kernel, but I couldn't see how this would have any effect on mpd (or upmpdcli). I know you've since installed a different kernel but, for the audio user priority to work, doesn't the user need to match the one in the mpd configuration? From your example(s), couldn't you just have elevated the priority of usbaudio?

Please don't take this as any criticism - your guides have been valuable. I know the instructions were written in stages as experience was gained, so I wanted to make sure I understood, and checked possible inconsistencies to help anyone coming across these instructions for reference.

On a related note, upmpdcli & mpd seem to autostart reliably and my HAKAI reboots as headless without the need to login with username and password. Therefore I did not bother to install mingetty - I just SSH in & out as needed. I trust there's no reason to install mingetty other than to solve troublesome (re)booting issues, if experienced?

Sopper
Very active member
Very active member
Posts: 272
Joined: 2017-05-16 14:50
Location: The Netherlands

Re: Debian 9 Stretch

Post by Sopper » 2019-01-15 17:51

Mpd will run as current user if no user is present in the mpd.conf file.
The mixup is caused due to taking 2 different pieces from guides and put together.
I recommend to put # for user and group in mpd.conf, so mpd will always run as current user.

I don’t think priority settings impact performance, but one can try.
It only runs mpd and upmpdcli, nothing more... so all priority already goes to music streaming.

The impact of most tweaks is really minor or none, but combined they can lead to big improvement.
The variables are just too many to test though and I have lost track of all the modifications I made.
I’m even unsure if a RT-kernel helps...
# HAKAI # Sagatun mono + Tundra mono # Harbeth SHL5+ 40th Ann # Mogami Neglex III 2803 + 2804

fatjulio
Active Member
Active Member
Posts: 81
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio » 2019-01-18 07:30

After more variations, I've got it to sound the best it has yet. I'm finding MPD 0.20.21 the best sounding version. Why that's different to my previous thoughts are I hadn't realized the mpd.conf file didn't have an audio_buffer setting, so it was using the default 4096. Once I put it to 256, wow. I've also installed an RT kernel, which I think helps, but doesn't do any harm.

On MPD 0.20.xx compressed files stutter unless the buffer is about 2048. But MPD 0.21.xx doesn't stutter at 256. I might have to configure minumserver to transcode compressed to wav.

Sopper
Very active member
Very active member
Posts: 272
Joined: 2017-05-16 14:50
Location: The Netherlands

Re: Debian 9 Stretch

Post by Sopper » 2019-01-18 08:54

fatjulio wrote:
2019-01-18 07:30
After more variations, I've got it to sound the best it has yet. I'm finding MPD 0.20.21 the best sounding version.
0.20.21 serious? Or typo?
# HAKAI # Sagatun mono + Tundra mono # Harbeth SHL5+ 40th Ann # Mogami Neglex III 2803 + 2804

fatjulio
Active Member
Active Member
Posts: 81
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio » 2019-01-18 11:43

Yes, 0.20.21
Maybe it suits my system more than the later versions. It sounds more live and emotional to me.

Paaf
Active member
Active member
Posts: 239
Joined: 2012-02-22 18:21
Location: Stockholm

Re: Debian 9 Stretch

Post by Paaf » 2019-01-18 11:52

@fatjulio
Do you use "apt-get" to install 0.21.3? Where did you find it?

Also, thanks for that about the audio_buffer! After you wrote that, I realized that a script had overwritten my mpd.conf and that I was back on the default setting.

(I remember that I did comment here that the apt-get installed MPD was not as good as the home-built one. Of course it was different, it used different settings!)

I am now comparing 4096 and 256 back and forth.

fatjulio
Active Member
Active Member
Posts: 81
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio » 2019-01-18 11:56

I used the build it yourself method originally listed. I think the audio buffer size has a greater impact on the 0.20.xx versions.

Paaf
Active member
Active member
Posts: 239
Joined: 2012-02-22 18:21
Location: Stockholm

Re: Debian 9 Stretch

Post by Paaf » 2019-01-18 12:48

Thanks.

I currently use MPD 0.20.23.
Setting 256 is more tuneful than 4096 for regular FLAC!

However, for 24/88 FLAC, the stuttering is horrible, tunefulness zero.

fatjulio
Active Member
Active Member
Posts: 81
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio » 2019-01-18 23:22

Do you have minimserver? You could specify to convert flac above 16/44.1 to wav or flac 16/44.1. That might still let you use 256.

Paaf
Active member
Active member
Posts: 239
Joined: 2012-02-22 18:21
Location: Stockholm

Re: Debian 9 Stretch

Post by Paaf » 2019-01-19 00:58

Using MiniDLNA. That's a good idea - and I think one could also probably convert it in MPD.

fatjulio
Active Member
Active Member
Posts: 81
Joined: 2012-01-13 23:22

Re: Debian 9 Stretch

Post by fatjulio » 2019-01-19 04:05

I think mpd is already doing the converting, which is why it's stuttering. It has to get down to 16/44.1 to be output

Post Reply