job.sh
infile=/gs/hs0/tga-xx/xx/annotationFiles/Train-6988-shuffle
out_dir=/gs/hs0/tga-xx/xx/videoshot_iccv/shotFrames
FFMPEG_PATH=/gs/hs0/tga-xx-deep/xx/library/ffmpeg/bin/
PATH=$FFMPEG_PATH:$PATH
for line in `cut -d" " -f1`; do
clip_name=`basename $line | cut -d"." -f1`
if [ ! -r ${out_dir}/${clip_name}/*.finish ];then
echo $clip_name
fi
done < ${infile} | xargs -L 1 -P 7 python genShot.py --output_dir ${out_dir} --video_name
genShot.py
import commands
import skvideo.io
commands.getstatusoutput('/gs/hs0/tga-shinoda/15M54105/videoshot_iccv/Shotdetect/build/shotdetect-cmd -i %s -o %s -s %d -a %s -d 100000000000' %(video_path, out_dir, thresh, video_name))
reader = skvideo.io.ffmpeg.FFmpegReader(video_path)