[英]How to adjust quality with ConfigureFilterUsingProfile DirectShow uncompressed recording?
I am digging into DirectShow to record video from USB device and from the following code: 我正在研究DirectShow,以记录来自USB设备和以下代码的视频:
hr= m_captureGraphBuilder.SetOutputFileName(MediaSubType.Asf,
"E:\\exa.wmv", out pMux, out fSinkFilter);
//
//configure which video setting is used by graph
//
IConfigAsfWriter2 lConfig = pMux as IConfigAsfWriter2;
Guid asfFilter = new Guid("8C45B4C7-4AEB-4f78-A5EC-88420B9DADEF");
lConfig.ConfigureFilterUsingProfileGuid(asfFilter);
m_captureGraphBuilder.RenderStream(null,null, m_deviceFilter, null, pMux);
m_mediaCtrl = m_graphBuilder as IMediaControl;
m_mediaCtrl.Run();
I am able to record video but it is lowest quality, i am new to directshow and things, 我可以录制视频,但质量最低,我对DirectShow和事物是陌生的,
How can I increase quality? 如何提高质量?
The GUID's well-known name is: WMProfile_V80_288VideoOnly
, which is: GUID的知名名称是: WMProfile_V80_288VideoOnly
,即:
Windows Media Video 8 for Dial-up Modem (No audio, 28.8 Kbps) -- Use this profile when creating video-only content for target audiences with dial-up modems. Windows Media Video 8(用于拨号调制解调器)(无音频,28.8 Kbps)-在使用拨号调制解调器为目标受众创建纯视频内容时,请使用此配置文件。
Note that this way to set up encoding is somewhat outdated though still okay: 请注意,这种设置编码的方法虽然还可以,但有些过时了:
The profiles listed below all use the version 8 Windows Media Audio and Windows Media Video codecs. 下面列出的所有配置文件都使用版本8 Windows Media Audio和Windows Media Video编解码器。 There are no predefined system profiles that use the Windows Media 9 Series codecs. 没有使用Windows Media 9系列编解码器的预定义系统配置文件。
You can alternatively set up encoding profile as MSDN suggests above, or pick a better suitable identifier from the mentioned. 您也可以按照上面MSDN的建议设置编码配置文件,或从上述代码中选择一个更合适的标识符。 The values are available in Windows SDK, or. 这些值在Windows SDK或中可用。 for instance, here . 例如, 这里 。
See related questions: 查看相关问题:
ConfigureFilterUsingProfile
as opposed to your ConfigureFilterUsingProfileGuid
) 尽管更改了分辨率,视频捕获输出仍始终在320x240中显示 (功能ConfigureFilterUsingProfile
(而不是ConfigureFilterUsingProfileGuid
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.