Hello everyone,
I am using the following code snippet to run on Windows Server 2003 x64 edition. I met with the following error when invoking encoder.start method. I am using Windows Media Encoder 9.
System.Runtime.InteropServices.COMException 0xC00D1B67
My code snippet is below, does anyone have any ideas what is wrong?
thanks in advance,Code:IWMEncSourceGroup SrcGrp; IWMEncSourceGroupCollection SrcGrpColl; SrcGrpColl = encoder.SourceGroupCollection; SrcGrp = (IWMEncSourceGroup)SrcGrpColl.Add("SG_1"); IWMEncVideoSource2 SrcVid; IWMEncSource SrcAud; SrcVid = (IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO); SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO); SrcVid.SetInput("ScreenCap://ScreenCapture1", "", ""); SrcAud.SetInput("Device://Default_Audio_Device", "", ""); // Specify a file object in which to save encoded content. IWMEncFile File = encoder.File; string CurrentFileName = Guid.NewGuid().ToString(); File.LocalFileName = CurrentFileName; CurrentFileName = File.LocalFileName; // Choose a profile from the collection. IWMEncProfileCollection ProColl = encoder.ProfileCollection; IWMEncProfile Pro; for (int i = 0; i < ProColl.Count; i++) { Pro = ProColl.Item(i); if (Pro.Name == "Screen Video/Audio High (CBR)") { SrcGrp.set_Profile(Pro); break; } } encoder.Start();
George
+ Reply to Thread
Results 1 to 15 of 15
Thread
-
Run a google search on just the error code "0xC00D1B67" and you will get a shedload of hits. Something there will probably help
You would also be better off posting this in the programming forum so the coders can see it.
Hi guns1inger, I searched a couple of similar errors, actually error code 0xC00D1B67 means -- No profile is set for the source, but you can see from my posted code snippet there is profile set for the source. I have made some further test that when I am using dual screen, there is such error, but when using single screen, there is no such error. Any ideas what is wrong?
Originally Posted by guns1inger
http://www.tech-archive.net/Archive/.../msg00033.html
suggests you might be pushing the resolution too high. Or perhaps you are trying to capture across two screens.
But for dual screen, how to set resolution? I am confused because I think resolution is for one individual screen, how to set for two screens? Any ideas?
Originally Posted by guns1inger
Depends on the desktop arrangement - are you using dual desktops (i.e. the same image on each) or an extended desktop (the image spreads across both) ? Also, which desktop are you capturing ?
These are all things you will have to learn how to identify and deal with.
First step is probably to confirm if resolution is the issue by manually altering the resolution up and down until you confirm that it is the cause of the problem. If it is, you will then have to code into your program some basic checks to find out what the resolution in use it, and if it exceeds what your program can handle, warn the user and stop execution.
I am using an extended desktop (the image spreads across both). I did not find such an option in Windows Media Encoder to assign which desktop should I capture (actually, I only want to capture one screen). Any ideas how to set this?
About your idea to check max resolution limitation, I think it is a very great idea to make my program safer, but I did not find the max resolution which Windows Media Encoder could support from both Windows Media Encoder document and SDK document. Do you know such limitation information?
Originally Posted by guns1inger
You may have to use trial and error. At least one of those posts suggested problems at 1600 x 1200.
Remember that an extended desktop is twice as wide as a standard desktop (assuming two identical monitors). What you need to do is what apps like camtasia allow - the user defines the capture area with the mouse. That way you can let the user drag out until the maximum allowable area is covered, and keep control.
guns1inger, your solution works! Cool! A further question, is there any way to get the informaiton like, whether we are currently in dual monitor mode, how much is the current resolution of each desktop? I need such information so that I can warn end user when the resolution is too high.
BTW: I still can not find the limitation of max supported resolutions in dual screen mode (I find in both Encoder help and SDK document), appreciated if you could point out where it is.
Originally Posted by guns1inger
Have you read this : http://www.microsoft.com/windows/win...screencap.aspx ?
This : http://www.microsoft.com/windows/win...reenCodec.aspx says there is a maximum screen resolution for capture of 2048 x 2048
Thanks guns1inger, there is a max screen resolution limitation, but not mentioned how to calculate the actual resolution in dual desktop mode, for example, if I have a desktop 1 with resoltion X1 * Y1 and another desktop 2 with resoluton X2 * Y2, what is the final result resolution? I think I need to convert two desktop resolution into one desktop resolution to apply 2048 * 2048 limitation?
Originally Posted by guns1inger
I suspect you cannot capture across two desktops that have differing resolutions because the capture must be a single rectangular area. Therefore you need to detect if the extended desktop is in play, work out if the two desktops are the same resolution, and if that resolution exceeds the limits. For all I know, it may not even be possible to screen capture across an extended desktop area with WME.
You probably need to ask these questions in the Microsoft WME developers forums.
I have tried I can capture on two screens with different resolution, 800*600 and 1024*768. For the "Microsoft WME developers forums" -- which one do you mean/recommend?

Originally Posted by guns1inger
And if you look at the combined width and height totals, neither exceeds 2048.
As to which forum - you will have to have a look and see what seems the most appropriate. You're programming it.
Cool guns1inger!
1.
I have a related question, if you have time, appreciate if you could provde some guru advice.
http://forum.videohelp.com/topic368359.html#1969836
2.
In your quoted documents, I did not find the resolution of dual desktop is the combination of each desktop, say if desktop primary is X1 * Y1 resolution, desktop secondary is X2 * Y2 resolution, it is not mentioned the result resolution should be (X1 + X2) * (Y1 + Y2). How to prove the result resolution is really "combined" by individual desktop resoltion?
Originally Posted by guns1inger
Similar Threads
-
reference Windows Media Encoder library error
By George2 in forum Newbie / General discussionsReplies: 0Last Post: 15th May 2009, 05:44 -
Automatically start windows media encoder
By pikepc in forum Newbie / General discussionsReplies: 1Last Post: 10th Oct 2006, 05:38 -
Hardware encoder for windows media encoder? [URGENT]
By mp3boy in forum CapturingReplies: 0Last Post: 9th Sep 2006, 01:41 -
Windows Media Encoder Error 0x80040212
By babyboo in forum Newbie / General discussionsReplies: 8Last Post: 8th Dec 2004, 14:30 -
Convert mpeg to wmv, Windows Media Encoder error
By BMagician in forum Newbie / General discussionsReplies: 3Last Post: 20th Oct 2003, 21:19
Newest guidesLatest tool updatesNew media commentsRecent DVD HacksVSO Software ConvertXtoDVD lets you convert any video like AVI,MKV to DVD easily. More info or download trial! About   Advertise   Forum   Forum Archive   RSS Feeds   Statistics   Tools   



Quote