Commit before breaking everything
[matches/honours.git] / research / TCS / movie.sh
1 #!/bin/bash
2
3 # Script to create a movie from files
4
5 if [ "$#" == "0" ]; then
6         exit 0
7 fi
8
9 i=1
10 plot=/home/sam/Documents/University/honours/research/TCS/plot.sh
11 process=/home/sam/Documents/University/honours/research/TCS/max_normalise.sh
12 process2=3
13 #process="" # Do nothing
14
15 mkdir -p images
16
17 for arg in $@; do
18         echo "Plotting $arg"
19         if [ "$process" != "" ]; then
20                 echo "Process: $process $arg $process2 > $arg.p"
21                 $process $arg $process2 > $arg.p
22                 $plot $arg.p images/$i.png $1.p
23                 
24         else
25                 $plot $arg images/$i.png $1
26         fi
27         
28         i=$(( $i + 1 ))
29 done
30
31 cd images
32
33 ffmpeg -r 10 -b 1024k -i %d.png movie.mp4
34
35 rm -f *dat.p

UCC git Repository :: git.ucc.asn.au