Lossless Streaming Services
by, 11-03-2014 at 09:39 AM (12641 Views)
Large Music Libraries vs Streaming Services
A lot of us “Computer Audiophiles” have amassed huge libraries of music, either from our legacy CD library or from online vendors, such as HDTracks or some mixture of the two. So much music that it’s sobering to think we may not ever get a chance to listen to it all.
This reminds me of one of my favourite writers, Colin Wilson who wrote a book about his own favourite books, called ‘The Books in My Life’’. He’d amassed a large collection of 20,000 books and he realised he would probably never get to read them all. The point was though that they were there, and so the choice of what to read and when to read it was always available to him.
I believe it’s a similar situation with our large music libraries. With lossless streaming services such as Qobuz and WiMP/Tidal it’s like having one of the worlds larger public libraries available at our fingertips.
If you lived next door to the world’s largest public library, would you bother to amass your own collection of books? Is there any point in duplicating a sub-set of the music available on Qobuz or WiMP/Tidal on several hard drives (including back-ups) of course.
Well despite the easy and convenient access the lossless streaming services provide, you might still want to keep your own library at home. Here are the reasons I can think of as to why:
1/ The lossless streaming service may go out of business. We know Qobuz is currently in financial trouble and I really hope they survive. I’ve been a ‘HiFi” (lossless) subscriber since close to the beginning and have taken some time and trouble in building a lot of large playlists within Qobuz.
2/ There is a higher resolution version of the music you want, available to buy from Qobuz or elsewhere (Qobuz is also an online store, like HDTracks) and you’d rather have the higher rez version.
3/ Not all of the music listed on Qobuz or WiMP/Tidal, when you subscribe to their lossless streaming services, is actually available to stream losslessly. This is no fault of Qobuz or WiMP/Tidal; but is a restriction imposed on them by some of the labels. I would say at a guess that about 85% of their libraries are available for steaming losslessly. When you come across one or two tracks in an album that are restricted to an MP3 extract though, it’s very annoying. Another restriction that sometimes crops up on Qobuz is that a particular track is only available for streaming, if you’ve already purchased that track. “What’s the point?” you might say. Again another annoying restriction which is no fault of Qobuz.
4/ You can still get far more quality out of a 44.1khz 16bit file stored on your hard drive, using one of the better player apps, than can be obtained by streaming the same file from Qobuz or WiMP/Tidal. Or perhaps this is no longer the case. Read on:
Improving sound quality of Lossless streams
There are things we can do about this last point and I’m going to spend the rest of this article discussing those, without going into too much detail.
The premium “HiFi” Lossless streaming services are available to subscribers for around €20/$20 dollars per month. It seems like a pretty good deal to get unlimited lossless streaming at CD quality for what used to be the cost of just one CD per month.
The “HiFi” services are of course aimed at the audiophile though, which means people who really care about sound. The rest will be content with lossy services from Spotify; etc.
Since we care about sound, I feel we should be at liberty to use whatever playback method we wish to get the best out of these “HiFi” services for our 20 per month. I’ve been struggling with this issue for several years. Here’s a summary of my attempts to do something about it so far:
Before getting into the sound quality aspects, I just want to mention the desire to be able to remote control our interactions with these streaming services. We can use Apple’s remote app on IOS for iTunes or the JRemote app for controlling J River Media Center, so why shouldn’t we have the same capability with the streaming services when using a Mac or PC?
Both Qobuz and WiMP/Tidal have apps for IOS, Android; etc. but they are used for streaming to these mobile devices. They don’t have an app that can control either the Qobuz or WiMP/Tidal apps running on a desktop machine.
The sole solution I’ve found for this when interacting with Qobuz is to run XBMC on the desktop PC, install the Qobuz add-on for XBMC and then use XBMC’s free remote app on IOS or Android for controlling XBMC.
It just so happens that XBMC also offers several possibilities that can help us to improve sound quality as well.
My first attempt to improve the Sound from Qobuz was on a Mac using Pure Music from Channel D. Pure music comes with a feature called Channel D PAD, which allows you to route any audio playing on your Mac through Pure Music. It’s a little tricky to set up at first; but it is one way that you should be able to improve the sound of Qobuz lossless streaming. As long as you can get reliable playback using Pure Music’s DSP features. These include up-sampling to the maximum sample rate supported by your DAC, as well as the possibility of using Audio Unit plug-ins you may have available on your system. You might have an Audio Unit plug-in loaded within Pure Music to perform equalisation for digital room correction for example.
This might work out well for you. In my experience when it was working it was working fine; but there were times when I suffered break up of sound despite being on a reasonable internet connection of around 18 mbits/sec. I couldn’t solve this problem completely despite tweaking some parameters in Audio Midi Set-up. You might find yourself having to turn off all the DSP functions to get reliable playback; but this seems to defeat the purpose of running the audio through Pure Music.
All audio can benefit from this approach, including internet radio stations.
On the Windows side; but not yet on the Mac version, J River Media Center has a similar capability which it calls “Live Playback” (formally Loopthru). This involves sending the output of the original application (e.g. Qobuz desktop app) to the default windows sound card, J River then picks it up from there and sends it to whatever DAC you have instructed J River to use as output.
Since J River can perform up sampling to the Maximum capabilities of your DAC, as well as convert 44.1khz/16 bit audio to DSD (up to DSD256 if you have a DSD capable DAC) this is an excellent feature. As with Pure Music, J River also supports plug-ins (VST) and others for other DSP effects, such as digital room correction.
You’ll need a reasonably up to date and powerful machine to take advantage of these DSP features; but they do enable significant improvements over a lossless stream coming from Qobuz.
There is no need to use XBMC to loop the audio through J River. You can use the Qobuz desktop app and choose your default sound card as the output device from its preferences, and have j River handle the audio, then send it on to your DAC.
I have tried this with both the Qobuz and WiMP/Tidal desktop apps. From my tests it seems that both of these apps add a fair amount of overhead. They may work well enough as intended. In other words as used as the player directly to your external DAC. When you try to loop their output through J River though, you might experience sound break-up.
Whether you get reliable playback using the loopthru/live playback method, depends on a number of factors.
1/ The quality of your internet connection.
2/ How far you are trying to up-sample/convert the 44.1khz 16bit stream
3/ The specs and configuration of your computer
On a poor internet connection I could only go as far as up-sampling PCM to 192khz 24bit from WiMP/Tidal. Qobuz faired a bit better as I could go all the way to conversion to DSD256 using foo_asio, although I noticed some slight skipping from time to time. Perhaps that could be ameliorated by adjusting buffer sizes.
This shouldn’t be taken as a definitive test as there are always so many variables at play.
If instead I use the Qobuz XBMC add-on from within XBMC, and route XBMC’s output to the default internal sound card, I can loop this through J River, convert to DSD256 via foo_asio and get reliable playback. That is with this poor internet connection of 5-6mbits/sec.
There are other advantages to using XBMC
1/ It is the only way to remote control Qobuz and other XBMC hosted services with an IOS or Android device via XBMC’s free remote app.
2/ You can have many other audio sources apart from Qobuz, such as High Quality lossless radio stations (320kbps) all improved by this process.
Because of these advantages, I still use this feature of J River on Windows a lot. Although J River refers to this as WASAPI loop through, the only way I could get it working in XBMC is to set Audio Output to be Direct Sound to the Default Sound Card, I then tell J River to send the DSP’d audio out via ASIO or Kernel Streaming. So I don’t really know where WASAPI is coming into the picture.
When I first started using this method, I found that converting and up-sampling a Qobuz stream within J River was very demanding of my computer’s resources. A better way of achieving this came about thanks to a post I read on Computer Audiophile which caused me to realise I could make use of foo_asio from within J River. This is the means by which 44.1khz/16bit (and other PCM audio) can be converted to DSD within Foobar.
First you need to have Foobar installed and follow the rest of the instructions here: Configuring Foobar2000 for ASIO DSD / DXD Playback with exaSound DACs. > exaSound Audio Design
If you do this make sure you install the latest version of foo_input_sacd and the other software, as some of the links on that page are out of date.
So all this is about getting SACD to work in Foobar. What’s it got to do with improving the sound of audio looped through J River? Well thanks to J River’s flexibility foo_asio can now be set as the output device from within J River. Now instead of j River’s own DSP studio being used to convert the incoming stream to DSD, you can use foo_asio instead. This allows you to go all the way up to DSD256 if you have a DSD capable DAC, which is provided with its own ASIO driver.
(This does mean that J River’s DSP studio is now out of the picture, so you won’t be able to take advantage of other DSP effects at the same time.)
There’s even more good news with this method. 1/ It seems to use much less overhead and 2/ It sounds better than J River’s own audio engine.
This may all seem a bit tricky to configure at first; but once it’s working it will allow you to greatly improve the quality of all audio streams that you can pass through it.
Hat’s off both to Maxim who authored the foo_input_sacd plug-in and to J River for creating what must easily be the most full featured and flexible Media Center software out there. Flexible even to the point where their own audio engine and DSP effects can be replaced by another audio engine if so desired.
Despite what I’m going to be discussing below, I will always keep J River around to improve, at least, lossy audio streams this way. For home theatre folks it also seems to be the best software out there for getting the best image quality from DVD and Blu-Ray sources.
For many here on CA it is certainly good enough to be their go to player of choice for all audio as well. I just happen to feel that currently their audio engine is bettered by some other choices.
When it comes to the subject of improving the sound of lossless flac streams from Qobuz, can we go even further?
The next step I took was to designate another player to be the external player for XBMC. This other player could be any player that supports flac audio streams.
To cut a long story short, this proved unusable because it was only possible to play one track at a time. You had to tell xbmc each time you were ready to play the next track from an album or playlist.
It was enough though, to tell me that there was more room to improve the sound quality of Qobuz streams over what I had achieved with the loop through method.
Loop through methods still sound very good and I decided are certainly more than good enough for lossy streams, such as BBC Radio 3. It is, in any case, the only way of improving those streams.
Other listeners have reported great success in using JPlay to improve the sound of Qobuz steams. Srajan Ebaen, owner of 6Moons is happy with this method.
Now that I knew using an external player to play files fetched by Qobuz XBMC could sound so good, how to get this to work properly?
During all this time I had really learned to appreciate HQPlayer for playing back files on my hard drives. The improvements it makes to plain 44.1khz 16 bit redbook CD are nothing short of astonishing. At least if you have a system that’s resolving enough to appreciates those improvements.
I knew I had to find some way to take advantage of HQPlayer with Qobuz streams; but how?
Once I understood that HQPlayer could accept a playlist consisting of URLs where each url would open the flac stream of a track, I realised the answer would be in creating a playlist for each album or Qobuz playlist I wanted to play through HQPlayer.
This brings me to one other big advantage of XBMC and that is that anyone with the necessary Python programming skills can create an add-on for it. Those add-ons are open source and their code is available for modification.
The Qobuz XBMC add-on includes one Python script for handling albums called album.py and another for playlists named playlist.py.
I’ve created modified versions of those two files which fetch the urls for all the tracks within an album or playlist, and write them to a file on my hard drive called qobuzNow.m3u8
When all the urls of the album or playlist are fetched my modified scripts tell the operating system (Linux, OSX or Windows) to open the qobuzNow.m3u8, with the program designated to open that file type.
The advantage of this approach is that the script doesn’t need to know which program the user has chosen to open these files with. Obviously it has to be a program which can support flac streams.
Examples are: J River Media Center, Foobar, HQPlayer and VLC
All of these with the exception of Foobar are cross platform.
Note: There is also an XBMC add-on for WiMP/Tidal, that could probably be modified to do the same thing. This add-on does not currently support the “HiFi” lossless streaming mode, so it is not currently very interesting to me. I am currently beta testing the web HTML5 lossless WiMP/Tidal player, which works well and I think once this is officially rolled out, the author of the WiMP/Tidal add-on should be able to add the necessary support for lossless flac streaming.
The Future of Lossless streaming
I believe authors of software players need to take note that lossless streaming is going to be huge. Eventually, perhaps we will be doing all our listening this way.
In the meantime the Authors of the apps listed above have a great head start.
Providers of internet streaming services also need to take note that lossless streaming services appeal to audiophiles. Audiophiles will want to squeeze the best possible sound quality out of these streams, using any means at their disposal. You should be making it as easy as possible for users to be able to route your lossless streams through the user’s software player of choice.
This may seem a slight disadvantage to the lossless streaming provider, in that the user is not obliged to use their apps to play the music, so may miss the publicity you want them to see, about new releases; etc. This is presumably a disadvantage today when the steaming service is embedded within external music servers such as Sonos and Naim.
For computer audiophiles though, I would say you still need to go into the desktop apps regularly to build your playlists and, yes, to check-out new releases. The desktop apps and web-sites of these providers remain the best places to perform these actions. They have far more features and flexibility as well as more information than the XBMC add-ons can provide.
Since Qobuz is also a shop like HDTracks which sells high-resolution versions of many of it’s albums for download, you will also want to go to the app and/or the web-site to find out about these, and buy them.
So far I have hit upon two obstacles to completely reaching my audio nirvana with the Qobuz streaming service.
One is that the URL for each track is time-stamped. This is why the apps and add-ons are programmed to fetch just one track at a time.
When I build a playlist using my modified scripts above, I can sometimes use it to play through an entire album; but at other times it will stop short of reaching the end of the album, because by the time the software player reaches this point in the playlist the subsequent url’s have become out of date.
I am not sure; but I suspect the life expectancy of each url is an hour or just under. Keith Jarrett’s recording of Handel suites will play up to and including track 24 of 29 tracks. Then the only option is to fetch the album again and begin playback from track 25.
This is really annoying and I hope Qobuz, if you’re listening, you could either find a way of removing this time restriction altogether, or at least extend it to 2 hours so that any CD length album could play through from a playlist without any interruption.
I tried to figure out why Qobuz may be imposing this restriction. Perhaps it’s to prevent a subscriber sharing these urls with a non-subscriber. There is already a restriction as to the number of terminals a subscriber can be logged in from at any one time though, so I imagine this would solve that.
The only other explanation is that it has something to do with constraints on Qobuz’s resources. Interestingly I noticed that the urls get recycled, when what appeared to be a dead playlist suddenly came to life again and started playing in the middle of the night, much to my wife’s amusement ;-)
WiMP/Tidal, if you’re listening please don’t apply these time restrictions to your lossless urls. Or if you must, please make them as generous as possible in terms of length of time before expiry
The second obstacle is that my beloved player for sound quality; HQPlayer, does not currently automatically start to play a playlist when the operating system is told to use HQPlayer as the default app for opening playlists.
I’ve been playing my part to champion HQPlayer here, along with other enthusiasts, because in my opinion its sound quality is unequalled. The impression I’m getting is that people who’ve been using other players on either Mac or PC are at least tempted to switch to HQPlayer, for the sound quality advantages it seems to offer over all others. Especially using the poly-sinc family of filters, when either up-sampling PCM or converting to DSD.
HQPlayer is authored by just one guy though, so there isn’t the benefit of a team with different members concentrating on different areas of the app. In particular in terms of usability issues it is lacking in many ways.
One method to access local and streamed music sources
If you’ve followed me so far, here is what I’m trying to achieve:
With Qobuz XBMC add-on installed within XBMC, I use the XBMC remote app on my iPad to find the album I want to play. As soon as I tap on this album within the remote app, my script causes a playlist of all the urls of the album tracks to be written to my Music folder, and the chosen app (HQPlayer in this case) is launched with those urls in its track list.
If we do the same thing with any other player (Foobar, J River, VLC); etc. playback would begin at this point, without me having to do anything more. Just touch the name of the album (or playlist) in the remote app on my iPad, and after a few seconds playback begins.
Unfortunately HQPlayer doesn’t start playback automatically, which means I still have to intervene and get access to the machine its running on, to click on the first track in the transport area to start playback.
Jussi Laako (known as Miska here) the author of HQPlayer has assured us this will be fixed in the next version, 3.5.xxx
So much for lossless streaming services. What about files stored on our local hard drives though?
One of the problems I believe us computer audiophiles often face is the need to run multiple apps to achieve different purposes. I believe that what many of us are looking for is a single point from which we can playback music regardless of whether the music is sourced locally or via a streaming service.
Once again, I think XBMC is the best means available to us to achieve this today. This allows us to also give other members of the family one simple IOS/Android app from which to access all the music they may wish to play, rather than have to learn multiple apps. It’s not so bad if we, the Computer Audiophile of the family, need to fire up different apps to rip CD’s or buy and download music from the internet; but when it comes to simply playing back music, it really shouldn’t require multiple apps, depending on the source of the music.
About 4 years or so ago, at around the same time I discovered Qobuz lossless streaming, I also discovered Subsonic. This is a cross platform music server app written in Java, that allows you to serve your music from one machine to anywhere else including, over the net.
The real beauty of Subsonic is that, unlike other music servers which allow access over the net, it doesn’t force you to down-sample or down-convert the music. This means that if you’re in another location anywhere in the world with a decent enough internet connection, you can access you music library located at your home, in the same way as when you’re at home. If the internet connection isn’t good enough you can have the streams transcoded to something the connection can cope with, such as MP3.
So your music files can be served either locally, at home or remotely using Subsonic, in exactly the same way. …and once again there is an add-on for Subsonic. I’ve created a modified version of this add-on in exactly the same way I did for Qobuz to create a playlist, this time called “subsonicNow.m3u8” in my music folder. I have this automatically loaded into the designated player for playback, just as with Qobuz.
Obviously, unlike with Qobuz, the URLs are not time stamped, so you can play albums and long playlists without interruption from Subsonic.
This means that playing locally stored music, music from Qobuz, or accessing your music at home remotely, is all achieved in exactly the same way.
Subsonic has been designed to manage huge libraries of music, so you could create your own version of a Qobuz/WiMP/Tidal type service if you wish.
Of course this is open to abuse, if people shared their Subsonic server credentials they could all gain access to music from a pooled number of private servers, without having to pay for it via a subscription. Still the private subsonic users are not likely to have the same resources (number of powerful servers) so there is a limit to the demands that could be placed on these private servers.
As with all technologies it’s a double edged sword and needs to be used responsibly. In other words sharing within one family seems reasonable, including when members of that family are travelling.
So there it is. This really feels like an Odyssey and we’re not quite there yet. I do feel though that to be able to subscribe to a huge library of music, as with Qobuz and play it at the level of sound quality achieved by the best software players, is an amazing thing to be able to do.
These lossless streaming services are relatively new, and I believe now is the right time to make our voices heard as to how we’d like to use them and see them working in the future.
My own method of cobbling together a mixture of XBMC with modified add-on scripts, plus my software player of choice, may not work for everyone and I admit it is not yet ideal. It currently works quite well for me. My main motivation in writing about it here, is to use it as an example of how I feel computer music playback should work.
I intend to refine my scripts to include user interface choices as to whether local playlists are created, and if playback should be made via an external player. Once I’ve done that, I will ask permission for my changes to be rolled into the official versions of these XBMC add-ons.
I’ll be very interested in hearing other opinions on the topic. Of course, I’d also like to hear from Qobuz, WiMP/Tidal and any other players planning on entering this market.
Note: XBMC (Xbox Media Center) is in the process of being renamed to “Kodi”.