当使用相同的ffmpeg命令几次时,其中一些会成功,但其中一些会失败,ffmpeg报告Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
或Invalid data found when processing input
错误。
ffprobe
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/2137b8d42dcf4607a625755994133e69':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.4.101
Duration: 00:01:00.02, start: 0.021333, bitrate: N/A
Chapter #0.0: start 0.000000, end 60.000000
Metadata:
title : 00:00:00.000
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x798 [SAR 1:1 DAR 320:133], 3255 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 192 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574), 0 kb/s
Metadata:
handler_name : SubtitleHandler
/usr/local/bin/ffmpeg -i /tmp/2137b8d42dcf4607a625755994133e69 -f mp4 -b:v 3000k -r 24.0 -map_metadata -1 -vf scale=50:50 -y /tmp/foo.mp4
当我执行10次以上相同的命令时,会发生错误,如3-4次。
答案 0 :(得分:0)
找出原因,解释起来有点复杂,这只是我的问题,而不是ffmpeg。