Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I want to save the video into disk file with the C# VS2010/.Net DirectShowLib 2005/Win7 32bits OS
C#
//Define variable as below:
 ICaptureGraphBuilder2 capGraph
 IBaseFilter fWriter
 IFileSinkFilter pTmpSink
 ....

//I use below function to save Avi/Asf file successfully.
 int hr = capGraph.SetOutputFileName( MediaSubType.Avi, szOutputFileName, out asfWriter, out pTmpSink);
 ...

//But it fail to save other video type such as Mpeg2Video with below error information:
 int hr = capGraph.SetOutputFileName( MediaSubType.Mpeg2Video, szOutputFileName, out asfWriter, out pTmpSink);
 ...

No register class (exception come from HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))
Please help me how can I use the Mpeg2Video to save the file successfully, thanks a lot!

My e_mail: Removed
Posted
Updated 27-Feb-13 4:30am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900