[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Saturday, 18 November 2000 | Author: Phil Kerr |
Published to: enhance_articles_multimedia/Audio Articles | Page: 1/1 - [Printable] |
Introduction to Streaming MP3
We've got a great one for you today. Phil Kerr, author of the famed Linux
MP3-HOWTO, has written a fantastic introduction to streaming mp3 for our readers. Learn how to
stream mp3 from one of the best. Rock on, Phil!
|
Page 1 of 1 | |||||||||||||||||||||||||||||||||||||
MP3 is a standard for encoding audio (mostly music) into a
relatively small file.
If you download an MP3 file to your machine and then listen to it, you are essentially copying the MP3 file from the Internet server to your local machine. There now are various waysyou can download MP3's such as:
Streaming is more analogous to listening to a radio station. You "tune in" and listen. There are a handful of servers you can use under Linux.I'llexplain how to set-up an IceCast server together with two different ways of connecting a "source" LiveIce & XMMS-LiveIce. First you must obtain a copy of IceCast and install it. There are links at the end of this article, including one to IceCast. You should have a choice of what package format to download: Binary, RPM or source code. I'll be downloading the source code. After downloading you'll need to install it. tar zxvf icecast-1_3_5_tar.tar.gz Change directory into conf/. Here we'll find a set of distribution config files. We want icecast.conf.dist. Copy this file to a file called icecast.conf in the same directory and edit the following lines:
Start it up! So, configuration now done, it's time to start the server. Change directory to bin/ and type the following: #./icecast -c ../conf/icecast.conf -b The options specify the location of the config file, and the -b option starts the server in the background.
bash-2.04# ./icecast -c ../conf/icecast.conf -b
Just to make sure, check to see if the process is running with a ps command: bash-2.04# ps -ef|grep icecast root 7776 1 0 20:48 pts/0 00:00:00 ./icecast -c ../conf/icecast.conf -b root 7777 7776 0 20:48 pts/0 00:00:00 ./icecast -c ../conf/icecast.conf -b root 7778 7777 0 20:48 pts/0 00:00:00 ./icecast -c ../conf/icecast.conf -b root 7779 7777 0 20:48 pts/0 00:00:00 ./icecast -c ../conf/icecast.conf -b root 7780 7777 0 20:48 pts/0 00:00:00 ./icecast -c ../conf/icecast.conf -bYou can check the status of the server by examining the server logfiles in the log/ directory. OK, sothe server started.You can't wait to start streaming, can you? We now need to connect a source to the server. That source will provide the server with a list of MP3's or a connection to the soundcard. LiveIce LiveIce provides a source from both MP3 files and from the line-in/microphone socket on your soundcard. You will need a few other files to get things running:
tar zxvf liveice.tar.gzYippee, installed! Now we need to configure it. In the Liveice directory there is a TK script which you use to create liveice.cfg named liveiceconfigure.tk. This script launched a GUI based configurator. You'll have to set the values that match your IceCast setup. Here are the others:
bash-2.04# liveice
playlist You should see numbers flashing after the startup messages. These indicate the volume of the input source. If you selected to use the soundcard input and the signal is too high you will see *clip*. Below is a list of keyboard commands:
XMMS-LiveIce XMMS-LiveIce is a streaming module for XMMS (versions greater that 1.0.0). It allows you to stream MP3's using the XMMS player. If you download the source code, you will have to configure and make as the others. Once installed you will need to start XMMS and enable the plugin. From the menu's go to Options->Preferences and select Effects. The Effect plugins pulldown should now show LiveIce 1.0.0 (or a similar version number). Select this and click on the Configure button. The parameters are very similar to those of LiveIce and should be set to those of your system. Once enabled, start playing MP3's as per normal and in the logs of IceCast you should see XMMS as a source. So, now you should be able to stream MP3's from an IceCast server using LiveIce or XMMS! Happy MP3'ing!
Links LiveIce Xmms NotLame mpg123 Linux MP3-HOWTO
| |||||||||||||||||||||||||||||||||||||
Page 1 of 1 |