avconv:从图像上的子集制作视频

avconv:从图像上的子集制作视频

问题描述:

我正在尝试使用av​​conv在视频中制作一堆png,这些png的编号类似于 filename_< number> ,因此我通常只使用以下命令:

I am trying to make a bunch of png's into a video using avconv, the png's are numbered like filename_<number> so I usually just use the command:

avconv -r 10 -i filename_%d.png -b:v 1000k test.mp4

我现在想用文件 filename_8 - filename_50 $ c $的子集制作视频c>可以说,所以我已经将这些文件复制到新目录中并尝试了相同的命令,但是现在出现错误:

I now want to make a video from a subset of the files filename_8 - filename_50 lets say, so I've copied these files into a new directory and tried the same command but now I get the error:

filename_%d.png: No such file or directory

我认为这是因为编号没有不是从1开始?

I assume this is because the numbering doesn't start from 1?

如何实现?

avconv -r 10 -start_number 8 -i filename_%d.png -b:v 1000k test.mp4

对于 -start_number avconv 的9.x版本。 / code>选项;它不是版本0.8.x。另外,您可以使用 ffmpeg 的最新版本。或重命名文件以0到4之间的数字开头,因为它将默认检查这些名称。

You will need a recent 9.x version of avconv for the -start_number option; it is not in version 0.8.x. Alternatively you could use a recent version of ffmpeg. Or rename the files to start with a number between 0 and 4, as it will check for those names by default.