在OSX上使用ffmpeg的神秘错误 [英] mysterious error with ffmpeg on OSX
问题描述
find。 -maxdepth 1 | while read blah
do
echo$ blah
ffmpeg -loglevel error -i ./test.jpg -f null / dev / null
done
此输出是
/test.jpg
/test.mp4
/test.sh
如果我删除ffmpeg调用,输出将成为这个(我预期的):
./ test。 jpg
./test.mp4
./test.sh
仅当ffmpeg解码器被激活时才会发生,因为ffmpeg -version不会产生错误。为什么ffmpeg会以这种方式影响一个无关的字符串?
我在机智的结束,任何帮助将不胜感激。
FFmpeg正在吃你的标准输入。这样做:
find |同时阅读
do
ffmpeg -nostdin
done
There seems to be a bug in my bash script, and after a long time I managed to reduce it to this test case:
find . -maxdepth 1 | while read blah
do
echo "$blah"
ffmpeg -loglevel error -i ./test.jpg -f null /dev/null
done
the output from this is
/test.jpg
/test.mp4
/test.sh
if I remove the ffmpeg invocation, the output becomes this (what I expected):
./test.jpg
./test.mp4
./test.sh
this seems to occur only when the ffmpeg decoder is activated, as ffmpeg -version doesn't produce the error. Why would ffmpeg affect an unrelated string in this way?
I'm at my wit's end, any help would be appreciated.
FFmpeg is eating your standard input. Do like this instead:
find | while read
do
ffmpeg -nostdin
done
Creating forks of `ffmpeg` in loop inside a shell script "loses" some iterations
这篇关于在OSX上使用ffmpeg的神秘错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!