Generate a 2-fps mp4 from images using FFMPEG

倖福魔咒の 提交于 2019-12-02 20:46:01

问题


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

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?


回答1:


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

Use

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

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



来源:https://stackoverflow.com/questions/50643085/generate-a-2-fps-mp4-from-images-using-ffmpeg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!