====== Video-streaming ======
Diese Anleitung ist noch nicht ganz fertig.
===== Start =====
X
xterm
xrandr -s 800x600
cvlc -vvv /home/linux/video/ppt1.MPG /home/linux/video//ppt2.MPG --sout udp:239.255.0.1 --loop
cvlc -f --no-osd udp://@239.255.0.1:1234
===== Video Startscript =====
#!/bin/bash
XSERVER=/usr/bin/X
XTERM=/usr/bin/xterm
VLCSERVER=/usr/bin/vlc
VLCCLIENT=/usr/bin/cvlc
VIDEO1=/home/linux/video/ppt1.MPG
VIDEO2=/home/linux/video/ppt2.MPG
STREAMPATH=udp:239.255.0.1
STREAMCONNECT=udp://@239.255.0.1:1234
# X-Window-Server starten
$XSERVER -allowMouseOpenFail
# Auflösung im X-Window-Server aendern
$XTERM -e `xrandr -s 800x600
# VLC-Stream-Server starten
$VLCSERVER -vvv $VIDEO1 $VIDEO2 --sout $STREAMPATH --loop
sleep 3
# VLC-Stream-Client starten
$VLCCLIENT -f --no-osd $STREAMCONNECT
===== VLC init-Script =====
#!/bin/sh
# /etc/init.d/x11-start startup the X server
### BEGIN INIT INFO
# Provides: CVLC
# Required-Start: $local_fs $x11
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop:
### END INIT INFO
PATH=/bin:/usr/bin:/sbin:/usr/sbin
case "$1" in
start)
echo Starte VLC
/usr/bin/cvlc -f --no-osd udp://@239.255.0.1:1234 :udp-caching=300
;;
stop)
killall cvlc
;;
status)
do_status
;;
*)
log_success_msg "Usage: /etc/init.d/x11-start {start|stop|status}"
exit 1
;;
esac
exit 0
===== Watchdog für VLC =====
#!/bin/sh
logfile=/tmp/watchdog/log
# Stellt sicher, dass VLC immer wieder gestartet wird.
if [ $(ps -A | grep -c vlc) = 0 ];
then
echo "$(date) VLC wiederbeleben" >> $logfile
/etc/init.d/vlc start
fi