VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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?

    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();
    thanks in advance,
    George
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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
    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.
    Quote Quote  
  4. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    http://www.tech-archive.net/Archive/Media/microsoft.public.windowsmedia.encoder/2006-1.../msg00033.html

    suggests you might be pushing the resolution too high. Or perhaps you are trying to capture across two screens.
    Read my blog here.
    Quote Quote  
  5. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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
    http://www.tech-archive.net/Archive/Media/microsoft.public.windowsmedia.encoder/2006-12/msg00033.html

    suggests you might be pushing the resolution too high. Or perhaps you are trying to capture across two screens.
    Quote Quote  
  6. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Read my blog here.
    Quote Quote  
  7. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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
    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.
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Read my blog here.
    Quote Quote  
  9. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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
    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.
    Quote Quote  
  10. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Have you read this : http://www.microsoft.com/windows/windowsmedia/howto/articles/screencap.aspx ?

    This : http://www.microsoft.com/windows/windowsmedia/howto/articles/ScreenCodec.aspx says there is a maximum screen resolution for capture of 2048 x 2048
    Read my blog here.
    Quote Quote  
  11. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  12. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Read my blog here.
    Quote Quote  
  13. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    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
    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.
    Quote Quote  
  14. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Read my blog here.
    Quote Quote  
  15. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Cool guns1inger!

    1.

    I have a related question, if you have time, appreciate if you could provde some guru advice.

    https://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
    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!