您的位置:首页 > 编程语言 > Python开发

[tsubame]python[AssertionError: Cannot find installation of real FFmpeg]

2017-11-24 20:13 651 查看

job.sh

#bin/bash

#qsub -g tga-shinoda ./1_genShot.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
##...

#a,b=commands.getstatusoutput('shotdetect-cmd -i %s -o %s -s %d -a %s -d 100000000000' %(video_path, out_dir, thresh, video_name)) #won't work, if I add $PATH in .bashrc
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)
#error:Cannot find installation of real FFmpeg
#solution: in job.sh, write PATH=$FFMPEG_PATH:$PATH

##...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐