gpt4 book ai didi

ffmpeg - 由于未知原因,连接在ffmpeg中不起作用

转载 作者:行者123 更新时间:2023-12-04 23:11:53 30 4
gpt4 key购买 nike

我正在尝试使用 ffmpeg -y -f concat -safe 0 -i /path/to/mylist.txt -c:v libvpx-vp9 -c:a libopus output.webm 在 ffmpeg 中连接 2 个视频, 其中 mylist.txt

file /path/to/file.mp4
file /path/to/file.mkv
输出是
[concat @ 0x7b53638000] Line 1: unknown keyword 'file' /path/to/mylist.txt: Invalid data found when processing input
我也试过使用 "concat:file.mp4|file.mkv"但它只是复制了 file.mp4我的问题是,这里有什么问题? the method i used is verified on ffmpeg's website

最佳答案

有一个隐形字符叫做 Byte Order Mark (BOM)这导致了错误。一些文本编辑器添加了 BOM:特别是 Windows 记事本和来自 Google Docs 的纯文本 (.txt) 输出。
FFmpeg 中的 concat demuxer 当前不支持带有 BOM 的文本文件。一位开发人员认为这是“破烂的微软废话”:#3718: ffmpeg does not correctly read input text file .
解决方案是在将文本文件提供给 ffmpeg 之前使用更好的文本编辑器或删除 BOM。 .一些Linux相关的例子可见How can I remove the BOM from a UTF-8 file?

关于ffmpeg - 由于未知原因,连接在ffmpeg中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65571224/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com