Created
September 7, 2018 13:37
-
-
Save hsiboy/0dff77dc68f505e06eb8c2b2cde4bce3 to your computer and use it in GitHub Desktop.
Record Radio4 FM from Winter Hill. to record Shipping Forecast.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Record radio4 FM from Winter Hill. | |
# To be triggered by cron to record Shipping Forecast. | |
# "timeout" will send a SIGTERM to rtl_fm to abort the recording after 5 mins. | |
# Afterwards the wav file is converted to 11025 sample rate using sox. | |
# "touch" will transfer the original timestamp to the new file | |
# the original rtl_fm wav-file is deleted. | |
timeout -s SIGTERM 300s rtl_fm -M wbfm -f 93M -s 60k -g 20 -E wav -F 0 radio4fm.wav | |
sox -t wav radio4fm.wav radio4.wav rate 11025 | |
touch -r radio4fm.wav radio4.wav | |
rm radio4fm.wav |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment