Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: "gui" to launch live web radio, audio streaming with mplayer< Next Oldest | Next Newest >
yodelaye Offline





Group: Members
Posts: 16
Joined: Feb. 2007
Posted: April 18 2007,18:49 QUOTE

Hi DSL-N community

I think the DSLpanel is a nice tool.
like dsl : convenient, small, fast.

As is it only a script... easy to have a look inside

I used the same structure to create a "gui" to launch web radio streaming through mplayer

> file tuner.tgz available here :
http://cf.geocities.com/yodelaye/DamnSmallLinux_contrib/
> the file is a tgz because geocities restrains the file extension you can upload there
> unpack the file either with emelfm or "tar -xzvf  tuner.tgz"
> simply copy the file to your home or whatever location you can launch a script from
> launch it with "tuner_gui" in a terminal

each button launchs mplayer and the streaming data of the radio.

button and streaming url may be changed by editing the script in a text editor



:)  enjoy :)
Back to top
Profile PM 
RigasW Offline





Group: Members
Posts: 59
Joined: April 2006
Posted: June 06 2007,17:33 QUOTE

Hi
just two questions:

- How do I start this script?

- Does it run in DSL too (I do not use DSL-N)?

Thanks

Rigas
Back to top
Profile PM 
yodelaye Offline





Group: Members
Posts: 16
Joined: Feb. 2007
Posted: July 02 2007,17:44 QUOTE

Hello RigasW

1) To launch the script :
- unzip the file
- you get a tuner_gui which is already executable

Code Sample
tar -xzvf tuner.tgz
./tuner_gui


2) Nope, it needs flua which only comes with DSL-N. It does not run in DSL

I used DSL-N for a while and switched back to DSL.
I noticed it didnt work any more but as my model script (the DSL panel script "mydslPanel.lua") was quite different from the one of DSL-N I didn't go further
 
Yod
Back to top
Profile PM 
yodelaye Offline





Group: Members
Posts: 16
Joined: Feb. 2007
Posted: July 02 2007,19:10 QUOTE

Hi, again

In fact it was not so hard to change the cpanel.lua script to have this tuner_gui script working for DSL too

the script is provided below
to use it :
- copy it in your text editor
- save it (ex : in your /home/dsl as tuner_gui_dsl
- in a terminal
- allow the file to be executed
- and launch it
Code Sample

chmod +x tuner_gui_dsl
./tuner_gui_dsl


a few remark :
- of course it requires mplayer. so don t forget to download one mplayer extension in the repositery

- As you can see, it is quite easy to edit the radio available.   the most difficult is to find the url for the streaming flux of your favorite radio...

--------------------------------------------------------------------
Here is the script for DSL :
--------------------------------------------------------------------
Code Sample

#!/bin/lua

-- Derived from cpanel (C) Robert Shingledecker 2005,2006
-- inspired by tuner
-- Main GUI loop for myDSL Extensions

function b1(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/lemouv_hd.m3u")
end

function b2(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceinter_hd.m3u")
end

function b3(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceculture_hd.m3u")
end

function b4(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/fip_hd.m3u")
end

function b5(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francemusique_hd.m3u")
end

function b6(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francebleu_idf_hd.m3u")
end

function b7(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodercheriefm")
end

function b8(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope1")
end

function b9(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope2")
end

function b10(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodernrj")
end

function b11(self)
  os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vipbu.yacast.fr/encodernostalgie")
end

function b12(self)
   os.execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encoderrireetchansons")
end

function b13(self)
 
end

function b14(self)

end

function b15(self)

end

function b16(self)

end

function b17(self)

end

function b18(self)

end

function b19(self)

end

function b20(self)

end

function b21(self)

end

function b22(self)

end

function b23(self)

end

function b24(self)

end

btnCB = {b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24}

w = fltk:Fl_Window(570,255, "Listen your favorite Web Radio on line")
btn={}
btnLabel={"Le Mouv !","France inter","France Culture","FIP","france musique","france bleu","cherie fm","europe1","europe2","NRJ","nostalgie","rireetchansons","","","","","","","","","","","",""}
btnWidth=130; btnHeight=30
rows=6; cols=4; spacer=10

for h=1, rows do
 for w = 1, cols do
   i = cols*(h-1)+w
      btn[i] = fltk:Fl_Button(btnWidth*(w-1)+spacer*w,btnHeight*(h-1)+spacer*h,btnWidth,btnHeight,btnLabel[i])
      btn[i]:callback(btnCB[i])
   end
end

os.execute("sudo ps > /tmp/pipe.lua &")
io.input("/tmp/pipe.lua")
local data = io.read("*all")

w:show()
Fl:run()



------------------------------------------
and here is the one for DSL-N :
------------------------------------------
Code Sample
#!/bin/flua

-- Derived from cpanel (C) from Robert Shingledecker 2004-2006
-- inspired by tuner
-- Main GUI loop

btnWidth = 130
btnHeight = 30
col = {10,150,290,430}
row = {10,50,90,130,170,210}

w = Window{570,255, "Listen your favorite Web Radio on line"}

b1 = Button{col[1],row[1],btnWidth,btnHeight, "Le mouv !"}
function b1.callback()
  execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/lemouv_hd.m3u")
end

b2 = Button{col[1],row[2],btnWidth,btnHeight, "France Inter"}
function b2:callback()
     execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceinter_hd.m3u")
end

b3 = Button{col[1],row[3],btnWidth,btnHeight, "France Culture"}
function b3:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/franceculture_hd.m3u")
end

b4 = Button{col[1],row[4],btnWidth,btnHeight, "FIP"}
function b4:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/fip_hd.m3u")
end

b5 = Button{col[1],row[5],btnWidth,btnHeight, "France musique"}
function b5:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francemusique_hd.m3u")
end

b6 = Button{col[1],row[6],btnWidth,btnHeight, "France bleue"}
function b6:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm http://viphttp.yacast.net/V4/radiofrance/francebleu_idf_hd.m3u")
end

b13 = Button{col[3],row[1],btnWidth,btnHeight, "Cherie FM"}
function b13:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodercheriefm")
end

b14 = Button{col[3],row[2],btnWidth,btnHeight, "Europe1"}
function b14:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope1")
end

b15 = Button{col[3],row[3],btnWidth,btnHeight, "Europe2"}
function b15:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip8.yacast.fr/encodereurope2")
end

b16 = Button{col[3],row[4],btnWidth,btnHeight, "NRJ"}
function b16:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encodernrj")
end

b17 = Button{col[3],row[5],btnWidth,btnHeight, "nostalgie"}
function b17:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vipbu.yacast.fr/encodernostalgie")
end

b18 = Button{col[3],row[6],btnWidth,btnHeight, "Rire et chansons"}
function b18:callback()
  execute("aterm +tr -e mplayer -nocache -afm acm mplayer -afm acm -nocache mms://vip1.yacast.fr/encoderrireetchansons")
end

w:end_layout()
w:show()




enjoy
yod
Back to top
Profile PM 
3 replies since April 18 2007,18:49 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: "gui" to launch live web radio

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code