LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Streaming internet radio - recording? (https://www.linuxquestions.org/questions/linux-software-2/streaming-internet-radio-recording-4175549731/)

JSheppard 08-03-2015 10:48 AM

Streaming internet radio - recording?
 
I'm a Window$ user of ScreamerRadio, a freeware Window$ app that easily plays and easily records internet radio. Stations can be added extremely easily and then that list of stations can be finetuned/organized via an xml editor. Needless to say, wish there was a Screamer Radio for Linux but there isn't, unfortunately. And the developer has no interest in a Linux version either, it seems!

After a long time and much effort, I finally got one of the Linux options I googled and googled for to work in my LinuxMint 17.2 - RhythmBox. I was able to add my favourite stations easily and it's playing. So as far this goes, so, so far, so good.

However, 2 major inconveniences:

The first is the lack of recording that I can see. I don't record all shows but it's a must-have feature as I do need to do so occasionally. I haven't found anything definitive on this but a couple of vague references make me believe that one can. There's even mention of a plugin. But I haven't been able to find anything on how to do this at all so far.

Second is very ugly interface. StreamTuner2 has lovely ability to use an external media player, such as XMMS, which looks awesome! But after installing the repos version and not getting it to work, more net searching revealed that it was a broken version! As I'm leaving Window$ behind for good as much as I can which also means a new way of operating that means to me keeping to apps from the repository, if at all possible.

So my two questions are, please:

1) How can one ecord with RhythmBox?
2) Can an external player by used instead of relying on RhythmBox interface?

Of course, if anyone knows of a completely different GUI alternative app that works in LinuxMint that looks like a player and that does record, please let me know.

[I've tried StreamTuner2 and TunaPie which don't work.]

Thank you!

Doug G 08-03-2015 06:04 PM

audacity works for me on Fedora with pulseaudio.

ondoho 08-04-2015 05:48 AM

Quote:

Originally Posted by JSheppard (Post 5400228)
[I've tried StreamTuner2 and TunaPie which don't work.]

i think streamtuner2 depends on streamripper for recording, so you would have to install streamripper as well.
streamtuner2 works but it requires a little setup.

streamripper also works without streamtuner2.

sgosnell 08-04-2015 10:00 PM

For recording, audacity is the gold standard. It works. I've never tried recording from an online stream, but it shouldn't be that hard to pipe the radio to audacity and record it, either with pulseaudio or alsa.

teckk 08-06-2015 02:43 PM

A radio stream player is easy enough. Make a script and add your streams to it.

Example:
Code:

#! /usr/bin/env bash

#Add streams here.
list='
BBC1_Top40 | http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
BBC1X_RNB | http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1xtra_mf_p
BBC2_AC | http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
BBC3_Classical | http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio3_mf_p
BBC4_News| http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
BBC4X_Drama| http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4extra_mf_p
BBC4LW_News| http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4lw_mf_p
BBC5_News| http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio5live_mf_p
BBC5E_Sport| http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio5extra_mf_p
BBC6_Alt | http://bbcmedia.ic.llnwd.net/stream/bbcmedia_6music_mf_p
BBC_Asia | http://bbcmedia.ic.llnwd.net/stream/bbcmedia_asianet_mf_p
BBC_World | http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-eieuk
'
while :; do
  clear
  echo "Select a stream to start, Press Q to stop stream. Ctrl C to exit."
        echo
        PS3="Select a number:  "
        select stream in $(echo "$list" | cut -d "|" -f1); do
                  url=$(echo "$list" | grep "$stream" | cut -d "|" -f2)
                  mplayer $url &> /dev/null
                  #mpv $url &> /dev/null
                  break
  done
done

For recording just dump the stream to file.
If you can play it then you can dump the stream to file.

ugjka 08-07-2015 05:06 AM

I agree with teckk you can just dump the stream to a file. I have done this with curl.

Let's say you have this pls file for shoutcast stream http://lr3mp0.latvijasradio.lv:8004/listen.pls
Code:

curl http://lr3mp0.latvijasradio.lv:8004/listen.pls
[playlist]
NumberOfEntries=1
File1=http://lr3mp0.latvijasradio.lv:8004/

Now take the File1 entry and dump the stream
Code:

curl http://lr3mp0.latvijasradio.lv:8004/ > dump.mp3
Press ctrl+c to stop it

You can do the same with icecast m3u files aswell.

gradinaruvasile 08-09-2015 02:17 AM

This assumes you have pulseaudio installed (probably you have, most distros have it by default).

1. Start the playback.
2. Open Audacity and start monitoring.
3. Open pavucontrol find the recording stream and move it from whatever is your default device to that device's Monitor stream.
4. Start recording in Audacity.

You will record the playback stream of whatever it is playing on the selected device. This is a generic recording method, it works with anything that goes through pulseaudio.

JSheppard 08-16-2015 11:19 AM

Hi, everyone!! Thanks so much for all the replies. Really fantastic.

Yup, knew that leaving ScreamerRadio behind was going to be tough. It really seems there just isn't anything quite like it yet in Linux. I will definitely now go back and add my voice to others' requesting that the developer get this into Linux! <g>

Re the scripts, great! Thanks for that. I'll come back to that down the road if I don't find anything a bit better than what I have now. I'm at least able to listen to radio via Rhythmbox but it's clunky (and, sorry, such an ugly, cumbersome interface). But I'm able to listen to some stations at this point, so better than before.

Will try the pulseaudio next. Unfortunately, it doesn't seem to have come in my LinuxMint 17.2 (Rafaela) so will look it up in the SM.

Thanks!

JSheppard 08-16-2015 11:38 AM

OMG, never mind for now re PulseAudio, I'll have to come back to that! No, it's not in my Start menu but several options are found in the SM. And then I went to read about it ... no way, Jose, temporarily at least! Phew. (PulseAudio, the perfect setup: http://www.freedesktop.org/wiki/Soft.../PerfectSetup/, https://www.linux.com/news/hardware/...start-doing-it).

The thing that one reads about Linux is the huge learning curve. Nah, it's not that at all. I started off in DOS back in the mid 80s (where everything was "terminal" <g>) and have progressed through OSs and even have used a MAC a few times. Linux has some sort of learning curve of course, but the main challenge to newbies I now know is that it's developer-friendly, not user-friendly! Though have to say that it beats Windoze hands-down installed out-of-the-box. It's ready to go for the average computer user, that's for sure, from the get-go! Esp. coupled with the lack of security issues that Window$ has (and no having to wipe/reinstall the OS periodically esp. since you never could get imaging to work at all ...), Linux rocks!

So going to leave this question out there anyway. If anyone eventually knows and can recommend a solution that doesn't require so much tweaking, esp. terminal etc., and that works out-of-the-box, that would be grand. I'll just go recordless and keep listening via the clunky Rhythmbox. I tried several options and that's the best/easiest of the lot so far (despite its ugly, limited interface! <lol>).

Thanks!

JSheppard 08-16-2015 11:52 AM

Quote:

Originally Posted by sgosnell (Post 5400990)
For recording, audacity is the gold standard. It works. I've never tried recording from an online stream, but it shouldn't be that hard to pipe the radio to audacity and record it, either with pulseaudio or alsa.

That just reminded me, I could also probably use VLC to listen to and record a radio stream. I've done so with video streams on Window$ as there's no freeware method for video streaming that I've ever found. Hmmm, will try both until I find a more efficient solution in Linux with everything built-in.

Excellent, the big boss is on the radio tonight so I'd like to be able to record the broadcast. Even though sometimes you can find podcasts afterwards, this isn't always the case and podcasts are never 100% the same as the live-stream where you get all the pre-amble, etc., you want.

Thanks.

ondoho 08-16-2015 03:02 PM

Quote:

Originally Posted by JSheppard (Post 5406600)
PulseAudio, I'll have to come back to that! No, it's not in my Start menu but several options are found in the SM. And then I went to read about it ... no way, Jose, temporarily at least! Phew. (PulseAudio, the perfect setup: http://www.freedesktop.org/wiki/Soft.../PerfectSetup/, https://www.linux.com/news/hardware/...start-doing-it).

pulseaudio is not an application, but a sound architecture for linux.

a word of warning: the second article you linked (linux.com...) is from 2007 and thus very old, most probably outdated.

JSheppard 08-21-2015 12:16 AM

Quote:

Originally Posted by ondoho (Post 5406672)
pulseaudio is not an application, but a sound architecture for linux.

Thanks, I did see that. I've come more and more to the conclusion that what's needed is something that works more out-of-the-box.

As an aside, I guess that might make it not quite so good for the original Linux users but most of us, though power users, just don't have the kind of knowledge or experience or even time to have to write up a lot of the code or start writing up scripts to customize things or get them to work. Unfortunately. No wonder the corporate world went the Window$ way. What a trap!

There are just have too many key/core apps to find Linux alternatives to and I'm getting bogged down by all the fussing and fiddling. So one is between a rock and a hard place. I'm still here because I'm stubborn; I've wanted to go to Linux since 2008/2009. And I'm very happy with that decision to finally take the plunge by installing and not just working off of LiveDVDs. The old LiveCDs I tried back then just weren't as good as they are now! All the new stuff is awesome. But ... I'm severely down in functionality and am not finding the elegantly efficient equivalent alternatives for key/core apps in Linux <sigh>. I just hate to say it but my favourite apps are gems and it's not been easy finding things to use that approximate them by at least a minimum degree.

Quote:

Originally Posted by ondoho (Post 5406672)
a word of warning: the second article you linked (linux.com...) is from 2007 and thus very old, most probably outdated.

Yes, unfortunately, we end up where we end up when we google and I've been finding even very recent articles have old information. <sigh>

So, bottom line, if somewhere down the road a working app that comes without so much tweaking rolls into Linux-town, please advise in this thread. ScreamerRadio does it all and easily; hard to not have that on hand anymore even when we hate the OS it works in!!!!

Thank you!

maples 08-21-2015 07:49 PM

This may be a stupid suggestion, but since you enjoy using ScreamerRadio2, have you given a shot at running it with wine?

Sefyir 08-21-2015 10:05 PM

So.. you're a windows user and probably want a gui solution.
I'm going to suggest my terminal method just in case you want to go to the dark side (we have cookies)

Most radio streams have a direct link. They make this hard to find but once you find it, you will have much more freedom with it (even playing it in a gui media player)
With firefox it has a add-on called live http headers.
Once installed, You can grab headers from events in the browser.. like the connection made when you hit play on the online radio.
You're looking for something like
Code:

http://foo.bar.***.***/entercom-knddfmaac-64?session-id=638155322&type=.flv&source=v6player&user-id=3706cf25-ccdb-418c-a54f-77b23b5156ce
You mostly want this part:
Code:

http://foo.bar.***.***/entercom-knddfmaac-64?session-id=638155322&type=.flv
Or even
Code:

http://foo.bar.***.***/entercom-knddfmaac-64
Then use mplayer to play it (or network stream on many gui players) or use ffmpeg or mplayer to dump it to a file. Once you have access to the network stream, it's very easy to utilize it!

A lot of gui apps don't match windows (yet) but when it comes to the terminal, it's unmatched :)
Good luck!

Edit: I missed some of the posts which indicate you already have access to the stream link. In that case I would suggest ffmpeg to convert the audio to file... I know it's cli but it works very well once you start using it.
Something like:
Code:

curl 'link' | ffmpeg -i - file.ogg


All times are GMT -5. The time now is 01:01 AM.