diff options
| author | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
|---|---|---|
| committer | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
| commit | 0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch) | |
| tree | 11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/iptv | |
| download | x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2 | |
hello world
Diffstat (limited to 'plugins/iptv')
| -rw-r--r-- | plugins/iptv/iptv/iptvstream.sh | 47 | ||||
| -rw-r--r-- | plugins/iptv/iptv/vlcstream.sh | 3 | ||||
| -rw-r--r-- | plugins/iptv/plugin.sh | 54 |
3 files changed, 104 insertions, 0 deletions
diff --git a/plugins/iptv/iptv/iptvstream.sh b/plugins/iptv/iptv/iptvstream.sh new file mode 100644 index 0000000..47d2e68 --- /dev/null +++ b/plugins/iptv/iptv/iptvstream.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +if [ $# -ne 2 ]; then + logger "$0: error: Invalid parameter count '$#' $*" + exit 1; +fi + +# Channels.conf parameter +PARAMETER=${1} + +# Iptv plugin listens this port +PORT=${2} + +# Default bitrates for stream transcoding +VBITRATE=2400 +ABITRATE=320 + +# There is a way to specify multiple URLs in the same script. The selection is +# then controlled by the extra parameter passed by IPTV plugin to the script +case $PARAMETER in + 1) + URL="" + ;; + 2) + URL="" + ;; + 3) + URL="" + ;; + *) + URL="" # Default URL + ;; +esac + +if [ -z "${URL}" ]; then + logger "$0: error: URL not defined!" + exit 1; +fi + +# Create unique pids for the stream +let VPID=${PARAMETER}+1 +let APID=${PARAMETER}+2 +let SPID=${PARAMETER}+3 + +# Use 'exec' for capturing program pid for further management in IPTV plugin +#exec vlc "${URL}" --sout "#transcode{vcodec=mp2v,acodec=mpga,vb=${VBITRATE},ab=${ABITRATE}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy +exec vlc "${URL}" --sout "#transcode{vcodec=mp2v,acodec=mpga,vb=${VBITRATE},ab=${ABITRATE},width=720,height=576}:standard{acess=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy
\ No newline at end of file diff --git a/plugins/iptv/iptv/vlcstream.sh b/plugins/iptv/iptv/vlcstream.sh new file mode 100644 index 0000000..84926d3 --- /dev/null +++ b/plugins/iptv/iptv/vlcstream.sh @@ -0,0 +1,3 @@ +#!/bin/sh +exec vlc "mms://livemedia.omroep.nl/vprohollanddoc-bb" --sout "#transcode{vcodec=mp2v,acodec=mpga,vb=2400,ab=320}:standard{access=udp,mux=ts{pid-video=1,pid-audio=2,pid-spu=3},dst=127.0.0.1:4321}" --intf dummy + diff --git a/plugins/iptv/plugin.sh b/plugins/iptv/plugin.sh new file mode 100644 index 0000000..00b08ad --- /dev/null +++ b/plugins/iptv/plugin.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 22.03.2009 +# +# vdr-iptv + +# defaults +source ./../../x-vdr.conf +source ./../../setup.conf +source ./../../functions + +WEB="http://www.saunalahti.fi/~rahrenbe/vdr/iptv/files/vdr-iptv-0.2.6.tgz" +VERSION="iptv-0.2.6" +LINK="iptv" + +VAR=`basename $WEB` +DIR=`pwd` + +# plugin entfernen +function clean_plugin() { + cd $SOURCEDIR/VDR/PLUGINS/src + rm -rf $LINK* + rm -f $VDRLIBDIR/libvdr-$LINK* + log "cleaning $LINK" +} + +# plugin installieren +function install_plugin() { + download_plugin + extract_plugin + cd $SOURCEDIR/VDR/PLUGINS/src + rm -f $LINK + ln -vfs $VERSION $LINK + patch_plugin + + ## plugin specials - start ## + cp -rf $DIR/iptv $VDRCONFDIR/plugins + chmod 0744 $VDRCONFDIR/plugins/iptv/*.sh + chown -R $VDRUSER:$VDRGROUP $VDRCONFDIR/plugins/iptv + ## plugin specials - ende ## +} + +# plugin commands +if [ $# \> 0 ]; then + cmd=$1 + cmd_plugin +else + install_plugin + log "install-plugin fuer $VERSION ist fertig" +fi + +exit 0 |
