You are not logged in.

#1 2011-12-31 10:34:08

cm100
Member
Registered: 2010-01-23
Posts: 16

Lightweight internet radio app

I am currently using banshee to listen internet radio-stations. I have there a customized small list of my preferred stations and can easily select one. However banshee is a to blown up for this purpose. So, is there any more lightweight app where I can have such a small customized selection list of stations?

Offline

#2 2011-12-31 13:11:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Lightweight internet radio app

Have a look at https://aur.archlinux.org/packages.php?ID=36860
I have a list of *.pls and *.m3u playlists and use mplayer + sed (to select from the list) and awk (to print which station and song author + title).

Offline

#3 2011-12-31 14:45:30

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: Lightweight internet radio app

pyradio (here with my little tweaks). Loving it.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#4 2011-12-31 17:28:55

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: Lightweight internet radio app

What about just writing a little bash script with a "case" statement. I just have 3 radio stations I listen to and I have .bashrc aliases such as below - if you have more stations you could put these into a bash function with a case statement:

alias play_bbc='cvlc http://bbc.co.uk/radio/listen/live/r3.asx'
alias play_world='cvlc mms://a973.l3944038972.c39440.g.lm.akamaistream.net/D/973/39440/v0001/reflector:38972'
alias play_king='cvlc http://filesource.abacast.com/king/mp3.ram'
alias play_nwpr='cvlc http://www.nwpr.org/07/Listen/classical_high.m3u'

Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#5 2011-12-31 17:31:59

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Lightweight internet radio app

As an option there's always MPD which I mainly use for internet radio and I couldn't be more pleased with it's performance and responsiveness.

Last edited by Earnestly (2011-12-31 17:33:17)

Offline

#6 2011-12-31 19:56:39

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Lightweight internet radio app

I vouch for mplayer in a separate console smile

I use this:
script to "select" radio:

terminal -T "window title" -H -x mplayerplayplaylist "url"

mplayerplayplaylist:

#!/bin/bash

url="$1"

if [ -e "$1" ]
then
	mplayer -quiet -playlist "$1"
else
	time=$(date +%s)
	agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24"
	wget -q -U "$agent" "$url" -O /tmp/$time
	cat /tmp/"$time" | dos2unix > /tmp/"$time"_
	mv /tmp/"$time"_ /tmp/"$time"
	mplayer -quiet -use-filename-title -heartbeat-cmd "xscreensaver-command -deactivate &> /dev/null" -playlist /tmp/"$time"
	rm /tmp/"$time"
fi

This will play both remote playlists (download and play) and local playlist files. Now that I look at it I could probably improve it but it has been working just fine so as the saying goes, do fix what isn't broken tongue

lagagnon suggestion also seems good, I might have to give it a try and see if it does all I want.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2012-01-02 11:18:50

cm100
Member
Registered: 2010-01-23
Posts: 16

Re: Lightweight internet radio app

Thanks for the answers. Pyradio looks great, however there is a little problem, it doesn't play mp3 or ogg streams for example http://dradio.ic.llnwd.net/stream/dradio_dlf_m_a.ogg.

m3u streams are played without any problems.

I guess this is because pyradio calls mplayer with the playlist option.

mplayer stream.ogg  # works
mplayer -playlist stream.ogg  # doesn't

mplayer stream.m3u # doesn't work
mplayer -playlist stream.m3u # works

If someone could fix this bug, pyradio would be my choice.

Offline

#8 2012-01-02 11:50:08

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Lightweight internet radio app

cm100 wrote:

I guess this is because pyradio calls mplayer with the playlist option.

Just looking over the code and that shouldn't be the case for .ogg streams, have a gander:

    def play(self, stream_url):
        self.close()
        if stream_url.split("?")[0][-3:] in ['m3u', 'pls']:
            opts = ["mplayer", "-quiet", "-playlist", stream_url]
        else:
            opts = ["mplayer", "-quiet", stream_url]
        self.process = subprocess.Popen(opts, shell=False, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
        thread.start_new_thread(self.updateStatus, ())

pyradio github

Offline

#9 2012-01-02 12:00:35

cm100
Member
Registered: 2010-01-23
Posts: 16

Re: Lightweight internet radio app

Oh, ok, thanks, I used bohoomil's version. But with the original version it works.

orgininal:

def play(self, stream_url):
        self.close()
        if stream_url.split("?")[0][-3:] in ['m3u', 'pls']:
            opts = ["mplayer", "-quiet", "-playlist", stream_url]
        else:
            opts = ["mplayer", "-quiet", stream_url]
        self.process = subprocess.Popen(opts, shell=False, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
        thread.start_new_thread(self.updateStatus, ())

bohoomi

def play(self, url):
		self.close()
		self.process = subprocess.Popen(["mplayer", "-quiet", "-noconfig", "user" , url], shell=False, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
		thread.start_new_thread(self.updateStatus, ())

Offline

#10 2012-01-02 12:38:32

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Lightweight internet radio app

For systray integration I like radiotray (in the AUR).


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#11 2012-01-02 13:05:49

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: Lightweight internet radio app

@cm100: Thanks for pointing out the nonsense -- now is working as advertised. wink


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#12 2021-07-29 03:54:23

Alataw
Member
Registered: 2021-01-27
Posts: 20

Re: Lightweight internet radio app

lagagnon wrote:

What about just writing a little bash script with a "case" statement. I just have 3 radio stations I listen to and I have .bashrc aliases such as below - if you have more stations you could put these into a bash function with a case statement:

thanx!

omg, it's worked!

cvlc http://igor.torontocast.com:2150/stream

I just used this command in terminal. I have already installed player VLC.

Last edited by Alataw (2021-07-29 04:00:46)

Offline

#13 2021-07-29 04:58:36

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: Lightweight internet radio app

There is also a browser base app Radio Garden where you can pick up a radio station from around the globe and put it in your favourites.

Last edited by d_fajardo (2021-07-29 04:59:05)

Offline

#14 2021-07-29 06:35:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,341

Re: Lightweight internet radio app

Please don't necrobump 9 year old threads.

Closing.

Online

Board footer

Powered by FluxBB