diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-16 13:37:27 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-16 13:37:27 +0100 |
commit | 77d459730682ab1ac41584d40fa3ed736cf72959 (patch) | |
tree | 0db7ece850286449ccb535c06058553a0b113acb /bin/g-i-installation.sh | |
parent | 2853a5f05889f252dca6b415f22468ff9fb596c7 (diff) | |
download | jenkins.debian.net-77d459730682ab1ac41584d40fa3ed736cf72959.tar.xz |
ffmpeg cannot cope with png as input..
Diffstat (limited to 'bin/g-i-installation.sh')
-rwxr-xr-x | bin/g-i-installation.sh | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index f4e25ffa..b5dbb4d4 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -66,19 +66,24 @@ cleanup_all() { set +e cd $RESULTS echo -n "Last screenshot: " - if [ -f snapshot_000000.png ] ; then - ls -t1 snapshot_??????.png | tail -1 + if [ -f snapshot_000000.ppm ] ; then + ls -t1 snapshot_??????.ppm | tail -1 fi # # create video # - ffmpeg2theora --videobitrate 700 --no-upscaling snapshot_%06d.png --framerate 12 --max_size 800x600 -o g-i-installation-$NAME.ogv - rm snapshot_??????.png - # rename .bak files back to .png - if find . -name "*.png.bak" > /dev/null ; then - for i in *.png.bak ; do - mv $i $(echo $i | sed -s 's#.png.bak#.png#') + ffmpeg2theora --videobitrate 700 --no-upscaling snapshot_%06d.ppm --framerate 12 --max_size 800x600 -o g-i-installation-$NAME.ogv + rm snapshot_??????.ppm + # rename .bak files back to .ppm + if find . -name "*.ppm.bak" > /dev/null ; then + for i in *.ppm.bak ; do + mv $i $(echo $i | sed -s 's#.ppm.bak#.ppm#') done + # convert to png (less space and better supported in browsers) + for i in *.ppm ; do + convert $i ${i%.ppm}.png + done + fi set -x # @@ -166,7 +171,7 @@ monitor_installation() { PRINTF_NR=$(printf "%06d" $NR) vncsnapshot -quiet -allowblank $DISPLAY snapshot_${PRINTF_NR}.jpg 2>/dev/null || touch $RESULTS/qemu_quit if [ ! -f $RESULTS/qemu_quit ] ; then - convert snapshot_${PRINTF_NR}.jpg snapshot_${PRINTF_NR}.png + convert snapshot_${PRINTF_NR}.jpg snapshot_${PRINTF_NR}.ppm rm snapshot_${PRINTF_NR}.jpg else echo "could not take vncsnapshot, no qemu running on $DISPLAY" @@ -182,7 +187,7 @@ monitor_installation() { fi # take a screenshot for later publishing if [ $(($NR % 200)) -eq 0 ] ; then - cp snapshot_${PRINTF_NR}.png snapshot_${PRINTF_NR}.png.bak + cp snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_NR}.ppm.bak fi if [ $(($NR % 100)) -eq 0 ] && [ $NR -gt 400 ] ; then # test if this screenshot is the same as the one 400 screenshots ago, and if so, let stop this @@ -190,9 +195,9 @@ monitor_installation() { let OLD=NR-400 PRINTF_OLD=$(printf "%06d" $OLD) set -x - if diff -q snapshot_${PRINTF_NR}.png snapshot_${PRINTF_OLD}.png ; then - echo ERROR snapshot_${PRINTF_NR}.png snapshot_${PRINTF_OLD}.png match, ending installation. - ls -la snapshot_${PRINTF_NR}.png snapshot_${PRINTF_OLD}.png + if diff -q snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm ; then + echo ERROR snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm match, ending installation. + ls -la snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm figlet "Installation hangs." break fi @@ -212,7 +217,7 @@ monitor_installation() { let NR=NR-1 fi PRINTF_NR=$(printf "%06d" $NR) - cp snapshot_${PRINTF_NR}.png snapshot_${PRINTF_NR}.png.bak + cp snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_NR}.ppm.bak } trap cleanup_all INT TERM EXIT |