HifiZine
The enthusiast's audio webzine

How to stream Qobuz to almost anything

A few years ago, I wrote How to stream TIDAL to the Raspberry Pi. That article turned out to be one of HifiZine’s most popular for long-term readership. I assumed in that article that audio would be played to a Raspberry Pi with Volumio installed on it. I think it’s about time, however, for some updates that cover things other than the Raspberry Pi. This article presents the big picture, and follow-up articles will look at specific audio players.

I’m going to use Qobuz as the streaming service in these articles. Qobuz streams native high-res audio at up to 192 kHz, so it raises the bar on the capabilities of the streaming system. I also noted that the Qobuz desktop player claims DLNA streaming support (in beta) but as far as I can tell, it doesn’t work. The method described here does.

Contents

System architecture

Figure 1 illustrates the architecture of the system, which sets out the main pieces of hardware and software involved. In the center is a key piece of software called BubbleUPnPServer. You can install it on a Mac or Windows computer, or on its own SBC (single board computer). This software is what enables us to stream Qobuz to lots of audio players, streamers, devices, or “things”. By “thing” I am of course evoking the Internet of Things (ioT).

In UPnP parlance, these “things” are called renderers. As long as a device supports UPnP/DLNA, it will work in this architecture. While previously I have used a Raspberry Pi running Volumio as an example, there are lots of things that can be used, including other Linux SBCs and off-the-shelf devices such as those on this list. You can have as many renderers as you like on your network.

You also need a way to browse music on Qobuz, to select a renderer to play music to, and to control playback. That’s the purpose of the control point or controller i.e. the user interface. With this architecture, you don’t need to leave a controller turned on once you have started music playback. You can also switch between controllers while music is playing. The diagram lists controller apps that I have found to work well.

Figure 1. System architecture for Qobuz streaming

Some example renderers

This photo shows a couple of the renderers I’m using right at the moment. At the top left is a NanoPi Neo2, while on the right is a Raspberry Pi with an Allo DigiOne digital output HAT. The Pi is running the ready-to-go distribution Volumio, while the NanoPi Neo2 has the player software installed from scratch. This is fairly straightforward to do with almost any Linux SBC, and I’ve provided instructions in Appendix B.

Two renderers sitting on top of my RME ADI-2 Pro

There are more expensive turnkey SBC-based streamers (although still cheap by high end audio standards) with analog outputs that are engineered for high quality audio output. For example, the folks at Volumio have released their own streamer called the Primo, and young company Orchard Audio have announced the forthcoming PecanPi.

Don’t get stuck thinking this is only about cheap single board computers, though. High end audio streamers – such as those from Lumin and Linn, who provide two of my preferred controller apps for free – fit into this architecture too. As do combined digital streamer and speaker crossover units such as the DEQX HDP-5.

It’s exciting times in the land of networked audio streaming!

Set up BubbleUPnPServer

Once you have a renderer or two, you will need to get BubbleUPnPServer running on your network. To install on a Windows computer, follow the instructions here. You can choose either the single-user install or install as a service. For a Mac, follow the instructions here. You can also install it on an SBC as I have done for my droidisk.

When installation completes, a browser should start up with the address http://localhost:58050. I recommend turning off all Internet access options, as explained in the earlier article. On the Media Renderers page, you should see the renderers you have on your network down the left side:

Click on one to select it and turn on the option “Create an OpenHome renderer.” In the “Room” field, type in a different name. In this example, I have used “NX4 Qobuz.” You will probably want to set the maximum sample rate for your Qobuz streaming to better than the default 44.1 kHz – Qobuz can stream up to 192 kHz, depending on the service tier to which you have subscribed. Finally, turn on the option “Gapless playback.”

If there are fields enabled for audio decoding, set to “Never use”:

Set up a controller

Pick a DLNA controller from those recommended in the earlier article. I’ll use Linn Kazoo as an example.

Note: if you have installed BubbleUPnPServer on Windows, you cannot run Linn Kazoo on the same computer. You will need to install Kazoo on a different computer or use a phone or tablet for the controller.

In Kazoo, select the renderer:

Go to the settings page:

Click on Qobuz and enter your login credentials:

The Qobuz home page will appear. Search for music and click on Play Now:

 

And that’s it! You can now stream Qobuz to any UPnP/DLNA renderer on your network. Until next time, happy streaming!

 

 

Appendix A. Set up a music server

To stream files from your own music library to the renderers, I suggest using MinimServer. Usually, you install it on the same machine that has your music files on it. This could be even a NAS. See the MinimServer installation page. Once you have MinimServer installed, you can select files to play using the same controller that you use for Qobuz.

Appendix B. Turn any SBC into a music player

When using a single-board ARM computer (the Raspberry Pi being the best-known) as a music player, it’s usual to use a complete distribution (aka “distro”) like Volumio. However, the list of SBCs (single board computers) supported by Volumio is quite short – what if I want to stream to a different board? Or perhaps I have a board that has a different distro on it and I want to add music playback capabilities to.

As long as you have set things up as described earlier in this article, installing a couple of packages on the SBC will meet this need. The instructions below should work if you’re using an OS based on Debian or Ubuntu. I’ve done this on a number of boards now, including the Raspberry Pi 3A+, the ODroid HC1, the NanoPi Neo2, and the NanoPi Neo Plus2. Some boards didn’t work that well, usually because of networking or WiFi limitations, like the Raspberry Pi Zero and the NanoPi Neo. In general, I find it’s best to avoid boards that only support 2.4 GHz WiFi.

Before installing, determine the card number of your USB DAC. It’s most likely to be 1, but better to check and make sure:

username@sbc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: DSD [NX4 DSD], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In this example, the USB DAC is card 1, device 0.

Install mpd, the Music Player Daemon:

username@sbc:~$ sudo apt install -y mpd mpc
Reading package lists... Done
Building dependency tree       
...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.13) ...

Edit the MPD configuration file:

username@sbc:~$ sudo nano /etc/mpd.conf

Locate the lines for audio_output and change them to:

audio_output {
        type                "alsa"
        name                "MySBC"
        device              "hw:1,0"
        replay_gain_handler "none"
        auto_resample       "no"
        auto_channels       "no"
        auto_format         "no"
        mixer_type          "none"
}

Note that the line

        device          "hw:1,0"

specifies output 0 of card 1. If your USB DAC is a different card number, use e.g. “hw:2,0” for card 2 and so on.

Now install upmpdcli, which is a UPnP/DLNA interface to mpd:

username@sbc:~$ sudo add-apt-repository ppa:jean-francois-dockes/upnpp1
 Ubuntu builds for the upmpdcli UPnP front-end for mpd, the upplay Linux UPnP Control Point
 and the libupnpp library they depend on.
 More info: https://launchpad.net/~jean-francois-dockes/+archive/ubuntu/upnpp1
Press [ENTER] to continue or Ctrl-c to cancel adding it.
<Enter>
...
Reading package lists... Done
username@sbc:~$ sudo apt-get update
username@sbc:~$ sudo apt-get install -y upmpdcli
Reading package lists... Done
...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.13) ...

Edit the configuration file:

username@sbc:~$ sudo nano /etc/upmpdcli.conf

Search for the line matching each property below and change as shown:

friendlyname = MyPlayer
openhome = 0
checkcontentformat = 0

In theory you can now just restart mpd and upmpdcli, but I find that it’s better to do a full reboot after making configuration changes:

username@sbc:~$ sudo shutdown -r now

After a minute or two, you should see the renderer “MyPlayer” appear in BubbleUPnPServer.

NanoPi Neo Plus2 (right) with Topping NX4 DSD makes a nice little headphone listening station that can fit almost anywhere. This little SBC has an onboard eMMC and has quickly become one of my favorites. AA battery included for scale only.

 


Readers' comments

    You have described my methodology to a t! An important fact to include is that BubbleUPnP server also allows chromecast devices to be assigned as UPnP/DLNA or Openhome renderers, and offers equalization for each renderer instance. With Minimserver one can use the companion Minimstreamer that allows for transcoding (some native, some with the aid of FFMpeg).

    I currently have seven physical renderers (one Windows 7, three linux, two chromecast and a D-Link dch m225 streamer/wifi extender) and one virtual group comprising the chromecast devices grouped together through Google Home. The Windows and two linux devices run Foobar2000 with the foo_upnp component; the other linux device runs gmediarender.

    My control program is Linn Kazoo run on a cheap android phone dedicated to the task.

    BubbleUPnP server is run on an Android set top box, while two instances of Minimserver run on two Windows devices.

    The only problems I have experienced with my set up is the inability of the chromecast devices to play some m3u radio streams and intermittent stuttering with the D-Link device, especially with higher sample rate material.

    • Hi, good to hear 🙂 Thank you for the tip on Chromecast, I will get one to try out.

    Great article. I use upmpcli and Minim server on my RPi Zero W with Justboom Digi Zero pHAT. Use Linn Kazoo (on PC and mobile phone) as controller. Works as a charm.

    It’s a pity that Qobuz cannot get their streaming support working while already more than a year in beta. Have contact Qobuz but they seam very reluctant… Cannot understand, though

Leave a Comment