Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu 12.04.

While seeing around here i have gone through this But it didnt seems to be work with me . Here is my trail .

raja@badfox:~$ mplayer
MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

File not found: ''
Failed to open

Exiting... (End of file)

Its looks like some background work needed .

share|improve this question
up vote 28 down vote accepted

Try this.


You can check ip for online radio here

My result :

enter image description here

share|improve this answer
Awesome man , may i have list of good radios ? – Raja Sep 27 '12 at 16:46
I donno man. I like english slow rock, oldies 80's 90's. Dont have idea whit yours ;) Btw try look at this site – penreturns Sep 27 '12 at 16:54
Defcon Hacker Radio: – Jordan Arseno Sep 25 '13 at 22:49
@penreturns Is it possible to play the radio and record it at the same time? – Sigur Nov 20 '14 at 16:00
@Sigur : I've never try this before but you can have a look at this :… – penreturns Nov 21 '14 at 1:18

There is indeed some "background work" to be done.

First of all, you will need to get hold of a URL that points to a real stream and not just a site that offers internet radio listening. This is probably the hardest part. You can search the station's website or google if there are any streams for that particular station. The stream URL is not the URL of a player on the station's website.

A URL might look like this: (BBC Radio 1) or (BBC Radio 1, but a different URL) or (N-Joy); it will (very likely) not look like

All of the above may be played back easily using mplayer -playlist "<your url>", if that does not work with your stream, you can try mplayer "<your url>".

share|improve this answer
yeah seems like this is the hidden tricky – Raja Sep 27 '12 at 17:20

First, if you do not include "http://", then mplayer will try to open a file called "".


This, however, will fail as well, since is not an address of a stream that mplayer could play, but of a web page. With a flash player.

Short answer -- open the website in firefox or another browser and click on "play".

share|improve this answer
Thanks man but its not worked – Raja Sep 27 '12 at 16:46
Yes. I wrote "This, however, will fail as well". mplayer can read audio and video streams, not web pages -- see the answer above. – January Sep 27 '12 at 16:48
Yes January :p , you said true . i read half only . – Raja Sep 27 '12 at 16:49

Try it: cmdradio


cmdradio play rock
share|improve this answer
That url is no longer valid. You could either add this in the answer or delete this answer. – machineaddict Sep 24 '15 at 13:06

I had the same problem. What I've done to get access to streams via command line is use the 'view source' to get the url of the stream.

For example, opens in a browser and has buttons to play and stop etc. Then I right-click and select 'view source' and another page opens. I searched for mp3, (or you can search for "http://"), somewhere in there you'll find the link that is actually being used. In the example here, it turned out to be sort of hidden...


But from that I got the link by removing the forward slashes. Thus finally, from the command line I execute "mplayer" and mplayer can process that stream.

Hope that helps.

share|improve this answer

cmus also opens .m3u and .pls streams

Unlike mplayer, cmus also knows to open .m3u and .pls streams. This means less digging or "background work" to extract the stream URL from those files.

Furthermore, cmus looks nice and offers several views, a file browser and many configuration settings. cmus is available from the standard Ubuntu repositories.


share|improve this answer

protected by Community Jul 6 '15 at 12:19

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.