1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Updated iptvstream.sh script to support optional video resolution settings.

This commit is contained in:
Rolf Ahrenberg 2008-09-01 14:28:05 +03:00
parent 9ec10262d4
commit 4e8e26a4b3
2 changed files with 15 additions and 2 deletions

View File

@ -66,4 +66,7 @@ VDR Plugin 'iptv' Revision History
2008-xx-xx: Version 0.2.2
- Updated Italian translation (Thanks to Diego Pierotto).
- Tweaked pid scanner parameters for HD broadcasts.
- Fixed opening of fifo tap.
- Updated iptvstream.sh script to support optional video resolution settings.

View File

@ -31,8 +31,10 @@ PARAMETER=${1}
# Iptv plugin listens this port
PORT=${2}
# Default bitrates for stream transcoding
# 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
@ -40,6 +42,8 @@ ABITRATE=320
case ${PARAMETER} in
1)
URL=""
WIDTH=720
HEIGHT=576
;;
2)
URL=""
@ -57,13 +61,19 @@ if [ -z "${URL}" ]; then
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
# Capture VLC pid for further management in IPTV plugin
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 &
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 &
PID=${!}