summaryrefslogtreecommitdiff
path: root/templates/bin
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2010-07-23 20:55:11 +0300
committerAntti Ajanki <antti.ajanki@iki.fi>2010-07-23 20:55:11 +0300
commit310743fb9ebbf68b253b923a309cc5f635da89a1 (patch)
tree59c365db7459649344b4ab6d58fde1ceb362506d /templates/bin
downloadvdr-plugin-webvideo-310743fb9ebbf68b253b923a309cc5f635da89a1.tar.gz
vdr-plugin-webvideo-310743fb9ebbf68b253b923a309cc5f635da89a1.tar.bz2
release 0.3.0
Diffstat (limited to 'templates/bin')
-rwxr-xr-xtemplates/bin/ruutu-dl36
-rwxr-xr-xtemplates/bin/yle-dl22
2 files changed, 58 insertions, 0 deletions
diff --git a/templates/bin/ruutu-dl b/templates/bin/ruutu-dl
new file mode 100755
index 0000000..be8d01e
--- /dev/null
+++ b/templates/bin/ruutu-dl
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Downloads a video stream from ruutu.fi to stdout using
+# rtmpdump(-yle). The first parameter is the rtmp URL, the second
+# parameter is the video page URL.
+
+RTMPDUMP=
+
+which rtmpdump > /dev/null 2>&1
+if [ $? = 0 ]; then
+ RTMPDUMP=rtmpdump
+else
+ which rtmpdump-yle > /dev/null 2>&1
+ if [ $? = 0 ]; then
+ RTMPDUMP=rtmpdump-yle
+ fi
+fi
+
+if [ "x$RTMPDUMP" = "x" ]; then
+ echo "ERROR: neither rtmpdump nor rtmpdump-yle not on \$PATH" 1>&2
+ exit 1
+fi
+
+if [ "x$1" = "x" ]; then
+ echo "Expected rtmp URL as parameter" 1>&2
+ exit 1
+fi
+
+if [ "x$2" = "x" ]; then
+ echo "Expected ruutu.fi video page URL as parameter" 1>&2
+ exit 1
+fi
+
+$RTMPDUMP -r $1 -q --swfUrl http://n.sestatic.fi/sites/all/modules/media/Nelonen_mediaplayer_4.6.swf --pageUrl $2 -o -
+
+exit $?
diff --git a/templates/bin/yle-dl b/templates/bin/yle-dl
new file mode 100755
index 0000000..a317b12
--- /dev/null
+++ b/templates/bin/yle-dl
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Downloads a video stream from Yle Areena to stdout using yle-dl
+# script. The first parameter is the video page URL.
+
+YLEDL=yle-dl
+
+which $YLEDL > /dev/null 2>&1
+if [ $? != 0 ]; then
+ echo "ERROR: $YLEDL is not on \$PATH" 1>&2
+ echo "Install rtmpdump-yle from http://users.tkk.fi/~aajanki/rtmpdump-yle/index.html" 1>&2
+ exit 1
+fi
+
+if [ "x$1" = "x" ]; then
+ echo "Expected Areena URL as parameter" 1>&2
+ exit 1
+fi
+
+$YLEDL $1 -q -o -
+
+exit $?