Guy Rutenberg

Keeping track of what I do

radio.py – A CLI frontend to Online Radio

with 11 comments

radio.py is a command-line frontend for mplayer designed to make listening to online radio easy.

Features

  • Allows you to easily play your favorite online radio stations.
  • Adding new stations to radio.py is very simple.
  • Record radio streams as mp3.
  • Sleep and Wake-Up features.

Download

radio.py-0.5.tar.bz2 is the latest stable version (Release Announcement).

To install it, just copy the radio.py file to anywhere in your $PATH.

Using radio.py

Invoking radio.py is just as easy as specifing the station name.

radio.py Classic FM

You can view the list of supported stations by adding the --list flag.

radio.py --list

This will show a nicely formatted list of the station along with their homepage, so you can easily learn what type of music (or shows) each broadcasts.

Other Options

When invoking radio.py you can use the --wake-up and --sleep to make radio.py start to play after specified number of minutes and shut itself down after specified number of minutes accordingly.

radio.py --wake-up 30 Radio Paradise
radio.py --sleep 60 Radio Tel Aviv

These options can also be used together and make radio.py some kind of radio alarm clock.

radio.py --wake-up 480 --sleep 10 Galgalatz

will play cause radio.py to start play for 10 minutes in 8 hours from now.

radio.py also supports recording streams to mp3 (via lame).

radio.py --record news.mp3 BBC World Service

This option can also be combined with the --sleep and --wake-up flags to time the recording.

Written by Guy

January 11th, 2009 at 11:26 pm

Posted in

11 Responses to 'radio.py – A CLI frontend to Online Radio'

Subscribe to comments with RSS or TrackBack to 'radio.py – A CLI frontend to Online Radio'.

  1. Beautiful! Works perfectly, and very handy! Many thanks.

    Steve

    10 Aug 09 at 12:27

  2. This is just great – I’ve been struggling with a pile of mplayer stream url’s for BBC radio, that stopped working some time ago, and this has replaced all of the messing about entirely.

    Simon

    3 Nov 09 at 08:41

  3. [...] nome: radio.py [...]

  4. [...] [...]

  5. Unfortunately it looks as if the BBC streams have been changed, and no longer work… Other than that, great program…

    Richard

    2 Sep 10 at 19:58

  6. This is a brilliant idea, I will be following your progress alongside with applejux. Good luck and hope to hear great things!

  7. radio.py – A CLI frontend to Online Radio by Guy Rutenberg – just great!

    world clock

    8 Feb 12 at 01:33

  8. It is a very nice project, Thank you, but somo statios don’t work any more: BBC, radioio, and probably others

    Cesar rodriguez

    8 Dec 12 at 05:44

  9. The above folks are correct. Lots of the stations in the main radio.py don’t work. I ended up commenting them all out. Then I used the ~/.radiopy config file to add my own personal streams.

    Great wrapper for mplayer. Thanks a bunch!

    Chris

    26 Jan 13 at 05:03

  10. Hi!

    I love this project, but I’d like to see it in Debian.

    What about packaging it? Have you thought about it?

    Parménides GV

    19 May 13 at 23:50

  11. It’s a great idea, but I never had the time to package it. I think the best thing would be to actually package it for PyPi so it would be available via tools like pip instead of directly through Debian.

    However, if you are willing to create a package for Debian, I’ll gladly upload it to the radio.py page.

    Guy

    20 May 13 at 06:39

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>