从其他视频创建延时视频 [英] Create time lapse video from other video

查看:152
本文介绍了从其他视频创建延时视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用avconv(甚至是ffmpeg,因此我可以将其用作参考),如何仅从另一视频中获取锚定/参考帧来创建延时视频?我发现的大多数信息都是有关如何通过组合图像来创建延时视频的,而我想通过从视频中提取帧来实现。假设,如果视频以30 FPS的速度长30秒,我想从这900帧中提取60帧(900/60 =每15秒)来制作2秒的视频。

Using avconv (or even ffmpeg, so I can use as a reference), how can I create a time lapse video by taking only anchor/reference frames from another video? Most information I find is on how to create a time lapse video by combining images, and I'd like to do it by extracting frames from a video. Say, if a video is 30 seconds long at 30 FPS, I'd like to take 60 out of those 900 frames (900/60 = every 15 seconds) to produce a 2 second video.

推荐答案

要拍摄第15帧,请使用

To take every 15th frame, use

ffmpeg -i in.mp4 -vf select='not(mod(n,15))',setpts=N/FRAME_RATE/TB out.mp4

另一种方法是使用帧步过滤器

Another method is to use the framestep filter

ffmpeg -i in.mp4 -vf framestep=15,setpts=N/FRAME_RATE/TB out.mp4

这篇关于从其他视频创建延时视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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