如何从JPEG文件列表创建视频? [英] How can I create a video from a list of JPEG files?
问题描述
我做过搜索,只有Windows Media Encoder Series 9 ,我不知道DirectX 是否也可以这样做,但是找不到任何方式学习它我甚至试过本教程,但我不能运行应用程序,它给我一个错误(我安装了Windows Media Encoder Series 9 和SDK)。
I did search and all I got is Windows Media Encoder Series 9 and I am not sure if DirectX can also do it, but I can't find any way to learn it. I even tried this tutorial but I can' t run the application, it gives me a bug (I did install Windows Media Encoder Series 9 and the SDK).
我的应用程序现在正在使用定时器在 PictureBox
中运行JPEG文件,但一分钟的大小约为20 MB,这不太好。我需要每天保存一整天!
My application is now running JPEG files in a PictureBox
with a timer, but the size of one minute is about 20 MB and that is not good. I need to save the whole day every day!
我发现这个软件,它使用Windows Media Encoder,一分钟的视频大约是1 MB,这是非常好的,现在我知道可以将桌面记录到一个视频文件,但我该怎么办?我需要一步一步的解释或录像来教导我。
I found this software, it uses Windows Media Encoder and the video of one minute is about 1 MB which is great, now I know it's possible to record the desktop to a video file but how can I do it? I need a step by step explanation or videos to teach me.
推荐答案
该工具 ffmpeg 是完成这项工作的完美选择。他们的文档具有确切过程的示例您正在努力。
The tool ffmpeg is perfect for doing this job. Their documentation has a example of the exact process you are trying to do.
从许多图像创建视频:
For creating a video from many images:
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
语法 foo-%03d.jpeg
指定使用由
组成的十进制数,三位数填充为零表示序列号。它是
与C printf函数支持的相同语法,但只有格式
接受正常整数是合适的。
The syntax foo-%03d.jpeg
specifies to use a decimal number composed of
three digits padded with zeroes to express the sequence number. It is
the same syntax supported by the C printf function, but only formats
accepting a normal integer are suitable.
当导入图像序列时,-i还支持在内部扩展
类似shell的通配符模式(globbing),方法是选择
image2 -pattern_type glob选项。
When importing an image sequence, -i also supports expanding shell-like wildcard patterns (globbing) internally, by selecting the image2-specific -pattern_type glob option.
例如,创建与glob
模式相匹配的文件名的视频 foo - *。jpeg
:
For example, for creating a video from filenames matching the glob
pattern foo-*.jpeg
:
ffmpeg -f image2 -pattern_type glob -i 'foo-*.jpeg' -r 12 -s WxH foo.avi
只需每天运行,它会将您的文件夹全部转换成图像进入.avi文件,您可以在完成后删除图像。
Just run this daily and it will convert your folder full of images in to a .avi file and you can delete the images when you are done.
这篇关于如何从JPEG文件列表创建视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!