Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@7kry
Last active August 29, 2015 14:03
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 7kry/42a34e7613cf997a3cc4 to your computer and use it in GitHub Desktop.
Save 7kry/42a34e7613cf997a3cc4 to your computer and use it in GitHub Desktop.
http://listenradio.jp も録音しちゃえ!
#! /bin/sh
if [ $# -lt 4 ]; then
cat > /dev/stderr <<EOF
USAGE: $0 <channel_id> <duration> <savedest> <prefix>
EOF
exit 1
fi
channel=$1
duration=$2
savedest=$3
prefix=$4
date=`date '+%Y-%m-%d-%H_%M'`
rtmpdump \
-r "rtmp://mtist.as.smartstream.ne.jp/$channel/livestream" \
--app $channel \
-W "http://listenradio.jp/Content/player/ListenRadio.swf" \
--live \
--stop `expr $duration \* 60` \
--flv "$savedest/$prefix-$date.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment