1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#! /bin/sh

RTMPDUMP=./rtmpdump

RTMP="`echo $* | sed 's/<break>.*$//'`"
APP="`echo ${RTMP} | sed 's/^.*\/\(ondemand\/\?\)/\1/'`"
PLAYPATH="`echo $1 | sed 's/^.*<break>//'`"
AUTH="`echo $1 | sed 's/^.*auth=//;s/&.*$//'`"

set -x
${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}" \
   --pageUrl 'http://www.tou.tv/foie-de-canard-et-coeur-de-femme' \
   -o out.flv --verbose