mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 11:37:03 +00:00
Added iptvstream-notrap.sh script.
This commit is contained in:
parent
a8d01e32a1
commit
912bf068ac
4
HISTORY
4
HISTORY
@ -100,3 +100,7 @@ VDR Plugin 'iptv' Revision History
|
|||||||
- Added a note about recommended frequencies into README.
|
- Added a note about recommended frequencies into README.
|
||||||
- Fixed a locking bug with section filters.
|
- Fixed a locking bug with section filters.
|
||||||
- Fixed some lint warnings.
|
- Fixed some lint warnings.
|
||||||
|
|
||||||
|
2009-xx-xx: Version 0.3.0
|
||||||
|
|
||||||
|
- Added iptvstream-notrap.sh script.
|
||||||
|
4
README
4
README
@ -171,6 +171,10 @@ Notes:
|
|||||||
difference of 4 or greater. It's recommended to use frequencies in decades
|
difference of 4 or greater. It's recommended to use frequencies in decades
|
||||||
(10, 20, 30, 40, ...) for all IPTV channel entries.
|
(10, 20, 30, 40, ...) for all IPTV channel entries.
|
||||||
|
|
||||||
|
- VLC processes won't get killed on some setups with the provided iptvstream.sh
|
||||||
|
script and the iptvstream-notrap.sh script should be used instead in these
|
||||||
|
cases.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgements:
|
||||||
|
|
||||||
- The IPTV section filtering code is derived from Linux kernel.
|
- The IPTV section filtering code is derived from Linux kernel.
|
||||||
|
2
iptv.c
2
iptv.c
@ -20,7 +20,7 @@
|
|||||||
#error "VDR-1.6.0 API version or greater is required!"
|
#error "VDR-1.6.0 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char VERSION[] = "0.2.6";
|
static const char VERSION[] = "0.3.0";
|
||||||
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
||||||
|
|
||||||
class cPluginIptv : public cPlugin {
|
class cPluginIptv : public cPlugin {
|
||||||
|
76
iptv/iptvstream-notrap.sh
Executable file
76
iptv/iptvstream-notrap.sh
Executable file
@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# iptvstream.sh can be used by the VDR iptv plugin to transcode external
|
||||||
|
# sources
|
||||||
|
#
|
||||||
|
# (C) 2007 Rolf Ahrenberg, Antti Seppälä
|
||||||
|
#
|
||||||
|
# iptvstream.sh 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 2 ]; then
|
||||||
|
logger "$0: error: Invalid parameter count '$#' $*"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Channels.conf parameter
|
||||||
|
PARAMETER=${1}
|
||||||
|
|
||||||
|
# Iptv plugin listens this port
|
||||||
|
PORT=${2}
|
||||||
|
|
||||||
|
# Default settings for stream transcoding
|
||||||
|
VCODEC=mp2v
|
||||||
|
VBITRATE=2400
|
||||||
|
ACODEC=mpga
|
||||||
|
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=""
|
||||||
|
WIDTH=720
|
||||||
|
HEIGHT=576
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
URL=""
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
URL=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
URL="" # Default URL
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "${URL}" ]; then
|
||||||
|
logger "$0: error: URL not defined!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create transcoding options
|
||||||
|
TRANSCODE_OPTS="vcodec=${VCODEC},acodec=${ACODEC},vb=${VBITRATE},ab=${ABITRATE}"
|
||||||
|
if [ -n "${WIDTH}" -a -n "${HEIGHT}" ] ; then
|
||||||
|
TRANSCODE_OPTS="${TRANSCODE_OPTS},width=${WIDTH},height=${HEIGHT}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create unique pids for the stream
|
||||||
|
let VPID=${PARAMETER}+1
|
||||||
|
let APID=${PARAMETER}+2
|
||||||
|
let SPID=${PARAMETER}+3
|
||||||
|
|
||||||
|
# Execute VLC
|
||||||
|
exec vlc "${URL}" --sout "#transcode{${TRANSCODE_OPTS}}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy
|
Loading…
x
Reference in New Issue
Block a user