I am digging into DirectShow to record video from USB device and from the following code:
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,
How can I increase quality?
The GUID's well-known name is:
WMProfile_V80_288VideoOnly
, which is:Note that this way to set up encoding is somewhat outdated though still okay:
You can alternatively set up encoding profile as MSDN suggests above, or pick a better suitable identifier from the mentioned. The values are available in Windows SDK, or. for instance, here.
See related questions:
ConfigureFilterUsingProfile
as opposed to yourConfigureFilterUsingProfileGuid
)