从视频中获取图像 [英] Get Image from Video

查看:110
本文介绍了从视频中获取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我必须在特定时间从视频生成图像,我已经使用了FrameGrabber但是对于WMV来说这很好用,但是对于MP4和WebM,它正在生成Blank Image ..Pls帮助关于这个问题。

解决方案

您好,



这取决于您可能设定的解码器捕获RGB24或RGB32,但大多数解码器提供其他颜色空间 - 主要是YV12,NV12,IYUV,有时是YUY2。有些解码器有能力转换为RGB24或RGB32输出(标准WMV是其中之一)并且你有图像,但有些解码器没有这样的功能。这就是为什么帧抓取器不提供任何图像。

你只需要在抓取器和解码器之间放置适当的色彩空间转换器。



问候,

Maxim。

Hi,
I have to generate image from video at particular time, I have used FrameGrabber But that is working fine for WMV, But for MP4 and WebM it is producing Blank Image..Pls help me on this issue.

解决方案

Hello,

This is depending of the decoder you may set target capture of RGB24 or RGB32, but most of decoders provide other colorspaces - mostly YV12, NV12, IYUV and sometimes YUY2. Some decoders have capabilities to convert to RGB24 or RGB32 output (standard WMV is one of) and you have images, but some decoders have no such feature. Thats why frame grabber does not provide any images.
You just require to place proper colorspace converter between grabber and decoder.

Regards,
Maxim.


这篇关于从视频中获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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