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

查看:44
本文介绍了使用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天全站免登陆