FFmpeg 通过管道输入连接 mov 文件在 4.2.3 以上版本上失败

FFmpeg 通过管道输入连接 mov 文件在 4.2.3 以上版本上失败

我一直在使用 ffmpeg 4.2.3 连接来自 DSLR 相机的 h264 mov 文件,方法如下:

ls input1.MOV input2.MOV | perl -ne 'print "file $_"' | ffmpeg -f concat -protocol_whitelist file,pipe -safe 0 -i - -c copy output.MOV

更新到 ffmpeg 4.4 版本后,运行相同的命令返回以下错误:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd283004400] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd283004400] moov atom not found
[concat @ 0x7fd283803000] Impossible to open 'pipe:input1.MOV'
pipe:: Invalid data found when processing input

无论使用哪个版本,在 concat.txt 中指定 mov 文件并运行以下命令都可以正常工作:

ffmpeg -f concat -safe 0 -i concat.txt -c copy output.MOV

我已回滚到 ffmpeg 4.2.3 以继续使用管道输入。版本之间发生了哪些变化导致管道输入失败?有没有更好的方法来编写命令以与当前版本配合使用?

相关内容