Leo Laporte
The Tech Guy
2–5p ET Sat & Sun

Sponsors

Leo Links

RSS
Colophon



Main > Playing Radio Streams in Linux

Edit | Read | Hist | Prt


Main.PlayingRadioStreamsInLinux History

Hide minor edits - Show changes to markup

April 24, 2005, at 11:47 AM by RHNet -
Changed line 157 from:

RHNet

to:

http://leoville.tv/radio/pmwiki.php/Profiles/RHNet RHNet

April 24, 2005, at 11:46 AM by RHNet -
Added lines 140-157:

Or with Fedora/Redhat

An easier way in Fedora/red hat is http://www.mplayerhq.hu mplayer. Get the rpm from http://luna.cs.ccsu.edu/dominik/mplayer/ here. Install the rpm through the package monitor or through comandline rpm -i rpmnamehere.rpm
Check if it’s installed (from the comandline mplayer-h).
Then in the terminal su root
cd /etc/mplaer
vi mplayer.conf
Find the line of:

 # Use 8MB input cache by default.
 cache           = 812(number will be diffrent

change the value of cache to something low like 812. The higher you set this longer you have to wait for the stream to start and delay in stream but its the amount of data that is cached so when the steam chokes it doe not interupt your audio. For example Leo’s show, is 21kbps so for each 21 you have 1 second of delay and cached audio! Mine is set 812.

Once you have decided, shift+: then wq!
in the terminal for Leo’s show:

 mplayer http://ccdig.liquidviewer.com/kfi

You’ll see your cache fill and after it fills you’ll hear it through your speakers.
Enjoy,
RHNet

October 16, 2004, at 12:27 PM by Kalic -
Changed line 26 from:

Follow http://www.rpmfind.net/linux/rpm2html/search.php?query=avifile&submit=Search+… this link to search for that.

to:

Follow http://www.rpmfind.net/linux/rpm2html/search.php?query=avifile&submit=Search this link to search for that.

September 20, 2004, at 11:19 AM by James Hess -
Changed lines 19-20 from:

Ok, the first thing, check out the details http://www.linuxstb.org/radio/index.shtml this site informed me as to the software and approach I needed to take; from there, there were a few problems which I easily solved. In theory the instructions should be all you need. Unfortunately, it’s not quite that simple, at least not on Mandrake 10. If you’re just getting started with Linux, this can be quite a challenge.

to:

Ok, the first thing, check out the details http://www.linuxstb.org/radio/index.shtml this site informed me as to the software and approach I needed to take; from there, there were a few problems which I easily solved. In theory the instructions should be all you need. Unfortunately, it’s not quite that simple, at least it wasn’t for me on Mandrake 10
(Update: binaries of avifile are available at this time from the FTP mirrors!). If you’re just getting started with Linux, this can be quite a challenge.

Added lines 26-27:

Follow http://www.rpmfind.net/linux/rpm2html/search.php?query=avifile&submit=Search+… this link to search for that.

September 01, 2004, at 09:32 PM by James Hess -
Changed lines 60-61 from:
to:
Changed line 123 from:

};

to:
  };
September 01, 2004, at 09:28 PM by James Hess -
Changed line 3 from:

[tocauto]

to:
Changed lines 60-61 from:
to:
Changed lines 72-73 from:
 * Now run configure, type: @@./configure --prefix=/usr/local --with-qt-prefix=/usr/lib/qt3/@
 * Now we need to fix a few other problems, edit: @lib/video/sub_ft.cpp@@
to:
 * Now run configure, type: ./configure --prefix=/usr/local --with-qt-prefix=/usr/lib/qt3/
 * Now we need to fix a few other problems, edit: lib/video/sub_ft.cpp
Added line 80:
Changed line 82 from:
  struct modify_ldt_ldt_s {
to:
    struct modify_ldt_ldt_s {
Changed line 92 from:
  };
to:
    };
Changed line 94 from:

Bt changing it to:

to:

By changing it to:

Changed line 96 from:

/* #pragma pack(4)

to:
   /* #pragma pack(4)
Changed lines 109-110 from:

Now edit plugins/libwin32/loader/ldt_keeper.h and paste a copy of the code:

to:

Now edit plugins/libwin32/loader/ldt_keeper.h and paste a copy of the code after
the first #endif near the beginning of the file:

September 01, 2004, at 09:19 PM by James Hess -
Changed lines 19-27 from:

Ok, the first thing, check out http://www.linuxstb.org/radio/index.shtml this site it gave me
the basic instructions that I needed; from there, there were a few problems which I easily
solved. In theory the instructions should be all you need. Unfortunately, it’s not quite
that simple, at least not on Mandrake 10. If you’re just getting started with Linux, this can be
quite a challenge.

Check your Operating System vendor first to see if they offer an avifile or aviplayer package,
then check rpmfind.net. If you can find a pre-made binary package, it should be much easier to
install than to compile software yourself.

to:

Ok, the first thing, check out the details http://www.linuxstb.org/radio/index.shtml this site informed me as to the software and approach I needed to take; from there, there were a few problems which I easily solved. In theory the instructions should be all you need. Unfortunately, it’s not quite that simple, at least not on Mandrake 10. If you’re just getting started with Linux, this can be quite a challenge.

There’s really no way to “point and click” and get your radio streams out of the box, unfortunately.

Check your Operating System vendor first, however, to see if they offer an avifile or aviplayer package, then check rpmfind.net. If you can find a pre-made binary package for avifile, it should be much easier to install those than to compile software yourself.

Changed lines 31-35 from:

http://avifile.sourceforge.net/ the sourceforge download page If you want to follow along,
get the file: avifile-0.7–0.7.38.tar.gz. If a newer version is available, it may need less
patching to install. If you want to include the optional DivX capabilities, be sure to read
http://avifile.sourceforge.net/ this page first: in that case, I think you should retrieve
avifile from CVS instead of following these instructions.

to:

http://avifile.sourceforge.net/ the sourceforge download page If a newer version is available, it may need less patching to install: I haven’t tried the CVS version yet, it may work perfectly out of the box (haven’t tested it yet). If you want to include the optional DivX capabilities, be sure to read http://avifile.sourceforge.net/ this page first: in that case,
I think you should retrieve avifile from CVS instead of following these exact instructions.

Changed line 36 from:
  • Install the codec binaries they provide:
to:
  • Install the codec binaries they provide by moving them into /usr/lib/win32:
September 01, 2004, at 09:13 PM by James Hess -
Changed lines 45-47 from:
  • Optionally go to http://www.xvid.org XviD.org to download and install XviD and over http://www.divx.com/divx/linux/ here to get the divx libraries. These are not needed to listen to audio streams, but you might find it useful to include video playback capabilities.
to:
  • Optionally go to http://www.xvid.org XviD.org to download and install XviD and over

http://www.divx.com/divx/linux/ here to get the divx libraries. These are not needed to
listen to audio streams, but you might find it useful to include video playback capabilities.

Changed line 66 from:
  • First become root, type: @su -@
to:
  • First become root, type: su -
Changed line 70 from:
  • When done, type @exit@ and press enter to leave the root shell go back to the normal user shell.
to:
  • When done, type exit and press enter to leave the root shell go back to the normal user shell.
Changed lines 74-80 from:
 * @tar -zxvf avifile-0.7–0.7.38.tar.gz@
 * @cd avifile-0.7–0.7.38@
 * We need to patch the configure script first to fix a small problem, using this command at the terminal: @sed 's/void exit \?(int);/void exit (int) throw () __attribute__ ((__noreturn__));/' configure >configure.tmp@
 * @mv -f configure.tmp configure && chmod u+x configure@
 * Now run configure, type: @./configure --prefix=/usr/local --with-qt-prefix=/usr/lib/qt3/@
 * Now we need to fix a few other problems, edit: @lib/video/sub_ft.cpp@

Remove the line that reads: @#include <freetype/freetype.h>@

to:
 * tar -zxvf avifile-0.7–0.7.38.tar.gz
 * cd avifile-0.7–0.7.38
 * We need to patch the configure script first to fix a small problem, using this command at the terminal: 
sed 's/void exit \?(int);/void exit (int) throw () __attribute__ ((__noreturn__));/' configure >configure.tmp * mv -f configure.tmp configure && chmod u+x configure * Now run configure, type: @@./configure --prefix=/usr/local --with-qt-prefix=/usr/lib/qt3/@ * Now we need to fix a few other problems, edit: @lib/video/sub_ft.cpp@@

Remove the line that reads: #include <freetype/freetype.h>

Changed line 86 from:

Edit @plugins/libwin32/loader/ldt_keeper.c@, comment out the following code:

to:

Edit plugins/libwin32/loader/ldt_keeper.c, comment out the following code:

Changed line 115 from:

Now edit @plugins/libwin32/loader/ldt_keeper.h@ and paste a copy of the code:

to:

Now edit plugins/libwin32/loader/ldt_keeper.h and paste a copy of the code:

Changed lines 132-133 from:

the root shell, type @exit@ if you see a hash symbol in your prompt, or if in doubt close the
terminal and open a new session. Type @cd@ and press enter to return to your home directory.

to:

the root shell, type exit if you see a hash symbol in your prompt, or if in doubt close the
terminal and open a new session. Type cd and press enter to return to your home directory.

Changed line 137 from:
  @echo '<ASX version="3"><ENTRY><ref href="mms://ccdig.liquidviewer.com/kfi"/></ENTRY></ASX>' > kfi.asx@
to:
  echo '<ASX version="3"><ENTRY><ref href="mms://ccdig.liquidviewer.com/kfi"/></ENTRY></ASX>' > kfi.asx
September 01, 2004, at 09:06 PM by James Hess -
Changed lines 8-16 from:

Ok, you’ve tried Linux, and you like it. But it doesn’t come with that WMA player… you don’t want to miss out on all that nifty programming on Internet Radio, do you? Perhaps you’d like to get rid of that dual boot and move over to Linux entirely, but this is a major hurdle.

The purpose of this article is to help teach you how you can go about setting up access to your favorite internet radio streams from within that Linux environment.

I do not believe this is a trivial thing to accomplish: I have only attempted this in Mandrake 10 so far, and succeeded. However, if you have input to add, how this process may be made easier, for example, then by all means add that input.

Ok, the first thing, check out http://www.linuxstb.org/radio/index.shtml this site it gave me the basic instructions that I needed; from there, there were a few problems which I easily solved. In theory the instructions should be all you need. Unfortunately, it’s not quite that simple, at least not on Mandrake 10. If you’re just getting started with Linux, this can be quite a challenge.

Check your Operating System vendor first to see if they offer an avifile or aviplayer package, then check rpmfind.net. If you can find a pre-made binary package, it should be much easier to install than to compile software yourself.

to:

Ok, you’ve tried Linux, and you like it. But it doesn’t come with that WMA player… you don’t
want to miss out on all that nifty programming on Internet Radio, do you? Perhaps you’d like
to get rid of that dual boot and move over to Linux entirely, but this is a major hurdle.

The purpose of this article is to help teach you how you can go about setting up access to your
favorite internet radio streams from within that Linux environment.

I do not believe this is a trivial thing to accomplish: I have only attempted this in Mandrake 10
so far, and succeeded. However, if you have input to add, how this process may be made easier,
for example, then by all means add that input.

Ok, the first thing, check out http://www.linuxstb.org/radio/index.shtml this site it gave me
the basic instructions that I needed; from there, there were a few problems which I easily
solved. In theory the instructions should be all you need. Unfortunately, it’s not quite
that simple, at least not on Mandrake 10. If you’re just getting started with Linux, this can be
quite a challenge.

Check your Operating System vendor first to see if they offer an avifile or aviplayer package,
then check rpmfind.net. If you can find a pre-made binary package, it should be much easier to
install than to compile software yourself.

Changed lines 33-34 from:
  • http://avifile.sourceforge.net/ Download, compile and install the Avifile package. If you want to follow along below, get the version numbered: avifile-0.7–0.7.38.tar.gz from http://avifile.sourceforge.net/ the sourceforge download page If you want to follow along, get the file: avifile-0.7–0.7.38.tar.gz. If a newer version is available, it may need less patching to install. If you want to include the optional DivX capabilities, be sure to read http://avifile.sourceforge.net/ this page first: in that case, I think you should retrieve avifile from CVS instead of following these instructions.
  • Download the codec binaries, i.e. binaries-011002.tgz also from the Avifile project’s download page.
to:
  • http://avifile.sourceforge.net/ Download, compile and install the Avifile package.
    If you want to follow along below, get the version numbered: avifile-0.7–0.7.38.tar.gz from

http://avifile.sourceforge.net/ the sourceforge download page If you want to follow along,
get the file: avifile-0.7–0.7.38.tar.gz. If a newer version is available, it may need less
patching to install. If you want to include the optional DivX capabilities, be sure to read
http://avifile.sourceforge.net/ this page first: in that case, I think you should retrieve
avifile from CVS instead of following these instructions.

  • Download the codec binaries, i.e. binaries-011002.tgz also from the Avifile project’s download

page.

Changed lines 128-129 from:
  • Once everything has successfully installed, go back to your home directory: make sure you leave the root shell, type @exit@ if you see a hash symbol in your prompt, or if in doubt close the terminal and open a new session. Type @cd@ and press enter to return to your home directory.
  • Make a .asx file using the mms:// links of the Internet Radio stations you want. These should be visible from your web browser when listening to the stream. \\
to:
  • Once everything has successfully installed, go back to your home directory: make sure you leave

the root shell, type @exit@ if you see a hash symbol in your prompt, or if in doubt close the
terminal and open a new session. Type @cd@ and press enter to return to your home directory.

  • Make a .asx file using the mms:// links of the Internet Radio stations you want. These should

be visible from your web browser when listening to the stream. \\

September 01, 2004, at 09:04 PM by James Hess -
Changed lines 1-117 from:

Describe PlayingRadioStreamsInLinux here.

to:

Warning: this is a work in progress, there may be formatting and other errors

[tocauto]

Introduction

Ok, you’ve tried Linux, and you like it. But it doesn’t come with that WMA player… you don’t want to miss out on all that nifty programming on Internet Radio, do you? Perhaps you’d like to get rid of that dual boot and move over to Linux entirely, but this is a major hurdle.

The purpose of this article is to help teach you how you can go about setting up access to your favorite internet radio streams from within that Linux environment.

I do not believe this is a trivial thing to accomplish: I have only attempted this in Mandrake 10 so far, and succeeded. However, if you have input to add, how this process may be made easier, for example, then by all means add that input.

Ok, the first thing, check out http://www.linuxstb.org/radio/index.shtml this site it gave me the basic instructions that I needed; from there, there were a few problems which I easily solved. In theory the instructions should be all you need. Unfortunately, it’s not quite that simple, at least not on Mandrake 10. If you’re just getting started with Linux, this can be quite a challenge.

Check your Operating System vendor first to see if they offer an avifile or aviplayer package, then check rpmfind.net. If you can find a pre-made binary package, it should be much easier to install than to compile software yourself.

The Steps

The steps in general:

  • http://avifile.sourceforge.net/ Download, compile and install the Avifile package. If you want to follow along below, get the version numbered: avifile-0.7–0.7.38.tar.gz from http://avifile.sourceforge.net/ the sourceforge download page If you want to follow along, get the file: avifile-0.7–0.7.38.tar.gz. If a newer version is available, it may need less patching to install. If you want to include the optional DivX capabilities, be sure to read http://avifile.sourceforge.net/ this page first: in that case, I think you should retrieve avifile from CVS instead of following these instructions.
  • Download the codec binaries, i.e. binaries-011002.tgz also from the Avifile project’s download page.
  • Open a terminal window, cd to the directory you saved the files in
  • Install the codec binaries they provide:
    tar -zxvf binaries-01102.tgz -C /tmp && su -c ‘mv /tmp/win32/ /usr/lib’
  • Optionally go to http://www.xvid.org XviD.org to download and install XviD and over http://www.divx.com/divx/linux/ here to get the divx libraries. These are not needed to listen to audio streams, but you might find it useful to include video playback capabilities.
    • tar zxvf xvidcore-1.0.2.tar.gz ; cd xvidcore-1.0.2/build/generic
    • ./configure ; make
    • su -c ‘make install’
    • tar zxvf divx4linux-std-20030428.tar.gz ; cd divx4linux-20030428
    • su -c ‘./install.sh’

More detailed instructions for compiling and installing version 0.7–0.738
on a mandrake 10 system

Pre-requisites

  Packages you need to install before compiling the software:
  # gcc
  # gcc-c++
  # libqt3-devel
  # freetype2-devel

How to install the pre-requisites

Have all 6 Mandrake CDs ready (or setup urpmi download the packages for you)… open up a terminal (alt+F2 , type konsole, press enter)

Building avifile

Now, in order to install avifile:

 * @tar -zxvf avifile-0.7–0.7.38.tar.gz@
 * @cd avifile-0.7–0.7.38@
 * We need to patch the configure script first to fix a small problem, using this command at the terminal: @sed 's/void exit \?(int);/void exit (int) throw () __attribute__ ((__noreturn__));/' configure >configure.tmp@
 * @mv -f configure.tmp configure && chmod u+x configure@
 * Now run configure, type: @./configure --prefix=/usr/local --with-qt-prefix=/usr/lib/qt3/@
 * Now we need to fix a few other problems, edit: @lib/video/sub_ft.cpp@

Remove the line that reads: @#include <freetype/freetype.h>@
And add in its place:
→#include <ft2build.h>
→#include FT_FREETYPE_H

Edit @plugins/libwin32/loader/ldt_keeper.c@, comment out the following code:

  #pragma pack(4)
  struct modify_ldt_ldt_s {
          unsigned int  entry_number;
          unsigned long base_addr;
          unsigned int  limit;
          unsigned int  seg_32bit:1;
          unsigned int  contents:2;
          unsigned int  read_exec_only:1;
          unsigned int  limit_in_pages:1;
          unsigned int  seg_not_present:1;
          unsigned int  useable:1;
  };

Bt changing it to:

/* #pragma pack(4)

   struct modify_ldt_ldt_s {
           unsigned int  entry_number;
           unsigned long base_addr;
           unsigned int  limit;
           unsigned int  seg_32bit:1;
           unsigned int  contents:2;
           unsigned int  read_exec_only:1;
           unsigned int  limit_in_pages:1;
           unsigned int  seg_not_present:1;
           unsigned int  useable:1;
   }; */

Now edit @plugins/libwin32/loader/ldt_keeper.h@ and paste a copy of the code:

#pragma pack(4)
struct modify_ldt_ldt_s {

        unsigned int  entry_number;
        unsigned long base_addr;
        unsigned int  limit;
        unsigned int  seg_32bit:1;
        unsigned int  contents:2;
        unsigned int  read_exec_only:1;
        unsigned int  limit_in_pages:1;
        unsigned int  seg_not_present:1;
        unsigned int  useable:1;

};

  • Compile it: su -c ‘make; make install’
  • Once everything has successfully installed, go back to your home directory: make sure you leave the root shell, type @exit@ if you see a hash symbol in your prompt, or if in doubt close the terminal and open a new session. Type @cd@ and press enter to return to your home directory.
  • Make a .asx file using the mms:// links of the Internet Radio stations you want. These should be visible from your web browser when listening to the stream.
    For example, I entered this command in the terminal:
    @echo '<ASX version="3"><ENTRY><ref href="mms://ccdig.liquidviewer.com/kfi"/></ENTRY></ASX>' > kfi.asx@
  • aviplay kfi.asx

-Mysidia


Creative Commons License

This work is released under a Creative Commons License.
Built with pmwiki-2.2.0-beta19