Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # radirurec.sh
- # NHK サイマル放送 らじる★らじるコンソール・レコーダー
- #
- # コードを見て分るように saiten さんの Gist を参考に bash script 化しました。
- # https://gist.github.com/1185755
- #
- # 動作確認環境
- # Ubuntu 10.04 Lucid Lynx
- # rtmpdump 2.4 ( リポジトリ・ビルド )
- # ffmpeg ( libav リポジトリ・ビルド )
- # Codec ( 自家ビルド )
- # https://github.com/mitsugu/bash/tree/master/AV/codecs
- #
- #! /bin/sh
- case $1 in
- r1)
- playpath="NetRadio_R1_flash@63346"
- ;;
- r2)
- playpath="NetRadio_R2_flash@63342"
- ;;
- fm)
- playpath="NetRadio_FM_flash@63343"
- ;;
- *)
- echo 'radiru, radiru player Usage:'
- echo ' radirurec.sh r1 path_name'
- echo ' radirurec.sh r2 path_name'
- echo ' radururec.sh fm path_name'
- exit 1
- ;;
- esac
- type="$1"
- rtmpdump \
- --rtmp "rtmpe://netradio-$type-flash.nhk.jp" \
- --playpath $playpath \
- --app "live" \
- -W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \
- --live \
- | ffmpeg -i - -vn -acodec libmp3lame -aq 4 "$2.mp3"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement