使用ffmpeg提取框架的最快方法? [英] Fastest way to extract frames using ffmpeg?

查看:134
本文介绍了使用ffmpeg提取框架的最快方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用ffmpeg从视频中提取帧。有一种比这更快的方法:

Hi I need to extract frames from videos using ffmpeg.. Is there a faster way to do it than this:

ffmpeg -i file.mpg -r 1/1 $filename%03d.jpg

推荐答案

如果JPEG编码步骤性能过高,您可以随时将帧解压缩为BMP图像:

If the JPEG encoding step is too performance intensive, you could always store the frames uncompressed as BMP images:

ffmpeg -i file.mpg -r 1/1 $filename%03d.bmp

这也具有通过转码为JPEG不会产生更多质量损失的优点。 (PNG也是无损的,但往往需要比JPEG更长的时间进行编码。)

This also has the advantage of not incurring more quality loss through quantization by transcoding to JPEG. (PNG is also lossless but tends to take much longer than JPEG to encode.)

这篇关于使用ffmpeg提取框架的最快方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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