Advertisement
Guest User

Untitled

a guest
Oct 15th, 2011
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. #
  2. # radirurec.sh
  3. # NHK サイマル放送 らじる★らじるコンソール・レコーダー
  4. #
  5. # コードを見て分るように saiten さんの Gist を参考に bash script 化しました。
  6. # https://gist.github.com/1185755
  7. #
  8. # 動作確認環境
  9. # Ubuntu 10.04 Lucid Lynx
  10. # rtmpdump 2.4 ( リポジトリ・ビルド )
  11. # ffmpeg ( libav リポジトリ・ビルド )
  12. # Codec ( 自家ビルド )
  13. # https://github.com/mitsugu/bash/tree/master/AV/codecs
  14. #
  15. #! /bin/sh
  16. case $1 in
  17. r1)
  18. playpath="NetRadio_R1_flash@63346"
  19. ;;
  20. r2)
  21. playpath="NetRadio_R2_flash@63342"
  22. ;;
  23. fm)
  24. playpath="NetRadio_FM_flash@63343"
  25. ;;
  26. *)
  27. echo 'radiru, radiru player Usage:'
  28. echo ' radirurec.sh r1 path_name'
  29. echo ' radirurec.sh r2 path_name'
  30. echo ' radururec.sh fm path_name'
  31. exit 1
  32. ;;
  33. esac
  34. type="$1"
  35. rtmpdump \
  36. --rtmp "rtmpe://netradio-$type-flash.nhk.jp" \
  37. --playpath $playpath \
  38. --app "live" \
  39. -W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \
  40. --live \
  41. | ffmpeg -i - -vn -acodec libmp3lame -aq 4 "$2.mp3"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement