python - FFmpeg concat demuxer 不工作 : No error, 并且没有输出

标签 python video ffmpeg

问题:使用 ffmpeg concat demuxer 连接的 3 个相同格式的文件(全部一起批量导出,具有相同的设置)。命令运行没有错误(也没有控制台打印输出),但也没有输出文件。 Mac OS 10.15.6,ffmpeg 版本 4.3.1
连接文本文件“test.txt”如下:

file 'test_clip1.mp4'
file 'test_clip2.mp4'
file 'test_clip3.mp4'
这些文件中的每一个 ffprobe 读数都是相同的。没有音频流。
test_clip1.mp4:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 911 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn, 47.96 tbc (default)
test_clip2.mp4
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 628 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn, 47.96 tbc (default)
test_clip3.mp4
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 615 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn, 47.96 tbc (default)
FFmpeg 命令:
ffmpeg_cmd = ["ffmpeg",
              "-f",
              "concat",
              "-safe", "0",
              "-i", "test.txt",
              "test_concatenated.mp4"]

最佳答案

面相错误。我忘了用 subprocess.call 在我的脚本中实际调用 ffmpeg_cmd。 FF 命令在直接从控制台调用时也能正常工作。谢谢@Gyan 的提示。

关于python - FFmpeg concat demuxer 不工作 : No error, 并且没有输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63563354/

相关文章:

python:使用元组的多个变量

python - 我如何从 django 模型中提取元数据

python - 如何在python2中获得反向枚举?

jquery - 容器 onclick 在视频元素和文本之间切换

python - 使用python将webm转换为mp3?

ffmpeg - 从最后开始用 x 时间切割多个视频(ffmpeg?)

python - 在 python 中按产品对元组数组进行排序

audio - ffmpeg 复杂过滤 : how to get around

android - 将视频从 Android/IOS 上传到 Node 服务器时出现服务器超时错误

audio - 如何更改我的 FFMPEG 命令以使我的 HTTP Live Streams 更高效?