Click here to Skip to main content
12,896,108 members (50,394 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
I want to save the video into disk file with the C# VS2010/.Net DirectShowLib 2005/Win7 32bits OS
//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 27-Feb-13 4:10am
Updated 27-Feb-13 4:30am

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100