Skip to content

Instantly share code, notes, and snippets.

@nbigaouette
Created April 3, 2011 21:36
Show Gist options
  • Save nbigaouette/900849 to your computer and use it in GitHub Desktop.
Save nbigaouette/900849 to your computer and use it in GitHub Desktop.
tou.tv
#! /bin/sh
#
# rtmpdump.sh
#
# http://store-it.appspot.com/tou/tou.html
RTMPDUMP=rtmpdump
RTMP="`echo $* | sed 's/<break>.*$//'`"
APP="`echo ${RTMP} | sed 's/^.*\/\(ondemand\/\?\)/\1/'`"
PLAYPATH="`echo $* | sed 's/^.*<break>//'`"
AUTH="`echo $* | sed 's/^.*auth=//;s/&.*$//'`"
echo "RTMP = $RTMP"
echo "APP = $APP"
echo "PLAYPATH = $PLAYPATH"
echo "AUTH = $AUTH"
set -x
exec ${RTMPDUMP} --app ${APP} \
--flashVer 'WIN 10,0,22,87' \
--swfVfy 'http://static.tou.tv/lib/ThePlatform/4.1.2/swf/flvPlayer.swf' \
--auth "${AUTH}" \
--tcUrl "${RTMP}" --rtmp "${RTMP}" \
--playpath "${PLAYPATH}" \
-o out.flv --verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment