RASCAL Web Component

David Makalsky dmakalsky at gmail.com
Mon Sep 22 14:44:45 UTC 2008


Hi,

Currently RASCAL sends a sequence of screenshots and an audio wav file  
to the server as a zip via ftp.  I wrote a simple BASH script that  
runs every few minutes as a cron job to look for new zip files and  
convert them via mencoder to a playable AVI file.

I was wondering if someone can take a look at it, and help me convert  
this to an rc-level service, so that the RASCAL server component can  
be installed as a runlevel linux service (in /etc/init.d).

Any thoughts or assistance are appreciated.

Regards,

David Makalsky

Begin Script:

#!/bin/sh
RASCAL_DIR='/home/dmakalsky/www/rascaldir'
####################################
cd $RASCAL_DIR
for i in `ls *.zip`
do
sessionid=`echo $i | cut -f1 -d'.'`
zipfile="$sessionid".zip
silentmovie="$sessionid".silent.avi
soundmovie="$sessionid".avi
mkdir $sessionid
mv $zipfile $sessionid
unzip -j  "$sessionid"/"$zipfile" -d $sessionid
cd $sessionid
mencoder "mf://*.jpg" -mf fps=4 -o $silentmovie -ovc lavc -lavcopts  
vcodec=msmpeg4v2:vbitrate=800
mencoder $silentmovie -o $soundmovie -ovc copy -oac pcm  -audiofile  
output.wav
mv $soundmovie ..
cd ..
rm -fr $sessionid
done

End Script



More information about the fluid-work mailing list