12/10/2020 at 01:59 •
New version of the script is now available on GitHub and through PyPi. The big news for this version is preliminary support for running on Windows. Right now only MPlayer seems to work, but it's a start.
For those of us running Unix-like systems, the major change is the ability to specify the desired Chromecast target from the command line:
somafm -c HackCast
05/17/2020 at 20:13 •
After a few months of puttering around, I'm ready to call version 1.6 stable. I've also added the project to PyPi, so you should be able to install it with the command:
pip3 install somafm
A lot of new things have been added in version 1.6, but the biggest one is probably support for other media players (mpg123/mpv) in addition to MPlayer. The script will still use MPlayer by default, but if it's not installed and one of the others is, there's now a fallback. There are some drawbacks though, as mpg123 doesn't support high-quality AAC streams and mpv is slow and overall a bit janky. But at least the option is there.
You can now turn off track sync when streaming to Chromecast devices, which is good if you want to play media "headless". Desktop notifications won't pop up for Station IDs (oh, and I fixed broken desktop notifications), and there's even some experimental support for custom notification commands which could potentially be used for things like showing track data on an external display (that's what I'm planning on, anyway).
Give it a shot and let me know what I broke.
12/10/2019 at 18:09 •
The holidays are upon us, and that means even SomaFM has been playing the following songs pretty regularly (albeit in forms you probably haven't heard before):
Baby It's Cold Outside
Santa Claus Is Comin’ To Town
It's the Most Wonderful Time of the Year
It's Beginning to Look a Lot Like Christmas
Thanks to these holiday classics, I finally noticed a bug that's been there from the very beginning. I was using apostrophes as delimiters when parsing the stream info coming out of MPlayer, which obviously (in hindsight, anyway) means any song title with said punctuation was getting truncated.
I've changed how the MPlayer output is parsed which fixed the issue, and the new version is already up on GitHub. Just in time for any holiday parties you might have planned.
08/12/2019 at 19:35 •
One of the features I snuck in for v1.5 was the ability to highlight known station IDs, the little clips played to remind you what channel you're listening to. They are often used to add a little color to the listening experience by playing various messages or clips. For example when listening to DEF CON Radio, the songs are intermixed with short sound bites pulled from talks given at previous cons.
When looking back at an hour worth of streaming DEF CON Radio, the new highlighting feature makes this readily apparent:
Originally I had planned to simply omit these clips from the track listing, but I think highlighting them ends up being more useful. Or at least, interesting.
On a related note, not all the channels start their ID with "SomaFM", and I've only populated the list with the ones I've seen while listening. But it's easy to add new IDs to the list to check for, so perhaps that's something the community will eventually be able to assist with through pull requests.
08/10/2019 at 03:02 •
I made the stable v1.5 release in honor of SomaFM's annual live stream at DEF CON, and I have to say, the program already has progressed a lot farther than I had initially intended. It started as a quick little script to keep me from having to use the web player, and now somehow it's evolved to the point I'm using it to play Groove Salad on my Chromecast.
Still, there are a couple things I'm thinking of adding:
- Logging track info to file
- "Headless" Chromecast mode, that starts Cast and then exits
- Recording streams (I've seen other players with this feature)
I initially wanted to support player backends other than mplayer, but honestly unless somebody requests it, I'm not sure there's much point.