Recording online radio - examples
1. Capturing ASF radio with mimms (e.g. FM Ushiku)
Filename includes current date, duration of the program is 30min, and it is converted to mp3. After that mp3 file is copied to SMB share.
Capture script
#!/bin/sh now=$(date +"%m_%d_%Y") url="mmsh://211.1.40.21:80/fmuu?MSWMExt=.asf" output_filename=Bridge_For_Joy_${now} output_filename2=Bridge_For_Joy_${now}.mp3 output_dir=/home/onosan/BridgeForJoy/ mimms -t 35 $url $output_dir$output_filename avconv -i $output_dir$output_filename $output_dir$output_filename2 cd $output_dir smbclient //<SMB SHARE> <PASSWORD> -U <USERNAME> << SMBCLIENTCOMMANDS cd <FOLDER> put $output_filename2 exit SMBCLIENTCOMMANDS
2. Capturing MP3 streaming radio with wget
Start capture script
#!/bin/sh now=$(date +"%m_%d_%Y") url="http://219.117.222.167:8020/giglive" output_filename=DJ_J_${now}.mp3 output_dir=/home/username/DJJ/ wget -O "$output_dir$output_filename" $url
Stop capture script
#!/bin/sh
pkill wget
3. Crontab entries example
0 8 * * 4 /home/username/DJJStart 0 9 * * 4 /home/username/DJJStop 13 13 * * 3 /home/username/mimms_capture