Stream Internet Radio from the Command Line with mpg123

Dmitri Popov

Productivity Sauce

Oct 29, 2010 GMT
Dmitri Popov

Pretty much every audio application worth its salt supports audio streaming, but what if you prefer to listen to your favorite Internet radios without leaving the convenience of the terminal? There are actually several command line players that can do the trick, including mpg123. This nifty little command-line player is available in the repositories of many popular Linux distributions, so you can install it using your distro's package manager. On Ubuntu, installing mpg123 is a matter of executing the sudo apt-get install mpg123 command. Since mpg123 can't handle m3u or pls playlists, you need to supply the player with the direct link to the Internet radio station. Extracting a URL from a playlist file is not particularly difficult, though, and you can do that using your favorite text editor. Run then the mpg123 command followed by the radio station's URL (e.g., mpg123 http://64.71.145.106:9006) and enjoy.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News