Commenting On.

Self-Hosting an Internet Radio & A Long Rant.

Three logos of icecast, liquidsoap, and azuracast.

>> 3 pillars of internet self-hosting

I love music so god damn much. Ten years ago, I even picked up the guitar just to pretend I had something to contribute to the art form. So, the thought of creating a musical experience for others is basically the ultimate dream for me.

That’s when I started looking into internet radio.

Taking the Plunge Down the Rabbit Hole.

So, where did that plunge lead me to? Like anything else, the first step to any journey starts with a Google search. After I intelligently (🤓) looked up how to get started, it came down to three options: Shoutcast, Icecast, and hosting with an internet radio hosting provider.

The cost was insane for the 3rd option. In no way could I justify $89 USD a month for a hobby I wasn’t even sure I’d like. Even if you paid, you received limited features unless you gave them even more. So, scratch that without a second thought.

From one of my previous posts: journey to self hosting, it was becoming clear to me that in order to give this a proper test flight, I needed to run locally.

Running the Station Locally.

Once I decided to run this on my own hardware, I knew it was about to get messy. I’ve become far better at setting up services to run on my home server, but it almost feels like I never learn any transferable skills. I know they’re there, but I always forget them until the solution that I already knew shows up.

My software options were Shoutcast and Icecast. Shoutcast seemed cool, but Icecast is open source, so naturally I opted for that.

The install was actually really straightforward. Luckily, my server is running Ubuntu, so all I had to do was run sudo apt update && sudo apt install icecast2 to get it installed. I was so thrilled--I’ve never had home server software be so easy and quick to install. All I had to do now was set up my ports and update my Nginx config to let Icecast speak to the world!

It was easy… too easy….

After about 45 mins of work setting up subdomains, Nginx config, and getting it secured—I went to my new site to see the home screen of my newly installed Icecast and saw this:

icecast

What the fuck is that? How do I stream my music? Do I just make a playlist and point it at that? Does it need to be an .m3u playlist file? I don’t see any options for that. Maybe I have to play music on the server and it captures the audio somehow?

After hours of looking it up and trying various solutions, it turns out that all Icecast does is send things to the internet and handle the connections. It has absolutely nothing to do with running the media, or its management and playback. I tried using BUTT broadcasting software and VLC to stream to Icecast’s port.

It seemed hopeless. I couldn’t get VLC to work, and BUTT captured the audio, but I still had to play it through VLC on a playlist, and none of it seemed intuitive. The audio also sounded like crap due to just capturing the audio from the system. Luckily, I stumbled upon another solution that was actually made to solve this problem.

Liquidsoap? Wtf?.

Config snippet

set("buffering.kind","raw")  
set("log.file", true)  

def my_input(url) =  
    mksafe(input.http(buffer=5., max=20., url));  
end  

def outputs(name, mount, input) =  
    output.icecast(  
    %mp3(bitrate=32, samplerate=22050, stereo=false),  
    ******  
    mean(input))  

    output.icecast(  
    %mp3(bitrate=64,samplerate=44100,stereo=true),  
    ******  
    input)  

    output.icecast(  
    %mp3(bitrate=128,samplerate=44100,stereo=true),  
    ******  
    input)  

end  

url = "http://localhost:8000/radio1"  
input = my_input(url)  
outputs("Radio1", "radio1", input)  

#..............  

url = "http://localhost:8000/radio40"  
input = my_input(url)  
outputs("Radio40", "radio40", input)  

Liquidsoap is the savior I had been hobbling along looking for. It was a bit more complicated to build the config than I had hoped for, but it’s still relatively straightforward to follow while looking at the documentation.

This program is powerful. It allows you to automate a significant portion of the workload while still letting you choose how everything is handled. It also easily hands off the stream to Icecast with exactly the mount point and sound you set up.

So, I was finally on the way. The playlist was shuffling with Liquidsoap and fading out into the next track, while transcoding the audio to the set bitrate straight to Icecast. I had successfully set up a simple internet radio and had it running 24/7 from my server to a domain name I set up through Cloudflare.

Life was pretty good, until I needed to add more songs to the station to keep things fresh. It required me to keep updating the .m3u file with the file paths of all the songs I wanted to add. It was a bit of a pain. Doable, but annoying. At least it was—until I wanted to add hundreds of songs at one time.

The New Hero: Azuracast.

azuracast-self-hosted-manage-station-1

After realizing how much work it would be to update that .m3u file constantly, and how it would grow exponentially worse by adding the three other stations I was itching for, I decided to take a look at other solutions. Were there any? I had no clue, but luckily, I stumbled upon a Reddit thread mentioning Azuracast.

For the longest time, I thought Azuracast was just some web service that offered hosting for internet radio. I was so wrong. Azuracast would become the final piece to the puzzle. The software that labels itself “free and open-source, self-hosted web radio station in a box” is exactly the combination of words I needed to hear. It combines several powerful tools, INCLUDING Liquidsoap, in a nice and friendly web GUI. I can upload tracks, edit configuration files, install live mastering software, instant public pages for each station, backgrounds, streams—everything I could ever want.

I did have to learn how to use Docker, unfortunately, but this actually became a blessing in disguise. There are so many other services that run exclusively in Docker, and even with alternative installs, it just seems like the easiest and cleanest route to go.

So after playing around with it and getting everything set up just right, I have 4 stations: HYPER PIKL, City Pop VIBES, PIKL ROCKERS, and bummer hangout. Each station follows its own schedule, playing specific genres at set times. I also applied unique replay gain, compression, and limiters to every channel to ensure that punchy, consistent radio sound.

I may have to make another post about the deep findings I had on how large radio stations work. It’s fascinating, but it really does require a full-time job to do right. From programming times and weekly specials to DJ interjections and station jingles, the logistics are spectacular. It involves managing everything: rotating deep cuts, introducing new tracks, and automating exactly when songs should fade or play at specific hours.

So after all of this work--months in the making--I am finally--

Forced to Shutdown the Radio Stations.

fuckmusiclicensing

>> Fuck the licensing organizations

As I was finally about to open the floodgates, broadcast to the public, and share the stations with the masses, a terrible but logical thought went through my head:

“Is this legal where I live?” “Can I stream whatever music I want on the internet if I don’t want any monetary compensation?”

The answer, after looking into it, was a HARD and fast NO.

There are music organizations that employ tens to hundreds of people who spend their time sniffing for any poor soul daring to play a tune on the internet without royalty licenses. From my understanding, they don’t even bother with a warning; they immediately send a letter informing you that you are being sued for illegal broadcasting and distribution of sounds you do not own the copyright to.

The way out? No matter your intentions, no matter if you have zero listeners, and even if you make zero money, if you want to legally broadcast, you have to pay $1,000+ USD yearly per station. If you do grow your station, the amount scales with how much you make or how many people tune in. These numbers can turn into tens of thousands of dollars depending on your success, regardless of whether you monetize or not.

I want to be very clear: I believe musicians should be compensated for their work. The abysmal state of streaming services is a disservice to artists everywhere. But apparently, even these licensing organizations are ripping artists off and paying them near nothing for their work. Placing such high limitations on broadcasting stops homegrown authentic places from sharing interesting and niche music with underserved audiences.

Still, I believe there should be a middle ground. While It feels like there is an unnaturally high barrier, I don't believe station owners should hide behind “making no money” forever. If they become successful--there should be a threshold where they have to open their wallet and play fair. Fairness goes both ways, though.

Personally, I feel that if you are under a certain amount of listeners per month and it’s not monetized, there should be room to let a station take its first breaths with a fair pricing fee. $1,000 annually just to start, is deeply into “serious hobby” territory—quite the investment for feeling out if you like something. The amount is incredibly restrictive regarding the income level required just to get started.

Even if someone creates a station with the intention of monetizing it eventually, the hope, talent, and time of many creators are snuffed out early by this high cost of entry--a cost that lasts the lifetime of the station.

You also give up your identity when you ask about pricing from them. So even if you decide to stream without the license, they literally have your address, and you will be taken to court immediately.

Anyways, the four stations I made today still exist, and I listen to them every day. The big downside is that they are locked behind multiple passwords and will never see the light of day until $1,000 USD for life annually doesn’t sound so ridiculous for a hobby. It's a shame I can't even try it out beforehand to see if I'd stick with it.

So where to go from here?.

I’m sorry about the rant, but this is Commenting On—a personal commentary on my experiences with the things I interact with and learn.

I was so excited to share the lesser-known artists I found throughout the years, especially with people who wouldn’t have discovered them otherwise, but now I’ll have to look for other ways to do that. Maybe I'll make a YouTube playlist and share that around instead.

I’m at least happy to have gone down the tech and broadcasting rabbit hole. It was interesting to learn exactly what it takes to make a radio station function. The experience gave me such an appreciation for the independent stations that exist—despite all the bureaucracy they have to navigate.

Maybe I’ll polish these stations privately through years of hard work. Then, when I can justify the cost, I can release them to the public in pristine condition to finally share my passion for the unknown.

/squawk <~

by untitled_operator

>> Reply by email


#rant. #selfhosting. #tech.