Click here to Skip to main content
Rate this: bad
good
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
Edited 27-Feb-13 4:30am
(no name)497.5K
v2

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

  Print Answers RSS
0 OriginalGriff 6,631
1 Sergey Alexandrovich Kryukov 6,345
2 CPallini 5,230
3 George Jonsson 3,574
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web01 | 2.8.140921.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2014
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