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 www.live365.com
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.
Playing www.live365.com.
File not found: 'www.live365.com'
Failed to open www.live365.com.
Exiting... (End of file)
Its looks like some background work needed .
mplayer
Try this.
The IP-address of an online radio station can be found over at Xat radio search.
My result :
mplayer in IPv4 networks
If your router only works with IPv4, you will need to add the option
-prefer-ipv4
. More recentmplayer
versions require this.Using VLC from the command line
As usual, VLC does it all. Use
cvlc
to run VLC on the command line.VLC can also be invoked with a
ncurses
interface, as follows:or
Hit the H key for the much needed help.
Here is a screenshot of
nvlc
with a music playlist:mplayer in IPv4 networks
If your router only works with IPv4, you will need to add the option
-prefer-ipv4
. More recentmplayer
versions require this.See below to read how to use
mplayer
with.m3u
and.pls
streams.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. To get up to speed withcmus
, first read the tutorial by typing the following command:Open .m3u and .pls streams anyhow with mplayer
If you do not like
cmus
, or it is unavailable,mplayer
can be made to do the same. For that purpose, I wrote the followingmplay
script:To navigate between directories of
.m3u
and.pls
files, one could use the CLI file browserranger
, configured to call the above script for these file types. The struggle of setting this up pays itself back by being the fastest access method. This is what I personally use in a daily setting.pyradio
Here is a nice write-up describing
pyradio
Note that
pyradio
can also be installed and found as follows:moc
Then there is also
moc
. MOC (music on console) is a full-screenncurses
based console audio player.Select a file from some directory using a menu similar to Midnight Commander, and MOC will start playing all files in this directory beginning from the chosen file. There is no need to create any playlists, even though MOC handles these as well.
mp3blaster
More details about yet another CLI music player,
mp3blaster
can be found hereThere 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:
http://bbc.co.uk/radio/listen/live/r1.asx
(BBC Radio 1) orhttp://www.bbc.co.uk/radio/listen/live/r1_aaclca.pls
(BBC Radio 1, but a different URL) orhttp://www.ndr.de/resources/metadaten/audio/m3u/ndrloop5.m3u
(N-Joy); it will (very likely) not look likewww.live365.com
.All of the above may be played back easily using
mplayer -playlist "<your url>"
, if that does not work with your stream, you can trymplayer "<your url>"
.You can try moc. MOC (music on console) is a console audio player for LINUX/UNIX designed to be powerful and easy to use.
First, if you do not include "http://", then mplayer will try to open a file called "www.live365.com".
This, however, will fail as well, since
http://www.live365.com
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".
Tera
I'm the author of Tera, an interactive terminal music radio player.
Installation
Either you clone the repo, use HomeBrew, install via deb package, or you can use Awesome package manager.
Usage
After installing Tera, you just need to run
tera
to run the program.You can find more details here. Other options here.
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, http://www.francebleu.fr/player 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...
{"mp3":"http://mp3.live.tv-radio.com/fbidf/all/fbidfhautdebit.mp3"}
But from that I got the link by removing the forward slashes. Thus finally, from the command line I execute "mplayer http://mp3.live.tv-radio.com/fbidf/all/fbidfhautdebit.mp3" and mplayer can process that stream.
Hope that helps.
Today I as looking for the same thing as the OP, and found an option I cannot believe is not listed here. If you're interested in a music player server which can run on the background and receive commands from any of many compatible clients, you could be interested in
mpd
With an incredibly generic name, Music Player Daemon (mpd) is a server (so it runs in the background) that takes commands from client applications like the analogously named mpc. Both mpd and mpc are exclusively command line applications, but if you like a little GUI to go with your CLI, you can use clients for mpd such as Ario.
Personally, I host an instance of MPD on a Raspberry Pi on my LAN, I connect a speaker to it, and I can SSH into it to control my music or use a client like Ario from my PC to control it (also remotely).
I only discovered this today so pardon if this answer lacks depth. The Arch Wiki page I linked will do a much better job than me in answering your questions about mpd though.
www.live365.com
is not the correct address of the radio stream, it is just an website address.www.live365.com doesn't provide such addresses, radios there are meant to be played in the internet browser.
There are different ways to get the proper radio stream address. - Some radios stations list them themselves - like FIP.
But once you have chosen your preferred radio you need to get its streaming address. How to do that cannot be answered but on a per-case basis. There are websites that list radio stations and provide their streaming address, sometimes as a playlist file, for example http://www.listenlive.eu/. The playlist file contains links to the actual stream. More info here.
(I am trying to get more info in terminal on the playing song - so I have posted this.)
Mpv also works, as a replacement of mplayer.
In terminal:
mpv http://etcetcetc...
mpv
mpv is a video player based on MPlayer/mplayer2.
Installation
(tested on Ubuntu 20.04)
Usage
See the manpage and play a webradio stream like:
It shows icy/shoutcast headers like (artist and title):