r2758 - people/bmsleight/autotesting

bmsleight-guest at alioth.debian.org bmsleight-guest at alioth.debian.org
Mon Aug 13 22:41:47 UTC 2007


Author: bmsleight-guest
Date: 2007-08-13 22:41:47 +0000 (Mon, 13 Aug 2007)
New Revision: 2758

Modified:
   people/bmsleight/autotesting/video-qemu-booting-iso.sh
Log:
Twibright vncrec can stream vncrec to ffmpeg2thoera, rather than having to create intermediate frames. Hence encoding of video is much faster then the original vncrec.

Modified: people/bmsleight/autotesting/video-qemu-booting-iso.sh
===================================================================
--- people/bmsleight/autotesting/video-qemu-booting-iso.sh	2007-08-13 21:13:35 UTC (rev 2757)
+++ people/bmsleight/autotesting/video-qemu-booting-iso.sh	2007-08-13 22:41:47 UTC (rev 2758)
@@ -45,7 +45,6 @@
 TODAY=$(date +"%F")
 TMP_DIR=/tmp/vqbi.$$.tmp
 IPADDRESS="127.0.0.1"
-VNCREC_MOVIE_FRAMERATE=1
 }
 
 get_options_and_defaults ()
@@ -62,10 +61,8 @@
 if [ "$CONVERT_DIM" = "" ]; then
  CONVERT_DIM="800x600"
 fi
-if [ "$MCODER_DIM" = "" ]; then
- MCODER_DIM="w=800:h=600"
-fi
-MCODER_DIM_SCALE=$(echo "$MCODER_DIM" | sed s/x/,/g)
+FFMPEG_DIM_SCALE=$(echo "$CONVERT_DIM" | sed s/x/\ -y\ /g)
+FFMPEG_DIM_SCALE="-x $FFMPEG_DIM_SCALE"
 if [ "$TIME_Q" = "" ]; then
  TIME_Q="60"
 fi
@@ -164,52 +161,10 @@
 vncserver -kill :$VNCSERVER_VNCREC_NUMBER
 }
 
-
-export_frames ()
-{
-convert $LOGO -resize 200x200 -negate  -gravity South -background Black -font Helvetica-Bold -fill white -splice 0x36 -pointsize 25 -draw "text 0,0 'AutoTesting'" -transparent black $TMP_DIR/minilogo.png
-convert $TMP_DIR/minilogo.png  -fill grey50 -colorize 40 $TMP_DIR/minilogo.png
-VNCREC_MOVIE_CMD="convert xpm:-  $TMP_DIR/image-%05d.jpg"
-export VNCREC_MOVIE_CMD
-
-vncrec  -movie $TMP_DIR/qemu.1.vnc >/dev/null 2>&1 &
-# vncrec can hand sometimes hang and not terminate, after all frames have been generated.
-# So we monitor vncrec and kill vncrec when no further frames are being generated
-MORE_FRAMES=1
-NUMBER_FRAMES=0
-while [ "$MORE_FRAMES" -gt "$NUMBER_FRAMES" ]
-do
- NUMBER_FRAMES="$MORE_FRAMES"
- sleep 60
- MORE_FRAMES=$(ls $TMP_DIR/image-*.jpg | wc -w)
- echo "Frames: $NUMBER_FRAMES to $MORE_FRAMES generated"
-done
-ps ax | grep vncrec
-killall vncrec
-echo "vncrec -movie killed"
-
-for i in $TMP_DIR/image-*.jpg
-do
- convert $i -resize $CONVERT_DIM $i
- echo "Resized $i"
- # The logo is needed to ensure we do not have a blank frame, which mencode can not handle.
- # Heck - it also looks nice IMHO.
- composite -dissolve 15 -gravity northeast $TMP_DIR/minilogo.png $i $i
-done
-echo "Finished making Frames"
-}
-
-
 gen_video ()
 {
-##Following is ideal - does not work
-#mkfifo -m 660 $TMP_DIR/stream.yuv
-#mplayer -vo yuv4mpeg:file=$TMP_DIR/stream.yuv -ao null -nosound -quiet "mf://$TMP_DIR/*.jpg"  -mf fps=4:type=jpg &
-#ffmpeg2theora -v 8 $TMP_DIR/stream.yuv -o $VIDEO
-#sleep 5
-
-mencoder mf://"$TMP_DIR/*.jpg" -mf w=800:h=600:fps=4:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o $TMP_DIR/tmp.avi
-ffmpeg2theora -o $VIDEO $TMP_DIR/tmp.avi --artist "AutoTesting" --title "Video of Qemu booting $ISO"  --date "$TODAY"
+#Need to runs some tests to ensure vncrec -movie does temriante at end of session.
+vncrec  -movie $TMP_DIR/qemu.1.vnc | ffmpeg2theora $FFMPEG_DIM_SCALE --videoquality 10 --inputfps 40 --artist "AutoTesting" --title "Video of Qemu booting $ISO"  --date "$TODAY" -o $VIDEO - 
 }
 
 clean_up ()
@@ -269,7 +224,6 @@
 start_qemu
 let_qemu_run
 stop_qemu
-export_frames
 gen_video
 stop_vncservers
 clean_up




More information about the debian-live-changes mailing list