Native FLAC via iRadio?

My pings are still in the triple digits. It’d be great to be able to run locally if that’s possible.

I also considered that approach, but I don’t see a lot of added value as the Java wrapper still needs ffmpeg underneath.

Just to give you some updates on where I’m with this.

I didn’t stand still! The proxy I wrote seems to do what’s supposed to do; actually more than I ever had in mind. I initially wrote this for myself as I couldn’t believe a Gen 1 device was not capable of processing hi res streams (despite what naim says). It was a challenge and at some time, middle in the night, it made some noise on my system J

This was also the moment I thought that I probably was not the only one embarrassed with this, so I decided to share it with other people being in a similar situation. After all, those devices aren’t cheap, and from 1 day to another, naim decides you’re not playing in the premier league anymore. For me this is/was fun to program this in my free time. It makes me smiling seeing that 24/7 there are always people listening to some streams. Not sure if this legal, I’m not aware, but anyhow, if I’ve to shut this down, with minimal effort you’ll be able to install this locally, run it on a Cloud and share it with friends, as it’s multi user, multi station, by design.

I state “it works”, but I know someone in Arizona is suffering with latency. Amazed to read a connection to Thailand is better than mine from Belgium to Frankfurt (where the proxy is running). Although, also for this, there’s an explanation; I’ll document this behavior. Thanks for those who contributed; fun after all. :slight_smile:

I promised to make it public and I know some of you are waiting for this. I also firmly believe this will be the solution for our Arizona friend, as he can run it at home or in the US. Truly, I’m not a bad guy and I’ll live up to my promises. Last effort (still ongoing) is to eleminate the need for the external transcoder (ffmpeg) by studying the Ogg format, the OggFlac mapping and Flac format myself. I have it working seamlessly on VLC, but the naim doesn’t like it. More on that in the next article.

So, yes, I’ll publish the whole thing on github - promised once again, and, yes, today I’ve started writing the documentation on how the thing works, how to setup the current version on your NAS, raspberry, cloud, linux pc, actually anything being capable of running Java 11 on Linux/Unix based systems.

As a Tech guy, for me the challenge is to make it also accessible for non tech people.

Plan today is:

  1. Finish the documentation
  2. Provide a link via this forum how to download the complete starter package; docs and binaries – will be Google Drive kind of thing.
  3. Get the whole thing, sources etc, on github for everyone.

I got the message naim doesn’t like this; more on this later, but if I ever get kicked out here, note: kurt dot lefevre at gmail dot com.

Keep you posted!


Well I think I’m the guy in AZ to whom you refer and I appreciate your efforts. My understanding of this is pretty limited but I can say that the limitations with ffmpeg on my QNAP were easily resolved by installing a container. This container made transcoding possible with the Bubble app I use for Tidal hi res playback and works without a hitch. I don’t know how hard it is to create one of these containers though.

Yep, could be you. What “container” do you mean?
Fact is that a container infrastructure adds an additional resource consumption - read: slowing down things - compared to bare/native.

It’s a docker hub container I don’t really know much about it to be honest.

I run six containers on my QNAP, it has 8gb of RAM doesn’t drop a beat it also runs, Asset and many other QNAP services for backup purposes and other apps. Containers if done well don’t take too much resources at all. They are easy for the user to install as long as all dependancies are included. The only issues are updates that need to be thought about so the app itself can do this within the container or you the user has to rebuild them each time a new release comes out.

Good to hear! The application is fairly simple; just 1 jar and a configuration file.

They need to be run in host mode though so the container can access network resources the NAS or computer running is on it as it will be on its own virtual network if not. This is just a step the user has to do when creating the container on the NAS. So this needs to be communicated well in any instructions.

Hi Kurt, the only objection I can see Naim having with this is that you are proxying commercial broadcast streams with a cloud-hosted server. No such issues for personal use, of course.

I suggested packaging using a container to address installation issues for less tech savvy users. Many people here run a NAS from either Synology or QNAP to host their audio files and run a UPnP server, and they both provide very intuitive UIs for running Docker containers. Packaging the app with all the dependencies hides the complexity of having to install Java, set up scripts, issues with ffmpeg and so on. It might be an idea to also provide a Docker image for simple setup as well as the Github option for those that want to run on bare metal.

Ok, as promised, I was at my typewriter and wrote some documentation.

You can download the package via this link:

It is a 1,1 mB zip file containing 1) the Java application and 2) the manual. The manual explains the architecture, how to install it, how to configure it etc.

Next I’ll make the source code of the current version available via a github repository.


I use watchtower to update the other containers when they get updated on dockerhub. IIRC I had to ssh onto the qnap to get it running (no way to pass the docker.sock via the GUI) but keeps everything shiny.

Hi Kurt,

Listening to RP main mix here through a local FWP :slight_smile:

I also see the problem where the Naim app switches to the UPnP input after starting the stream. This could be a big problem for wider adoption if the only solution is for people to run the proxy in a different subnet to their audio gear.

The most obvious way to run it is on the NAS that runs your UPnP server which is going to be on the same subnet as the streamers. If the only workaround is running a dedicated device on a different subnet I think this would put a lot of people off.

I wonder if there’s a solution to this? I know you’ve asked Naim for help. @stevesky, can you explain why this happens and whether there might be a simpler workaround?

The documentation you have written is very thorough and explains the setup process well. However, I do think that containerising the app would simplify installation and management for the majority of users. I’d be happy to have a go at this when you have the code up on Github.


Hi @Adrian_P

The device switching over to UPnP is because it’s pushing the product firmware into a use-case that it doesn’t really handle. aka - it’s a Vtuner URL pointing to a raw FLAC file. The code just assumes that somehow the system has been asked to play a music file and treats that as UPnP as the fall back.

As this is a private project thing (and top work on getting this all working), we won’t be putting any extra logic in product side to support it.



This is in my opinion not the case because:

  1. vTuner points to an URL in the format: http://address-of-the-proxy:port/path.
  2. What gets returned to the Naim is a Wav, not a Flac (as I don’t get this working on a Naim).

If the “address-of-the-proxy” is in the same subnet as the Naim, the app swiches to UPnP. If I put the proxy in another subnet, like the Cloud, or even another subnet in my own local network, than it works as expected; the app perceives the URL as an iRadio URL.

So nothing to do with the music format, but all with the network. It looks like the app considers an iRadio station in the same subnet as an UPnP device.

Set this up today on my NAS - I already had a Ubuntu VM on my Synology DS220 with static IP, java and ffmpeg so it took 30 seconds to install.

Absolutely fabulous effort. I’ll likely bind a second IP to the Ubuntu box on a different subnet and add routes to BT smart hub (wifi-cable interchange) and Cisco to get round the uPnP issue, but I could happily live with as it is! Guessing I’ll need to hack the code to choose which IP FWP binds to.

Many thanks.

Indeed, if you’ve the supporting things like Java, a static IP etc installed, than it’s just a matter of extracting the file, changing some paths and you’re done.

I’m not a die hard GitHub guy. I’ll duplicate my private repo to a public one and post the info here.

The application logic is, according me :slight_smile: , quite straigth forward. There are also some “experimental” bits in it, currently not used, but maybe useful and inspirational for others.

I’ll write some documentation and hope to publish this in one of the coming days.

Faster than expected, but you can find everything about this project on GitHub via this link > GitHub link

There’s 1 release. The release assets contain:

  1. The Java source code
  2. The distribution package (as mentioned above)
  3. The readme for the source code

Enjoy! :slight_smile:

1 Like

Btw, @stevesky, if you ever need a software architect, manager… :slight_smile:

Binding a second IP address in another subnet on the same network interface is easy.

Although not a network expert, I guess the device (in my case also a PI running Minim in the same subnet as the Naim) has to act as gateway than? Don’t see how to add a route on my home router.