使用FFMPEG从图像生成2 fps mp4 [英] Generate a 2-fps mp4 from images using FFMPEG

查看:369
本文介绍了使用FFMPEG从图像生成2 fps mp4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要根据一系列图像创建视频.视频需要具有较低的帧速率.这是我用来创建视频的命令.

Need to create a video from a series of images. The video needs to have a low frame rate. This is the command I use to create the video.

ffmpeg.exe -r 2 -i images/%3d.jpg -vcodec libx264 -pix_fmt yuvj420p output.mp4

问题是,虽然通过HTML5视频播放视频时效果很好,但是当文件在本地下载并通过Windows 10默认视频播放器甚至VLC播放时,它并不能真正工作(奇怪的是,默认视频播放器效果更好).

The problem is that, while the video works just fine when played through a HTML5 video, it doesn't really work when the file is downloaded locally and played through either the Windows 10 default video player or even VLC (weirdly, the default video player works better).

任何人都可以解释为什么会发生这种情况以及可能如何解决该问题吗?

Can anyone explain why this is happening and possibly how to fix the issue?

推荐答案

某些播放器(例如VLC)不喜欢低帧率的视频.

Some players, like VLC, don't like low framerate videos.

使用

ffmpeg.exe -framerate 2 -i images/%3d.jpg -r 8 -c:v libx264 -pix_fmt yuvj420p output.mp4

每个帧仍将持续0.5秒,但输出速率为8,应在VLC中播放.

Each frame will still last for 0.5 seconds but output rate is 8 which should play in VLC.

这篇关于使用FFMPEG从图像生成2 fps mp4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆