问题描述
我正在尝试将一组作为单个帧的.jpg文件转换为1个单个mpeg视频.mp4
I'm trying to convert group of ".jpg" files acting as individual frames into 1 single mpeg video ".mp4"
我使用的示例参数: / p>
Example parameters i used:
frame duration = 2 secs
frame rate = 30 fps
encoder = libx264 (mpeg)
input pattern = "*.jpg"
output pattern = video.mp4
基于ffmpeg wiki说明(),我发出这个命令:
Based on ffmpeg wiki instructions at (https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images), I issued this command:
ffmpeg -framerate 1/2 -pattern_type glob -i "*.jpg" -c:v libx264 -r 30 -pix_fmt yuv420p video.mp4
但是我收到这个错误:
[image2 @ 049ab120] Pattern type 'glob' was selected but globbing is not
supported by this libavformat build *.jpg: Function not implemented
这可能意味着我的构建/版本的API模式匹配命令已更改。顺便说一下,我的Windows 32位ffmpeg下载( ffmpeg-20150702-git-03b2b40-win32-static
)。
Which probably means the API pattern matching commands for my build/version have changed. By the way this my windows 32bit ffmpeg download build (ffmpeg-20150702-git-03b2b40-win32-static
).
如何使用ffmpeg使用模式匹配选择一组文件?
How can I choose a group of files using pattern matching using ffmpeg?
推荐答案
-pattern_type glob
需要glob.h
-pattern_type glob
requires glob.h.
glob
是在POSIX标准中定义的,在Windows 。
glob
is defined in the POSIX standard and it's not available on Windows by default.
使用顺序文件命名创建/重命名文件 image ###。jpg
然后使用序列通配符,如 -i image%03d.jpg
作为输入。
Create/rename your files using sequential file naming image###.jpg
then use sequence wildcards like -i image%03d.jpg
as input.
这篇关于ffmpeg错误:选择了模式类型“glob”,但是这种libavformat构建不支持globbing的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!