Originally Published: Monday, 8 October 2001 Author: Michael & Melinda Petruzziello
Published to: learn_articles_firststep/General Page: 3/3 - [Printable]

Notes from the Command-Line Commando: Multimedia

Linux.com irregulars Michael & Melinda Petruzziello return this week with another installment of Command Line Commando, your regular view of working with the Linux command line especially for newer users. This week we take a look at playing music and video on your Linux box, even streaming MP3s from, well, the command line, of course!

Streaming Audio With mpg123  << Page 3 of 3  

Streaming Audio With mpg123

The most basic way to use mpg123 with an audio stream is to do this:

mpg123 <Enter>

(This is a sample stream we pulled from http://www.shoutcast.com.) Sometimes, you may have to enter a stream address like this:

mpg123 http://ipaddress:port/filename.pls

We usually pull our streams from http://www.live365.com/home/index.live or http://www.shoutcast.com. There are other sites you can get streams from as well. Initially, you will need a browser so you can find audio stream addresses. You can try using lynx (good luck decrypting the address out of that nightmarish output), but the best way to figure out what address your favorite stream is from is to use a "gooey" browser like Netscape, Mozilla, etc.

There are many other command line options available beyond those we've mentioned here. For instance, you can change your buffer size for your stream, or mix down a stereo stream to mono for better performance. You can also speed up or slow down the play rate for your mp3 files. For details on these options, and many more, type:

mpg123 <Enter>


mpg123 --longhelp <Enter>


man mpg123 <Enter>

at the command prompt.

Well, we hope that was useful and informative; we aim to please. Wait! Harken! Never mind; that was it. If you enjoyed this article and/or found it useful, tune in next time to find out more wonderful, exciting, earth-shattering ways to make the most of your command line. No "gooey" needed!

(c) October 2001, Michael & Melinda Petruzziello michael@jmptechnologies.com; melinda@jmptechnologies.com

Streaming Audio With mpg123  << Page 3 of 3