Webstream to IceCast

149 views
Skip to first unread message

Nick Andre

unread,
Nov 29, 2021, 1:47:14 PM11/29/21
to wmfo-ops
Hey all,

So we're currently running Shoutcast, a proprietary program made by Shoutcast, for our webstream.

There's an open source streaming server called IceCast that seems promising. We've talked about moving before, but now that it's time to upgrade the webstream server we should ponder switching. There's also a new codec called Opus that seems to have better quality than previous generations. We may consider going to:
  1. Opus low bitrate, 56 kbps.
  2. Opus high quality at 256 kbps.
  3. MP3 stream for those who can't handle Opus.
Also, we may revisit our streaming page on the site. VLC is one of the better ways to handle streaming.

One caveat I did find is that it doesn't seem that IceCast supports metadata with Opus. We can try some different codecs as well.

I may poke around to try and get IceCast working with ffmpeg.

--Nick

Ray Charbonneau

unread,
Nov 29, 2021, 2:09:34 PM11/29/21
to wmfo...@googlegroups.com
FYI, which browsers support Opus: https://caniuse.com/opus

How are you thinking about using VLC?

Ray Charbonneau
Listen to Tardis Jukebox on WMFO!


--
You received this message because you are subscribed to the Google Groups "wmfo-ops" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wmfo-ops+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wmfo-ops/CABiK%3DdbDUbFL4Ob%2B4Onr445-EcBD2PLzOFohM4vkZr%2BOU4SmXQ%40mail.gmail.com.

Joann Keesey

unread,
Nov 29, 2021, 2:10:05 PM11/29/21
to wmfo-ops
As I recall, this was one of the things we were going to do before the lost year of 2020.  Definitely think several of these projects are worth doing.  Bob, do you remember what else is hanging fire at this point and Bailey, do let us know when you will be leaving Jumboland.  Thanks again Nick for the "tower" visit and unkinking our airstream.

On Mon, Nov 29, 2021 at 1:47 PM Nick Andre <ni...@wmfo.org> wrote:
--

Nick Andre

unread,
Nov 29, 2021, 6:19:21 PM11/29/21
to wmfo-ops
I should mention icecast also has native TLS support.

In the previous iteration of the “listen” button we provided download files that would configure VLC or iTunes to connect to the steam, rather than only providing the browser HTML5 element.

The servers (icecast and shoutcast) support binding multiple streams, although sometimes I've found that it doesn't work on certain clients. For example, I believe the html5 element sometimes retrieves the default stream even if a different stream is selected with a different path, like the /highq stream.


Ray Charbonneau

unread,
Nov 29, 2021, 6:54:06 PM11/29/21
to wmfo...@googlegroups.com
I'm a big fan of simplicity. I'd recommend keeping the Big Dumb Button as "play through the browser NOW". We can add a "Streaming options" menu for those inclined to fiddle.

Ray Charbonneau
Listen to Tardis Jukebox on WMFO!

Nick Andre

unread,
Nov 29, 2021, 7:16:53 PM11/29/21
to wmfo...@googlegroups.com
We can make a smaller button below it with more options. Or we can display other options below the web player. 

People on mobile would probably prefer the option to open with a streaming app. 

—Nick

Nick Andre

unread,
Nov 29, 2021, 8:02:45 PM11/29/21
to wmfo-ops
Alright so I provisioned https://icecast.wmfo.org/

Supports TLS, two streams:

Regular HTTP is still available for compatibility if we switch.

We can use the following command to encode the streams with ffmpeg:

asihpirec |  ffmpeg -f s16le -ar 48000 -ac 2 -i pipe: -c:a libmp3lame -b:a 128k -content_type 'audio/mpeg' -vn -f mp3 icecast://user:pass@http:8001/test.mp3 -c:a libopus -b:a 56k -content_type 'audio/ogg' -vn -f opus icecast://user:pass@http:8001/test.ogg

if we go this route, basically we'd have:
  1. Rivendell server running the encode, pulling audio from the soundcard.
  2. wmfo-http server running icecast
  3. Apache reverse proxying the incoming connections to IceCast so they can be on port 80.
We'd also have the option of using a separate server. We can also move the archives to the Rivendell server which would hopefully be more reliable.

--Nick

Nick Andre

unread,
Nov 29, 2021, 10:52:27 PM11/29/21
to wmfo-ops
Also fun thing I discovered:

you can stream FLAC over ogg format. I set https://icecast.wmfo.org/test.ogg to be a lossless stream for the time being.

 -c:a flac -compression_level 10 -content_type 'application/ogg' -f ogg icecast://user:pass@http:8001/test.ogg

Ray Charbonneau

unread,
Nov 30, 2021, 6:44:58 AM11/30/21
to wmfo...@googlegroups.com
In my limited testing, the Ogg stream was visibly faster to load and start playing. 
Anyone who says they can reliably hear a difference is... mistaken ;-)

Ray Charbonneau
Listen to Tardis Jukebox on WMFO!

Nick Andre

unread,
Nov 30, 2021, 10:37:52 AM11/30/21
to wmfo...@googlegroups.com
Interesting the FLAC is relatively high nitrate. 

In my testing, MP3 128 kbps is a bit janky and a skilled listener can discern the difference. This is particularly true because MP3 discards some of the stereo data. However, AAC is a more advanced codec and it’s a lot more difficult to discern at 128 kbps. Same should be true for Opus. 

Ok it would appear that only AAC and MP3 streams support metadata, but we can always put the metadata in browser. 

—Nick

Joann Keesey

unread,
Nov 30, 2021, 11:15:57 AM11/30/21
to wmfo-ops
My .02 is that we are doing a disservice supporting really low MP3 bit rates.  Bandcamp where I tend to get a lot of music from will download in a much higher bitrate which is excellent. iTunes was terrible for instance.  When we had had the discussion about community people taking over the music department, I had to explain to the then students that yes we needed to have a dropbox on the md computer, we needed to keep the WMFO mailbox and we needed to cultivate our labels, support the World Music people, the Burren folks, etc.

Ray Charbonneau

unread,
Nov 30, 2021, 11:37:21 AM11/30/21
to wmfo...@googlegroups.com
Bandcamp streams at 128kbps. If you download the actual file, you can get higher quality.
FYI, free Spotify is also 128kbps (160 mobile). You get 320kbps if you pay.

Ray Charbonneau
Listen to Tardis Jukebox on WMFO!

Joann Keesey

unread,
Nov 30, 2021, 11:43:42 AM11/30/21
to wmfo-ops
Ray, I was talking about the paid rate for bandcamp.  Students cannot use their spotify playlists to do their show because WMFO is a radio station.  Belinda, who does Bubbles in the Think Tank, is our FCC guru and can tell you what is approved and what is not.

Ray Charbonneau

unread,
Nov 30, 2021, 11:44:17 AM11/30/21
to wmfo...@googlegroups.com
Ogg fails on my iOS devices. 


On Nov 30, 2021, at 11:37 AM, Ray Charbonneau <rcha...@y42k.com> wrote:



Nick Andre

unread,
Nov 30, 2021, 11:45:09 AM11/30/21
to wmfo...@googlegroups.com
Yeah we should discuss bitrates. I’ve been a fan of a low bitrate stream for mobile users, for which either Opus or HE-AAC v2 would do the job. If we go with AAC we get metadata. 

I think a mid bitrate stream with AAC would be nice, perhaps 196kbps. 

And a higher quality stream would be interesting. I would be down to try FLAC. It’s not that much better than AAC or Opus but we could potentially bypass the streaming audio compressor for FLAC. 

We also have the option of relaying our stream through a cloud server.


—Nick 

Ray Charbonneau

unread,
Nov 30, 2021, 11:46:25 AM11/30/21
to wmfo...@googlegroups.com
Nope. 

On Nov 30, 2021, at 11:45 AM, Nick Andre <ni...@wmfo.org> wrote:



Ray Charbonneau

unread,
Nov 30, 2021, 11:48:42 AM11/30/21
to wmfo...@googlegroups.com
iOS devices (using both Safari and Chrome) try to download test.ogg. It could be a server config issue…

On Nov 30, 2021, at 11:44 AM, Ray Charbonneau <rcha...@y42k.com> wrote:

Ogg fails on my iOS devices. 

Nick Andre

unread,
Nov 30, 2021, 12:34:26 PM11/30/21
to wmfo-ops
It doesn't look like iOS supports opus directly. Although it does work through vlc. In theory:


Joann Keesey

unread,
Nov 30, 2021, 12:45:21 PM11/30/21
to wmfo-ops
Here's the deal folks.  You probably don't remember but when we were trying to get the remote WMFO stream up and working, your friend and mine, Frank Rossano was upset because he wasn't seeing the song track info on HIS CAR RADIO.  Because it is not just WMFO but Spinitron, Rivendell all need to interact nicely with whatever we put in place and I can practically guarantee that someone will have an issue depending on where they are listening or how old the equipment they are using is.  When I lived over in Malden, there was a rogue pirate station using the 91.5FM signal.  Since t haven't lived there since 2014, Michael Scott Stewart could probably verify if they are still operating.


Ray Charbonneau

unread,
Nov 30, 2021, 2:07:29 PM11/30/21
to wmfo...@googlegroups.com
Ogg works for me on my phone thru VLC. 

Ray Charbonneau
Listen to Tardis Jukebox on WMFO!


Nick Andre

unread,
Nov 30, 2021, 5:23:46 PM11/30/21
to wmfo-ops
Ok I was able to get three streams. The FLAC stream pulls from the EAS out so it doesn't have the multiband compressor.


Ray Charbonneau

unread,
Nov 30, 2021, 5:34:03 PM11/30/21
to wmfo...@googlegroups.com
Way too soon questions:
Do we want to make this available on the site, on a streaming options page?
If so, can you rename test.mp3?
Will shoutcast stay up, or are we going to retire it?

Sent from my iPod

On Nov 30, 2021, at 5:23 PM, Nick Andre <ni...@wmfo.org> wrote:



Ray Charbonneau

unread,
Dec 2, 2021, 6:56:56 AM12/2/21
to WMFO Ops List
Given the circumstances, I thought I should clarify that this was not intended to be a reply to Nick, but a reply to the comment referencing a paid streaming tier of Bandcamp that doesn't actually exist. My apologies. 
I blame the Gmail interface and the number of messages in the thread floating about at the time. ;-)

Ray Charbonneau
Listen to Tardis Jukebox on WMFO!


Reply all
Reply to author
Forward
0 new messages