Improve hacks/stress.py a bit.
[dcpomatic.git] / hacks / compare_dcp_tests
1 #!/bin/bash
2
3 name=$1
4 if [ "$name" == "" ]; then
5   echo "Syntax $0 <name>"
6   exit 1
7 fi
8
9 mkdir -p tmp/ref
10 cp test/data/$name/j2c*.mxf tmp/ref
11 cd tmp/ref
12 asdcp-unwrap *.mxf
13 for f in *.j2c; do 
14   j2k_to_image -i $f -o $f.png
15 done
16 cd ../..
17
18 mkdir -p tmp/new
19 for d in `find build/test/$name -mindepth 1 -maxdepth 1 -type d`; do
20   b=`basename $d`
21   echo $d, $b
22   if [ $b != "info" -a $b != "video" ]; then
23       cp $d/j2c_*.mxf tmp/new
24   fi
25 done
26
27 cd tmp/new
28 asdcp-unwrap *.mxf
29 for f in *.j2c; do
30   j2k_to_image -i $f -o $f.png
31 done
32 cd ../..
33
34 eog tmp/ref/*.png &
35 eog tmp/new/*.png
36