ffmpeg 将 avi 拆分为具有已知帧速率的帧 [英] ffmpeg split avi into frames with known frame rate

查看:23
本文介绍了ffmpeg 将 avi 拆分为具有已知帧速率的帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将此作为评论发布在此相关主题下.然而,他们似乎没有注意到=(

I posted this as comments under this related thread. However, they seem to have gone unnoticed =(

我用过

ffmpeg -i myfile.avi -f image2 image-%05d.bmp

myfile.avi 拆分为存储为 .bmp 文件的帧.它似乎工作,除了不完全.录制视频时,我以 1000fps 的速率录制,结果视频长度为 2min29sec.如果我的数学是正确的,那么整个视频的总帧数应该为 149,000 帧.然而,当我跑

to split myfile.avi into frames stored as .bmp files. It seemed to work except not quite. When recording my video, I recorded at a rate of 1000fps and the video turned out to be 2min29sec long. If my math is correct, that should amount to a total of 149,000 frames for the entire video. However, when I ran

ffmpeg -i myfile.avi -f image2 image-%05d.bmp

我只获得了 4472 个文件.如何获得原始 149k 帧?

I only obtained 4472 files. How can I get the original 149k frames?

我还尝试通过执行将原始 AVI 的帧速率转换为 1000fps

I also tried to convert the frame rate of my original AVI to 1000fps by doing

ffmpeg -i myfile.avi -r 1000 otherfile.avi

但这似乎并没有解决我的担忧.

but this didn't seem to fix my concern.

推荐答案

ffmpeg -i myfile.avi -r 1000 -f image2 image-%07d.png

我不确定输出 150k bmp 文件是否是个好主意.也许 png 已经足够好了?

I am not sure outputting 150k bmp files will be a good idea. Perhaps png is good enough?

这篇关于ffmpeg 将 avi 拆分为具有已知帧速率的帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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