FFMPEG不会从视频中提取所有帧 [英] FFMPEG not extracting all the frames from a video
本文介绍了FFMPEG不会从视频中提取所有帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从视频中提取所有帧,以获取张量流项目的一些训练数据.但是,每当我运行
I am trying to extract all the frames from a video in order to get some training data for a tensor flow project. However whenever I run
ffmpeg -i one.mp4 -r 1/1 "$filename%03d.jpeg"
我只得到15张照片.我的手机以30fps的速度拍摄,并且视频的时长为13秒,所以我不应该得到大约490张图片吗?
I only get 15 pictures. My phone films in 30fps, and the video was 13 seconds long, so shouldn't I get roughly 490 pictures?
我的理解是否存在错误,或者我使用的是错误的功能?
Is there an error in my understanding or am I using the wrong function?
推荐答案
您已添加了1
的输出帧速率,因此FFmpeg将从输入的每一秒中选择一帧.您希望所有帧都没有掉落或重复,所以使用
You've added an output frame rate of 1
, so FFmpeg will pick one frame out of every second of the input. You want all frames with no drops or duplicates, so use
ffmpeg -i one.mp4 -vsync 0 "$filename%03d.jpeg"
这篇关于FFMPEG不会从视频中提取所有帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文