3 ms·
# usage: $0 < 1.htm # usage: $0 id 1.mp4 # example: $0 p0g28ctd 1.mp4 z="https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vp
by 1vuio0pswjnm7 3y ago
# usage: $0 < 1.htm
# usage: $0 id 1.mp4
# example: $0 p0g28ctd 1.mp4
z="https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/$1/format/json/jsfunc/JS_callbacks0";
if test $# -eq 0;then
tr -d '\134'|yy059|grep -C1 kind\":\"programme;
fi
if test $# -eq 1;then
ftp -4o\|yy059 "$z"|less;
fi
if test $# -eq 2;then
x=$(ftp -4o'|sed -n "s>.*http://vod-hls-ww-live.akamaized.net>http://vod-hls-ww-live.akamaized.net>;s/\".*//;/http:\/\/vod-hls/p"' "$z");
test $x||break;
ffmpeg -y -i "$x" -c copy $2 2>/dev/null;
fi