0
我有一个非常简单的shell脚本,在完成前两个任务之后,它只是停下来坐在那里,没有做任何事情,如果我切换它似乎并不重要订单等,它不会完成它。shell脚本ffmpeg在2个工作后停止
任何想法将是巨大的......
这里是我的shell脚本
for f in "[email protected]"
do
name=$(basename "$f")
dir=$(dirname "$f")
/opt/local/bin/ffmpeg -i "$f" -y -b 250k -deinterlace -vcodec vp8 -acodec libvorbis -nostdin "$dir/webm/${name%.*}.webm"
/opt/local/bin/ffmpeg -i "$f" -y -b 250k -strict experimental -deinterlace -vcodec h264 -acodec aac -nostdin "$dir/mp4/${name%.*}.mp4"
/opt/local/bin/ffmpeg -i "$f" -y -ss 00:00:15.000 -deinterlace -vcodec mjpeg -vframes 1 -an -f rawvideo -s 720x480 "$dir/img/${name%.*}.jpg"
done
'$ @'中的空白或奇怪的字符?发布文件名列表... – 2013-02-14 19:57:29
...或者,ffmpeg衍生出很多进程;也许你需要使用'ffmpeg ... && ffmpeg ... && ffmpeg ...'。最后,像往常一样,在调试shell脚本时,将shebang变成'#!/ bin/bash -x'来启用调试并查看输出。只是我的0.1€... – 2013-02-14 20:15:44
[shell脚本ffmpeg在2个作业之后停止](http://superuser.com/q/552230/110524)的完全重复。请勿在堆叠网络之间进行路口交叉。 – LordNeckbeard 2013-02-14 20:17:24