Raspberry Pi Streaming Radio Player: Mostly Viable Product

The latest version of my simpleminded streaming radio player includes:

  • More durable parsing for track titles with embedded quotes and semicolons
  • Muting during empty / non-music Radionomy tracks
  • The Dutchess County E911 service

Audionomy’s empty / non-music tracks include a remarkable number of mis-encoded MP3 sections triggering decoding problems; those problems don’t occur during music tracks. Some tracks come through as advertisements, which would be mostly OK apart from the garbled / high-volume gibberish, but on the whole they’re un-listenable:

ICY Info: StreamTitle='';
A:1271.0 (21:10.9) of 0.0 (00.0)  4.0% 44%
[mp3float @ 0x7623e080]overread, skip -7 enddists: -5 -5
[mp3float @ 0x7623e080]overread, skip -9 enddists: -6 -6
A:1271.2 (21:11.2) of 0.0 (00.0)  4.0% 45%
[mp3float @ 0x7623e080]overread, skip -7 enddists: -5 -5
A:1309.1 (21:49.1) of 0.0 (00.0)  4.0% 42%
ICY Info: StreamTitle='Targetspot - TargetSpot';
A:1316.4 (21:56.4) of 0.0 (00.0)  4.0% 40%
[mp3float @ 0x7623e080]overread, skip -5 enddists: -4 -4
[mp3float @ 0x7623e080]overread, skip -5 enddists: -2 -2

Muting happens in the mixer, because that seems easier than messing with mplayer in mid-flight. Rather than attempt to control the muted state with specific timeouts, I just un-mute after a new track title arrives; that has no effect if it’s already un-muted. The delays depend on the buffer fill level and avoid the worst of the gibberish.

The player still falls over dead / jams solid on occasion, generally because the incoming data has stopped streaming or delivered severe encoding problems. Other than that, it runs pretty much all day, every day, on at least one of the Raspberry Pi streamers.

Still no track display. Mostly, we still don’t miss it.

The Python source code as a GitHub Gist:

,

  1. #1 by madbodger on 2016-06-16 - 10:49

    I’m not sure where E911 fits into this. If you wanted to have a track display and do it the Hard Way, this site shows you how: http://spritesmods.com/?art=vfdrestoration&page=1

    • #2 by Ed on 2016-06-16 - 11:12

      The real-time stream on the middle button mashes several Dutchess County E911 channels together: we’re close enough to the stations that they’re still dispatching units as the first sirens Doppler past our house. I thought about setting up an Icecast server fed by my old radio scanner, but somebody’s already done it better.

      Grayscale VFD? That’s definitely doing it on Hard Mode!

      • #3 by Red County Pete on 2016-06-17 - 11:26

        You’re still getting emergency radio on the 150 MHz bands? A few years back, our county partially shifted to the digital trunked systems, though the north end of the county’s geography (very rocky with lousy line-of-sight) favors the lower frequencies.

        • #4 by Ed on 2016-06-17 - 12:22

          AFAICT, the main dispatch uses VHF and tactical stuff uses trunked radios, but I admit to not being a scanner junkie these days. The stream is much busier than I can stand as background; the left and right channels carry several different receivers apiece.