Skip to content

Instantly share code, notes, and snippets.

@komacchi
Last active November 17, 2015 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komacchi/f9b6daec40d6a5e83ea0 to your computer and use it in GitHub Desktop.
Save komacchi/f9b6daec40d6a5e83ea0 to your computer and use it in GitHub Desktop.
Raspberry Piでradiko録音をやってみよう ref: http://qiita.com/komacchi/items/ca09d195699815c81c3e
$ sudo apt-get install rtmpdump swftools libxml2-utils ffmpeg
$ mkdir ~/bin
$ cd ~/bin
$ wget https://gist.github.com/raw/3956266/0dc83895770e26a7c37104d896a150c8bb1dffbb/rec_radiko.sh
$ chmod +x rec_radiko.sh
0 1 * * 2 /home/pi/bin/rec-and-upload.sh TBS 120
/tmp/player.swf is not a valid SWF file or contains errors.
failed get keydata
#!/bin/sh
#!/bin/bash
date=`date '+%Y-%m-%d-%H:%M'`
date=`date '+%Y-%m-%d-%H_%M'`
ffmpeg -y -i "/tmp/${channel}_${date}" -acodec libmp3lame -ab 128k "${outdir}/${channel}_${date}.mp3"
ffmpeg -y -i "/tmp/${channel}_${date}" -acodec libmp3lame -ab 32k "${outdir}/${channel}_${date}.mp3"
rec_radiko.sh TBS 1 ~/radiko
$ cd
$ git clone https://github.com/andreafabrizi/Dropbox-Uploader.git
$ cd Dropbox-Uploader
$ chmod 755 dropbox_uploader.sh
$ mv dropbox_uploader.sh ~/bin/
$ ./dropbox_uploader.sh
$ dropbox_uploader.sh upload [local_file] [remote_file]
$ crontab -e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment