gpt4 book ai didi

FFmpeg 源文件通配符

转载 作者:行者123 更新时间:2023-12-04 22:48:19 27 4
gpt4 key购买 nike

我正在使用 FFmpeg 将一系列图像文件加入到电影文件中。

文件开始于 XYZ00000.PNG , XYZ00001.PNG等等。我将它们称为 XYZ%05d.PNG在 FFmpeg 命令行中。

这很好用。

但是,如果我删除第一个(例如)30 帧,那么我的帧图像从 XYZ00031.PNG 开始以后 FFmpeg 无法构建并出现错误;

[image2 @ 00000000043f2b40] Could find no file with path 'XYZ%05d.PNG' and index in the range 0-4
XYZ%05d.PNG: No such file or directory

是否有备用通配符可以让 FFmpeg 从最低编号的帧开始?

如果我重命名 XYZ00031.PNGXYZ00000.PNG构建工作,但只添加单个第一帧。它忽略其他帧。

最佳答案

使用-start_number

ffmpeg -start_number 30 -framerate 24 -i XYZ%05d.PNG output.mp4

来自 documentation :

start_number
Set the index of the file matched by the image file pattern to start to read from. Default value is 0.



或者 glob 模式
ffmpeg -pattern_type glob -i -framerate 10  "*.png" out.mkv

此方法可能不适用于 Windows。

关于FFmpeg 源文件通配符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49544985/

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