Register
It is currently Mon Nov 24, 2014 11:55 am

script for streamripper


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Wed Oct 04, 2006 9:26 pm   
User avatar

Joined: Tue May 17, 2005 12:55 am
Posts: 86
Location: Big Easy, Louisiana
i thought of this tonight when i was looking at my favorite shoutcast streams :idea: thought it would be cool to pick from my list of favorites. I posted it for notes, but figured that someone else might like the idea ;)

Code:
#!/bin/bash

#########################################
#                                       #
#               Streamripper            #
#                 Utility               #
#                                       #
#########################################

#I thought this up tonight when I was going through my favorite Shoutcast Stations

clear
echo "This script will download your favorite shoutcast streams."
echo "1) Virgin Radio" #http://vruk.ic.llnwd.net/stream/vruk_vr_hi
echo "2) 1.FM" #http://64.62.158.226:8070/
echo "3) Radiophile" #http://208.53.131.181:9660
echo "4) Sky FM Mostly Classical" #http://scfire-ntc0l-1.stream.aol.com/stream/1006
echo "5) Sky FM Classical Flamenco" #http://207.200.96.227/stream/1028
echo "6) The Score Station" #http://62.75.241.245:8008
echo "7) Radio Rivendell" #http://88.191.11.123:8766
echo "8) idobi radio" #http://213.251.129.50:8080/

read -p "Please select the radio stream that you would like to rip: " choice





Top
 Profile YIM  
 PostPosted: Thu Oct 05, 2006 4:32 am   
User avatar

Joined: Mon Jul 03, 2006 8:58 pm
Posts: 52
Location: Rochester, NY
Am I missing something? I seems the stream-ripping part of that script has gone missing.


Top
 Profile WWW  
 PostPosted: Thu Oct 05, 2006 4:05 pm   
User avatar

Joined: Tue May 17, 2005 12:55 am
Posts: 86
Location: Big Easy, Louisiana
:lol: i'll be doing that part in a bit, i was just setting up the menus ;)


i think some if/then statements would work nicely. what do you guys think :?


Top
 Profile YIM  
 PostPosted: Thu Oct 05, 2006 11:13 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 673
Location: Des Moines, Iowa
ok...... heres' my example.... you can modify it however you wish ;)

Code:
#########################################
#                                       #
#               Streamripper            #
#                 Utility               #
#                                       #
#########################################

      STREAMRIPPER UTILITY


        1) Virgin Radio
        2) 1.FM
        3) Radiophile
        4) Sky FM Mostly Classical
        5) Sky FM Classical Flamenco
        6) The Score Station
        7) Radio Rivendell
        8) idobi radio

        0) Exit

     Which stream do you want to rip ? :




Code:

#!/bin/bash
# Streamripper Utility

headerfile ()
{
clear
echo "#########################################
#                                       #
#               Streamripper            #
#                 Utility               #
#                                       #
#########################################"
echo "";
tput smso;echo "      STREAMRIPPER UTILITY        ";tput rmso
echo " "
}


menu ()
{
headerfile
mainmenu="\t1) Virgin Radio\n\t2) 1.FM\n\t3) Radiophile\n\t4) Sky FM Mostly Classical\n\t5) Sky FM Classical Flamenco\n\t6) The Score Station\n\t7) Radio Rivendell\n\t8) idobi radio\n\n\t0) Exit"

echo "";
echo -e "${mainmenu}"
echo "";
read -p "     Which stream do you want to rip ? : " option

while true
do
   case ${option} in
      1)   streamripper http://vruk.ic.llnwd.net/stream/vruk_vr_hi ;
         ;;
      2)   streamripper http://64.62.158.226:8070/ ;
         ;;
      3)   streamripper http://208.53.131.181:9660 ;
    ;;
      4)   streamripper http://scfire-ntc0l-1.stream.aol.com/stream/1006 ;
         ;;
      5)   streamripper http://207.200.96.227/stream/1028 ;
         ;;
      6)   streamripper http://62.75.241.245:8008 ;
         ;;
      7)   streamripper http://88.191.11.123:8766 ;
         ;;
      8)   streamripper http://213.251.129.50:8080/ ;
         ;;
      0)   option="";
         exit 0 ;
         ;;
      *)   echo "That was not a valid choice, try again."; sleep 2;
         ;;
   esac
   headerfile

   echo "";
   echo -e "${mainmenu}"
   echo "";   
   read -p "Please choose one of the options above : " option
done
}

exitfunction ()
{
exit 0
}
trap exitfunction  SIGHUP SIGINT SIGTERM

########  Program run starts here ######## 
menu
exit 0



Some command line options for streamripper include:

Quote:
Command line parameters
To display this info on your console, type "streamripper" (on *nix) or "consoleWin32" (on Windows).

-d <dir> -------- Optional: The destination directory

Selects a different base directory for ripping, just in case you don't want to dump tons of mp3's into whatever directory you're at.

-s -------------- Optional: Don't create a directory for each stream

I don't know why you would want to do this. Normally streamripper will make a directory with the same name as the stream to place the tracks into, this disables that.

-r <base port> -- Optional: Create a relay server on base port, defaults to port 8000

Creates a relay server on base port. If base port is not specified it defaults to 8000, otherwise whatever you entered for base port. NOTE: without the -z option, it will keep trying higher ports if the port is unavailable.

-z -------------- Optional: Don't scan for free ports if base port is not available

Disables the "scan for free port" feature. Use it if you're paranoid. or don't like ports being open.

-p <url> -------- Optional: Use HTTP proxy server at <url>

If you're behind a proxy server, enter it here. This hasn't been tested in a while but it should still work. Please tell me if it doesn't.

-o -------------- Optional: Write over tracks from incomplete

When Streamripper rips tracks, they are first in the incomplete directory. If the tracks finishes properly, it moves over to the main directory, but if the track is already there it doesn't. This makes streamripper copy over tracks that already exist in the main directory. I didn't make this the default because if you're ripping a stream for a long time (trying to get the whole thing) it helps to see the incomplete directory fill up with tracks you already have. Once the incomplete directory is as large (or larger) then your main directory, you can be pretty sure you've got the whole stream.

-c -------------- Optional: Don't auto-reconnect

Once again, not sure why you wouldn't want this. Normally Streamripper will be very aggressive and try to re-connect to a dropped stream, this disables that.

-v -------------- Optional: Print version info and quit

This is used alone with no other parameters to show you which version of Streamripper you're running.

-l <seconds> ---- Optional: Number of seconds to run, otherwise runs forever

This can (for example) be used with scheduling to rip a specific radio show from home while you're at work (or other way around). See the forum for posts on differnt ways of scheduling. Don't forget that this parameter takes seconds (10 minutes = 600 seconds, 1 hour = 3600 seconds etc..).

-q -------------- Optional: Add sequence number to output file

Makes Streamripper save files with 'prefixes' of 001_, 002_, 003_, up to 999_ :)
Great stuff if you need to know where to find those missing bits of sound that got chopped off (without searching through a lot of rips).

-i -------------- Optional: Don't add ID3V1 Tags to output file

If, for some strange reason, you don't want the ID3V1 Tag with all its info...

-u <useragent> -- Optional: Use a different UserAgent than "Streamripper"

Some stream-servers will not accept the default Streamripper UserAgent, the solution is using this parameter with the value "FreeAmp/2.x".


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP