Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

samurai.fm script & new option request

(http://stream-recorder.com/forum/showthread.php?t=11085)

zvhotboxru 02-25-2012 02:54 AM

samurai.fm script & new option request


 
I wrote a small bash script to automate downloading from samurai.fm:

Code:

#!/bin/bash
#ver.6
Error() { read -p "Press enter to continue"; }
# -----uncomment following strings for first run:
#sudo add-apt-repository ppa:jon-hedgerows/get-iplayer
#sudo apt-get update
#sudo apt-get install rtmpdump
#sudo apt-get install ffmpeg libavcodec-extra-53

mkdir -p ~/Music/SamuraiFM
cd ~/Music/SamuraiFM/
link="link not captured!"
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT || Error
echo refresh browser and press PLAY then press here "q" and hit ENTER
link=`sudo rtmpsrv | grep rtmpdump -r `  || Error
fname=`echo $link | sed 's/.*-o //' |  sed 's/.flv//'`
sudo echo $link | sed 's/-o.*/--live -o - | ffmpeg -i - -vn -y -ab 320 "SFM_'$fname'.mp3"/' > samurai_link.sh  || Error
sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT  || Error

sudo bash samurai_link.sh || Error
rm -f $fname.flv

U start script, refresh samurai.fm page, hit play & pause on desired track, back to terminal, hit Q and Enter. Download starts.

As i need to make some changes to link & to make it fully automatic (to skip mess with Q and Enter) it would be great to have an option for rtmpsrv just to output download link and exit quietly, without autostart of rtmpdump.

Anyway it's a great tool, thanks.

malikron7 02-26-2012 03:28 AM

Re: samurai.fm script & new option request


 
hi is there a script for www.aljazeerasport.tv ?


All times are GMT -6. The time now is 03:19 AM.