FFmpeg mov 转 mp4 转 gif
我正在尝试将 .mov 文件转换为内存中的 mp4,然后使用单个 ffmpeg 命令转换为最终的 GIF 输出:
ffmpeg -t 22 -i "select image and zoom.mov" -f mp4 - | ffmpeg -vf "fps=10,scale=320:-1:flags=lanczos,setpts=0.7*PTS,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "select image and zoom.gif"
但遇到:
muxer does not support non seekable output
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
此线程表明 mp4 不能像这样管道。现在还是这样吗?我是否真的需要使用 bash 的 && 编写中间文件?选项?
I'm trying to convert a .mov file to an in-memory mp4, then to a final GIF output with a single ffmpeg command:
ffmpeg -t 22 -i "select image and zoom.mov" -f mp4 - | ffmpeg -vf "fps=10,scale=320:-1:flags=lanczos,setpts=0.7*PTS,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "select image and zoom.gif"
but am running into:
muxer does not support non seekable output
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
This thread suggests mp4 cannot be piped like this. Is this still the case? Am I left with actually writing an intermediary file using bash's && option?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有什么理由不能这样做吗?
但如果你必须管道,不,你不能使用mp4容器,但你可以使用MKV
Is there a reason you cannot just do this?
But if you must pipe, no, you cannot use mp4 container, but you can use MKV