简体   繁体   English

Windows Media Foundation使用原始图像对视频进行编码

[英]Windows media foundation use raw image to encode video

I'm working on a project that requires me to record webcam, microphone, and the screen. 我正在做一个需要记录网络摄像头,麦克风和屏幕的项目。 I have webcam recording, audio is a work in progress , and I stumbled across CMonitor wrapper (which I did some minor modifications to) to grab RGB images of the desktop on a specified monitor (if there are multiple monitors). 我正在录制网络摄像头, 音频工作 仍在 进行中 ,我偶然发现了CMonitor包装器 (我做了一些小的修改),以便在指定的显示器(如果有多个显示器)上捕获桌面的RGB图像。

How do I go about pushing my raw RGB frames into windows media foundation to encode into a video file? 如何将原始RGB帧推入Windows Media Foundation中以编码为视频文件? My current video encoding is using a slightly modified version of this msdn sample , if that's easier to modify than it is to write a new class handler. 我当前的视频编码使用的是此msdn示例的稍作修改的版本,如果修改起来比编写新的类处理程序容易的话。

Or, perhaps there is some sort of media foundation route to recording the screen that I don't know of (which is possible, I'm not that great of a win32 programmer)? 或者,也许有某种媒体基础的途径来记录我不知道的屏幕(这是可能的,我不是Win32程序员的佼佼者)?

在Windows SDK示例中找到了PushSource。

Check Desktop Duplication API for capture desktop. 检查用于捕获桌面的桌面复制API Media Foundation provides two solution for encoding, MF Sink Writer for simple encoding, Media Session for a more flexible control of the media pipeline. Media Foundation提供了两种编码解决方案,MF Sink Writer提供了简单编码,Media Session提供了更灵活的媒体管道控制。 Read this overview page first. 首先阅读此概述页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM