问题描述
您好,我正在使用媒体基础读取完整的1080P未压缩视频.该视频约为2G,具有500帧(相当大).我基本上是在用 IMFSourceReader可以逐帧读取.问题在于,单独进行ReadSample调用会花费大量时间(每帧100毫秒),我不确定为什么.我还尝试了1G和300帧的720P视频, 读取每个帧大约需要50毫秒.如何加快此读取过程.我还尝试了不同的流索引(MF_SOURCE_READER_ANY_STREAM,M F_SOURCE_READER_FIRST_VIDEO_STREAM).它没有任何改善.
Hello, I am using media foundation to read full 1080P uncompressed videos. The video is around 2G with 500 frames ( pretty big ). I am basically usingIMFSourceReader to read frame by frame. The problem is that ReadSample alone call takes tremendous amount of time (100ms for each frame), I am not sure why. I also tried 720P video which is 1G and 300 frames, ReadSample takes around 50ms to read each frame. How to speed up this reading process. I also tried different stream indexes (MF_SOURCE_READER_ANY_STREAM, MF_SOURCE_READER_FIRST_VIDEO_STREAM). It doesn't improve anything.
推荐答案
如果您有1个300帧的演出,那么它大约每帧3mb,从光盘读取50ms似乎没那么多
if you have 1 gig for 300 frames, its about 3mb per frame where 50ms to read from disc does not seem that much
这篇关于使用Media Foundation读取1080P高清视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!