r5941 - in /vdr/vdr-plugin-iptv/trunk/debian: README.Debian changelog patches/00list patches/03_channel-name-parameter.dpatch vlc2iptv
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Sun Nov 25 17:39:21 UTC 2007
Author: tiber-guest
Date: Sun Nov 25 17:39:21 2007
New Revision: 5941
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/?sc=1&rev=5941
Log:
* Now vlc2iptv looks up the channel name in the channels.conf
Removed:
vdr/vdr-plugin-iptv/trunk/debian/patches/03_channel-name-parameter.dpatch
Modified:
vdr/vdr-plugin-iptv/trunk/debian/README.Debian
vdr/vdr-plugin-iptv/trunk/debian/changelog
vdr/vdr-plugin-iptv/trunk/debian/patches/00list
vdr/vdr-plugin-iptv/trunk/debian/vlc2iptv
Modified: vdr/vdr-plugin-iptv/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-iptv/trunk/debian/README.Debian?rev=5941&op=diff
==============================================================================
--- vdr/vdr-plugin-iptv/trunk/debian/README.Debian (original)
+++ vdr/vdr-plugin-iptv/trunk/debian/README.Debian Sun Nov 25 17:39:21 2007
@@ -11,8 +11,8 @@
In the channels.conf:
IPTV-EXT;IPTV:1:IPTV|EXT|vlc2iptv|1:P:0:2:3:0:0:1:0:0:0
- ^
- |- <Channel Name>
+ ^ ^
+ |- <Channel Name> |- <Parameter>
<Channel Name> specifies, which URL should be transcoded. To configure this URL,
create a file `/etc/vdr/plugins/iptv/vlcinput/<Channel Name>.conf` with the
@@ -26,6 +26,9 @@
VPID, APID and SPID are the PID-Values you have to use in the channels.conf
entry.
+<Channel Name> must be unique and you still habe to sete the numeric <Parameter>
+for vlc2iptv to a unique value.
+
Please see also the section about the external streaming in the README.
-- Tobias Grimm <tg at e-tobi.net> Sat, 27 Oct 2007 11:56:47 +0200
Modified: vdr/vdr-plugin-iptv/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-iptv/trunk/debian/changelog?rev=5941&op=diff
==============================================================================
--- vdr/vdr-plugin-iptv/trunk/debian/changelog (original)
+++ vdr/vdr-plugin-iptv/trunk/debian/changelog Sun Nov 25 17:39:21 2007
@@ -1,11 +1,10 @@
-vdr-plugin-iptv (0.0.4-1) UNRELEASED; urgency=low
+vdr-plugin-iptv (0.0.4-1) unstable; urgency=low
- * NOT RELEASED YET
* New upstream release
* Removed 03_de-po.dpatch (fixed upstream)
- * Added 03_channel-name-parameter.dpatch
+ * Now vlc2iptv looks up the channel name in the channels.conf
- -- Tobias Grimm <tg at e-tobi.net> Wed, 21 Nov 2007 09:51:53 +0100
+ -- Tobias Grimm <tg at e-tobi.net> Sun, 25 Nov 2007 18:36:06 +0100
vdr-plugin-iptv (0.0.3-2xeatre1) unstable; urgency=low
Modified: vdr/vdr-plugin-iptv/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-iptv/trunk/debian/patches/00list?rev=5941&op=diff
==============================================================================
--- vdr/vdr-plugin-iptv/trunk/debian/patches/00list (original)
+++ vdr/vdr-plugin-iptv/trunk/debian/patches/00list Sun Nov 25 17:39:21 2007
@@ -1,2 +1,1 @@
02_libsi-include
-03_channel-name-parameter
Modified: vdr/vdr-plugin-iptv/trunk/debian/vlc2iptv
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-iptv/trunk/debian/vlc2iptv?rev=5941&op=diff
==============================================================================
--- vdr/vdr-plugin-iptv/trunk/debian/vlc2iptv (original)
+++ vdr/vdr-plugin-iptv/trunk/debian/vlc2iptv Sun Nov 25 17:39:21 2007
@@ -1,37 +1,94 @@
#!/bin/sh
+#
+# vlc2iptv is used by the VDR iptv plug-in to trancode external sources
+#
+# (C) 2007 Rolf Ahrenberg, Antti Seppälä
+# (C) 2007 Tobias Grimm
+#
+# vlc2iptv is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This package is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this package; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
-if [ $# -ne 3 ]; then
- logger "$0: error: Invalid parameter count '$#' $*"
+#
+# <Global Settings>
+#
+
+CHANNELS_CONF=/var/lib/vdr/channels.conf
+CHANNEL_SETTINGS_DIR=/etc/vdr/plugins/iptv/vlcinput/
+VIDEO_BITRATE=2400
+AUDIO_BITRATE=320
+
+#
+# </Global Settings>
+#
+
+exit_with_error()
+{
+ logger "vlc2iptv: error: $*"
exit 1;
+}
+
+read_arguments()
+{
+ [ $# -ne 2 ] && exit_with_error "Invalid parameter count '$#' $*"
+ PARAMETER=$1
+ PORT=$2
+}
+
+lookup_channel_and_pids()
+{
+ [ ! -e "$CHANNELS_CONF" ] && \
+ exit_with_error "channels.conf not found ($CHANNELS_CONF)"
+
+ local CHANNEL_RECORD=`grep ":IPTV|EXT|vlc2iptv|$PARAMETER:" $CHANNELS_CONF`
+ [ -z "$CHANNEL_RECORD" ] && \
+ exit_with_error "no iptv channel with parameter $PARAMETER found"
+
+ CHANNEL_NAME=`echo $CHANNEL_RECORD | awk "-F[;,:]" '{print $1}'`
+ VPID=`echo $CHANNEL_RECORD | awk -F: '{print $6}'`
+ APID=`echo $CHANNEL_RECORD | awk -F: '{print $7}'`
+ SPID=0
+}
+
+load_channel_configuration()
+{
+ local CHANNEL_SETTINGS_FILE="$CHANNEL_SETTINGS_DIR/$CHANNEL_NAME.conf"
+
+ [ ! -e $CHANNEL_SETTINGS_FILE ] && \
+ exit_with_error "No vlc input configuration for channel '$CHANNEL_NAME'"
+ . $CHANNEL_SETTINGS_FILE
+
+ [ -z "$URL" ] && \
+ exit_with_error "No URL specified for channel '$CHANNEL_NAME'"
+}
+
+read_arguments $*
+lookup_channel_and_pids
+load_channel_configuration
+
+#
+# Start VLC
+#
+
+if [ -n "$WIDTH" -a -n "$HEIGHT" ] ; then
+ RESIZE_OPTIONS=",width=${WIDTH},height=${HEIGHT}"
+else
+ RESIZE_OPTIONS=""
fi
-# Channels.conf parameter
-PARAMETER=${1}
+exec vlc "${URL}" \
+ --sout "#transcode{vcodec=mp2v$RESIZE_OPTIONS,acodec=mpga,vb=${VIDEO_BITRATE},ab=${AUDIO_BITRATE}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" \
+ --intf dummy
-# Iptv plugin listens this port
-PORT=${2}
-
-# Channel name parameter
-CHANNEL=${3}
-
-# Default bitrates for stream transcoding
-VBITRATE=2400
-ABITRATE=320
-
-conf="/etc/vdr/plugins/iptv/vlcinput/$CHANNEL.conf"
-
-if [ -e $conf ] ; then
- . $conf
-else
- logger "$0: error: vlc input configuration not defined!"
-fi
-
-# Create unique pids for the stream
-
-[ -z $VPID ] && let VPID=${PARAMETER}+1
-[ -z $APID ] && let APID=${PARAMETER}+2
-[ -z $SPID ] && let SPID=${PARAMETER}+3
-
-# Use 'exec' for capturing program pid for further management in IPTV plugin
-echo 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 >/tmp/xxx
-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
More information about the pkg-vdr-dvb-changes
mailing list