Page 1 of 8

pupRadio (with pupTelly)

Posted: Sun 13 Dec 2009, 04:27
by 01micko
This is pupRadio (including pupTelly)

It is really just a bookmarking tool (a nice small one at that :wink: ) for your favourite radio web streams. While I was at it I thought I'd add video streams too.

There are 8 presets. All you have to do is find the stations/channels you like and save them as a preset. There are weblinks at the bottom of the gui to help you find streams. (Radio www and Telly www)

It will work with gxine, xine and mplayer and detects if you have either or all so it should be good for most puppies and puplets.

You can test the stream link before you save it if you like with the "Play Now!" and "Watch Now!" features. Just copy your url to the box and hit the play button. If it works ok you can save it as a preset.

There is also a bookmark list for stations/channels you want to save but don't use as often as the presets.

You also have the option to record radio streams (only) using mcewanw's ... Precord. For this option you must install Precord from http://murga-linux.com/puppy/viewtopic.php?t=49907 . You must also setup alsamixer to capture your signals from the sound card. Caution, there is some trial and error involved here, there is good info on the Precord thread.



Changelog
V 0.18
-replaced NASA stream with frog doco
V 0.17
-fixed the help for opera -bigpup
V 0.16
-fixed the help
-added new urls to replace bad ones
V 0.14
NLS debugged and Russian translation added thanks to rodin.s (in pupradio_NLS, New DOTpot file included)
V 0.13
Now fully multi-user compliant (works in Slackware as "user" :wink: )
Now localised with gettext, please upload translations to this thread :)
V 0.11
fixed as to not suppress stdout/stderr but keep them a little quieter, so there is quite a lot of coding changes
added a new TV channel thanks to str4y
V 0.10
fixed bug where mplayer was filling up xerrs.log, thanks rerwin
V 0.9
works with "fido"
V 0.8
fixed all channels, the servers moved/deleted/renamed some streams
V 0.7
fixed fullscreen bug with some players, thanks 8-bit
removed the old TV movie channel, was unreliable, replaced with Australian Parliament, equally unreliable!
V 0.6
-update to suppoert VLC if installed
V 0.5.5
-update, changed many stations, thanks stray
-refined GUI to be netbook friendly
-xmessage now times out in radio, no need to close it
-minor code improvements
V 0.5.4
-minor update, ditched "Allouette" station in radio defaults, not working
V 0.5.3
-an update for adding Gnome-Mplayer support.. only useful for Quirky or if you use Gnome-mplayer. I will leave 0.5.2 up, most will only want that.
NOTES: I seem to have had to do a "kill -9" in the "Stop" and "Quit" functions for gnome-mplayer. It wasn't quitting cleanly, a bug in gnome-mplayer? Also it starts in window mode and there is a button for full screen on the gnome-mplayer gui. It would not start in fullscreen for me, I think maybe it has to do with the waiting for the stream buffer.
V 0.5.2
-minor update to detect defaultmediaplayer. -thanks BarryK NOTE: Latest dpup uses Ogle as default media player, there is a work around in the program that displays a splash and you choose the player yourself.
-fixed typo in help
V 0.5
-added command line support -thanks to mcewanw
-there are 2 options, type "pupradio -h" for basic command line help, type "pupradio -p" and see what happens. Only radio is supported.
V 0.4.2
bugfix, xine support slipped out -fixed (no need for this if you don't use Xine)
V 0.4.1
-bugfix -tv was playing radio..oops!
V 0.4
-changed gui, better appearance -thanks tasmod
-added code so if precord is not on your system then there is no record button -thanks mcewanw
V 0.3.2
-added xine support -thanks prehistoric
-fixed if you have gxine-0.5.904 (well it works) -thanks BarryK
-stderr when closing is sent to /dev/null, no need to ctrl-C if you run from term
V 0.3
-added more presets with better gtkdialog formatting- thanks tasmod
-automatic refresh of gui when a bookmark or preset is added- thanks mcewanw
-added a splash at the start reminding a user to set the player
V 0.2
-added support for unlimited bookmarks (well there is a limit but it is many!) -thanks musher0


Warning While all care is taken no responsibility is accepted.

Have fun :D

Posted: Sun 13 Dec 2009, 13:53
by mcewanw
I've been playing with pupRadio in conjunction with Precord 1.0.3. Nice combination; they work really well together and both tiny apps...

Having slow dialup makes it hard for me to test this, but on further testing I seem to be loosing chunks of the audio whilst recording. May just be a buffering issue because of dialup but not sure. How steadily can you record pupRadio sound by capturing with Pradio? Just wondering if there is any conflict as they both access the sound device.

Yes, I just tried again and though the quality is pretty good for what is recorded, something goes horribly wrong on my system and just disconnected chunks of the streamed audio seems to be captured.

EDIT: Problem solved.... I was using too high a cbr bit rate. Selecting cbr at 64k bitrate or lower worked fine, but best for me was to use vbr (stereo or mono) which worked fine for all bit rates from 32k (creates nice small files but lower quality) up to 320k (larger file/high quality)

Posted: Sun 13 Dec 2009, 14:57
by mcewanw
hmmm... something very weird going on.

I tried arecord ... | lame ...

with the same parameters as I was using in Precord and I managed to record an mp3 file from pupRadio fine, but not when doing the same from the Pradio GUI... then I'm getting chopped up sound. I'll have to look into this, though I really can't imagine what the difference would be.

Actually, its not perfect when I run arecord... | lame... from the command line either, though I think it isn't quite so choppy? since the command line is identical to that I'm running in Precord, I'm wondering if my computer is simply too slow to cope when Gxine, is running with pupRadio and Precord gtkdialog. The way bits of sound are lost sounds like a scheduling issue - the CPU jumping back and forth between the different processes. So does it all run smoothly on a faster processor (my machine is a Pentium III 450MHz 250MHz RAM). Precord is working reasonably fine for recording from microphone (I should try that with gxine running too I suppose).

going good I think...!

Posted: Sun 13 Dec 2009, 15:44
by mcewanw
Well, my dialup is too slow, and my CPU maybe not the best, but I have found that the main problem was that I was trying to record with too high a bit rate. When I reduced it to (cbr) 64k or lower, the recording seems to be fine. Maybe marginally better using mono (in Precord and maybe Mono mixer) but I'm not too sure. I need a broadband connection to try it out properly! It's certainly fun experimenting with this combination. :-)

EDIT: Recording works better with abr (can use a higher bit rate and still quite smooth) but, for me at least, the winner is variable bir rate mode (vbr). With that I can use 320kb/s if I want and good clear recording (and that was with Stereo selected in Precord and Capturing on Stereo Mix in alsamixer)!

bug fixed on Precord, so works better with pupRadio now

Posted: Sun 13 Dec 2009, 17:15
by mcewanw
Note that new Precord version 1.0.4 fixes the bug which sometimes resulted in a blank file panel on starting it up.

Posted: Sun 13 Dec 2009, 20:40
by musher0
Hi, 01micko!

Tried it and it works fine! Listening to Radio-Prague classical on pupRadio now! :D
http://amp1.cesnet.cz:8000/cro-d-dur.ogg

The only disappointement :cry: (ah, emotions!...) is:
Can the user create a list of preferred radio stations, as in realplayer, for example?
Or do we have to change the presets every time?

Posted: Mon 14 Dec 2009, 03:46
by 01micko
Hi mcewanw and musher0

mcewanw,

When I was looking to add the record feature to pupRadio I was looking at arecord ....| lame ... and arecord | oggenc ... and while I was starting to get results it was bogging me down. I saw your app Precord and tried it... great! A great complement for pupRadio. The recording feature was also an afterthought. It's really even better as an option because it keeps my app smaller and some users may not even want to bother with recording.

As you may see by the coding my bash skills are still developing :wink: . If you have any suggestions for improvements fire at will. I follow zigbert's style with the separate functions script, it helps me keep things in order, and I suppose you develop the style that you first learn.

Other players shouldn't be too difficult to add as the structure is in place.. xine, gnome-mplayer would slot right on. I was thinking to add vlc too but when I tried it it wouldn't run as root, but I am not very familiar with vlc, ttuuxxx and mikeb seem like the experts in that field, I might sound them out.

Thanks for your comments.

musher0

It is a great idea what you suggest and shouldn't be too difficult to implement.I like the idea of presets because they are one click wonders.. but do we need 6? Perhaps 4 will do, that would free up enough screen real estate to add the extra boxes and buttons needed for a complete list, of course it would be a drop down list.. :) . I will work on that this week end.

Cheers

Posted: Mon 14 Dec 2009, 04:07
by musher0
01micko said:
It is a great idea what you suggest and shouldn't be too difficult to implement.I like the idea of presets because they are one click wonders.. but do we need 6? Perhaps 4 will do, that would free up enough screen real estate to add the extra boxes and buttons needed for a complete list, of course it would be a drop down list.. . I will work on that this week end.
Four presets sounds good. As for me, there are 3-4 radio stations I listen to the most often. Then there are those I listen to relatively often, which could be in a list.

Anyway, nice job! :D Just another example of getting nice results by pushing what exists just a little bit further!

BFN.

Posted: Mon 14 Dec 2009, 05:04
by ttuuxxx
micko rule 101 please never forget it, If you make a new application always please include a screenshot :) A picture is worth a thousand beers,or is it words, hmmmmm lol
ttuuxxx

Posted: Mon 14 Dec 2009, 05:17
by musher0
ttuuxxx wrote:micko rule 101 please never forget it, If you make a new application always please include a screenshot :) A picture is worth a thousand beers,or is it words, hmmmmm lol
ttuuxxx
Yes-yes, it's "a thousand beers". At this table, please! :lol:
You ok, ttuuxx? Should we call a cab or are you sleeping on the couch? :D

And here's the compulsory << tableau >>. (;-/)

Posted: Mon 14 Dec 2009, 05:24
by ttuuxxx
musher0 wrote:
Yes-yes, it's "a thousand beers". At this table, please! :lol:
You ok, ttuuxx? Should we call a cab or are you sleeping on the couch? :D

And here's the compulsory << tableau >>. (;-/)
Hey musher, I went to a wedding yesterday, the groom was from Montreal and the bride was Aussie, they are moving to Canada in Feb, nice time of the year to take a new bride into the middle of snow/slush/hail/ice/cold etc.
I've been to Gatineau a lot of times in the past and lived in Montreal for a year, That was fun.

ttuuxxx

Posted: Mon 14 Dec 2009, 05:26
by ttuuxxx
Hey micko here's a link to a swf player that plays one of my local stations back in Canada, just click the swf :) Would be nice if we could make a swf stream media player with graphics like this does :)
ttuuxxx

Posted: Mon 14 Dec 2009, 05:33
by musher0
Well, I'm single and have been for awhile, so... if you know of a nice and intelligent Aussie woman! :D (edit: add "pretty" to the list!) :lol:

I'll return the compliment: I'll stay with my "few acres of snow" right now, if you don't mind, given that some of your (does Australia have "provinces" or is that "states") have dangerous bush fires that won't die down 'cause it's so dry, apparently. And so close to inhabited regions, too.

Mind you, my dad died frozen in a February storm many many years ago, so I shouldn't like winter, but I'd rather that than being burned...

Posted: Mon 14 Dec 2009, 05:43
by ttuuxxx
musher0 wrote:Well, I'm single and have been for awhile, so... if you know of a nice and intelligent Aussie woman! :D

I'll return the compliment: I'll stay with my "few acres of snow" right now, if you don't mind, given that some of your (does Australia have "provinces" or is that "states") have dangerous bush fires that won't die down 'cause it's so dry, apparently. And so close to inhabited regions, too.

Mind you, my dad died frozen in a February storm many many years ago, so I shouldn't like winter, but I'd rather that than being burned...
Australia has states, even a state within a state, lol ACT. They made a state for the capital, so the politicians could have a few perks that the rest of oz doesn't, lol and also to solve an argument where it should be, Sydney and Melbourne both wanted the Capital, so they took some bushland midway and made a state, Then they actually had a architect design all the street layouts etc so it was logical, unlike regular Aussie streets all have bends etc, I don't think they could pave a straight road other than ACT.
ttuuxxx

Posted: Mon 14 Dec 2009, 06:05
by musher0
If anybody wants a really HUGE listing of Internet radio stations, download ScreamerRadio for Windows, unpack the presets.xml.gz file, and copy & paste to mplayer or whatever. All genres imaginable!

http://www.screamer-radio.com

It has the same list as a web directory here: http://www.screamer-radio.com/directory/

ScreamerRadio v.3.9 works under Wine, but if its list could possibly be interfaced with 01micko's script: wow! 8)

Posted: Mon 14 Dec 2009, 10:51
by 01micko
version 0.2 is out

Added bookmarks... you can have many of them 8) :wink:

See main post

Posted: Mon 14 Dec 2009, 13:43
by aragon
to add the classical 2 stream-directories

http://dir.xiph.org/index.php
http://classic.shoutcast.com/

aragon

Posted: Mon 14 Dec 2009, 15:08
by mcewanw
01micko wrote:Hi mcewanw and musher0

mcewanw,

When I was looking to add the record feature to pupRadio I was looking at arecord ....| lame ... and arecord | oggenc ...
I will add ogg to precord eventually but I'm bogged down myself at the moment too, with some unrelated matters I have to sort out.

Posted: Tue 15 Dec 2009, 22:21
by mcewanw
bug with Bookmarks?

You seem to need to close the app and restart it before you see your new bookmarks.

refreshing the contents of a combobox?

Posted: Wed 16 Dec 2009, 02:17
by mcewanw
mcewanw wrote:bug with Bookmarks?

You seem to need to close the app and restart it before you see your new bookmarks.
One simple way of doing that would just be to cause a restart pupRadio to occur if the user presses the Save bookmarks button. That works, I tried it.

I don't know of a way to refresh/(change_the_contents_of) a Combobox in a running gtkdialog. As far as I can see it doesn't allow <input></input> and then, refresh..., but maybe I'm wrong.

Do you or anyone know a method of updating the items in a Combobox other than a restart of the gtkdialog (or launching a new one)? It would be really useful to be able to do that.