Na, ja. Oder so ähnlich.
Warum immer das gleiche Bootimage anzeigen, wo man doch ganz viele schöne Urlaubsfotos schon auf der platte liegen hat ?
Also bei jedem Start ein zufälliges Bild ausgewhält, ein wenig umcodiert und fertig ist das neue Bootimage.
Hab mal ein wenig gescriptet. Funzt für Suse schon ganz wunderbar.
Ist nur mal so 'ne Anregung. Für mich ganz interessant.
Bash
#!/bin/bash
#############################################
# Variablendeklaration
#############################################
cat="/bin/cat"
jpegtopnm="/usr/bin/jpegtopnm"
pnmscale="/usr/bin/pnmscale"
ppmntsc="/usr/bin/ppmntsc"
ppmtoy4m="/usr/bin/ppmtoy4m"
mpeg2enc="/usr/bin/mpeg2enc"
stillimage="/usr/src/packages/SOURCES/linuxtv-dvb-apps-1.1.0/test/test_stillimage"
find="/usr/bin/find"
nohup="/usr/bin/nohup"
playtime="60"
inimagedir="/bilder"
outimagefile="/tmp/image.mpg"
# Deklaration ENDE
############################################
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Playing random boot Image"
filecount=`$find $inimagedir -type f |wc -l`
number=0
while [ "$number" -le 1 ]
do
number=$RANDOM
let "number %= $filecount"
done
inimagefile=`$find $inimagedir -type f|head -$number|tail -1`
$cat $inimagefile | $jpegtopnm | $pnmscale -xsize=704 -ysize=576 |\
$ppmntsc --pal | $ppmtoy4m -F 25:1 -A 4:3 -v 0|\
$mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -o $outimagefile 2> /dev/null 1> /dev/null
export SSTIME=$playtime
$nohup $stillimage $outimagefile > /dev/null &
rc_status -v
;;
stop)
echo -n "Shutting down random boot Image"
killall -q test_stillimage
rc_status -v
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
rc_exit
Alles anzeigen