Experimenting With MPG123 on Raspberry Pi

Last weekend I loaded mpg123 on a spare RPi here at the lab.

Figure 1 – RPi 3B Running mpg123

I haven’t enabled the USB sound dongle yet, but would like to do that. However, I wanted to see if I could get audio from the Internet routed through the HDMI display speakers. And indeed I could!

Next step was getting railroadradio.net to stream through the same setup. I know that railroadradio uses .pls files, and not obviously mp3, so I did a quick search to see if there was a way to get mpg123 to do what I wanted. And indeed there was!

http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Stream-Internet-Radio-from-the-Command-Line-with-mpg123

The above link gave me the secret, courtesy of “Alex”, where playing a .pls file just needed the “-@” option in the mpg123 command line. So now, I’m streaming railroadradio’s Southern California BNSF/UP/Metrolink audio.

Figure 2 – RPi CLI showing successful streaming of Internet-sourced .pls audio stream

Later, I’ll get the dongle running as a line input from one of my scanners, so that I can get the RPi to be a feed server. Will have to learn more about jack1 and jack2…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.