#!/bin/bash
pass=0
for i in {1..300}
do
   ./sample_encode h264 -i (path/to/stream) -o output/out.h264 -w 4096 -h 2160 -async 7 -f 60 -b 40000 -hw > output/out_$i.log 2>&1
   if [ $? -ne $pass ] ;
   then

       echo "FAIL"
       break
   fi
done
dmesg -e >> output/fail/dmessg_$i.txt
cp output/out_$i.log output/fail/out_$i.log
