mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Added a sample switch-case construct. Increased the transcoding
bitrates. Set an unique pid based on the parameter received via script call.
This commit is contained in:
parent
4dd9e42a71
commit
78b1c491f0
@ -11,13 +11,32 @@ PARAMETER=${1}
|
|||||||
# Iptv plugin listens this port
|
# Iptv plugin listens this port
|
||||||
PORT=${2}
|
PORT=${2}
|
||||||
|
|
||||||
# Define stream address
|
# 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=""
|
URL=""
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
URL=""
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
URL=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
URL="" # Default URL
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -z "${URL}" ]; then
|
if [ -z "${URL}" ]; then
|
||||||
logger "$0: error: URL not defined!"
|
logger "$0: error: URL not defined!"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use 'exec' for capturing script pid
|
# Create unique pids for the stream
|
||||||
exec vlc "${URL}" --sout "#transcode{vcodec=mp2v,acodec=mpga,vb=800,ab=192}:standard{access=udp,mux=ts,dst=127.0.0.1:${PORT}}" --intf dummy
|
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=2400,ab=320}:standard{access=udp,mux=ts{pid-video=${VPID},pid-audio=${APID},pid-spu=${SPID}},dst=127.0.0.1:${PORT}}" --intf dummy
|
||||||
|
Loading…
Reference in New Issue
Block a user