VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Hello everyone,

    I am using the following code to record screen, when recording, when using mouse to double click some item, for example double click a ppt to open it in PowerPoint, it is not very responsive. I have tried and it is much better when using screen recording function of Windows Media Encoder 9. Any ideas what is wrong?

    My environment: Windows Vista + Windows Media Encoder 9 + VSTS 2008 + C#. I wrote the following code in the initialization code of a Windows Forms application, and I suspect something wrong with my Windows Forms application?

    My code,

    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. One possibility is that your PC is too old/slow and if you are recording a large screen area, high bitrate, and/or high fps it might be too taxing for your system

    If you have task manager open while you are doing this, take a peek at the cpu usage, if it's topped out all the time, that is likely and you are even dropping frames in your capture

    As a test, you can try a smaller area e.g. 320x240, 5fps or something very non-taxing/low quality, and try opening other apps like ppt, just to rule out or determine if this a contributing cause

    If this is the case, you can try to turn off programs and services that you are not using, upgrade your hardware, or you might have to use a more suitable capture format
    Quote Quote  
  3. Member Safesurfer's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Search Comp PM
    Hi George:

    I really think you may be better served with coding questions on the Microsoft forums. Try -

    http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/defaul...&lang=en&cr=US

    or

    http://social.msdn.microsoft.com/Forums/en-US/categories

    There's a Windows Forms forum at the above link, direct link is http://social.msdn.microsoft.com/Forums/en-US/winforms/threads
    "Just another sheep boy, duck call, swan
    song, idiot son of donkey kong - Julian Cope"
    Quote Quote  
  4. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Hi Safesurfer,

    I am interested in your recommended forums. But for your 2nd/3rd link, I did not find a suitable sub-form to discuss Windows Media Encoder related issue? Please correct me if I am wrong.

    Originally Posted by Safesurfer
    Hi George:

    I really think you may be better served with coding questions on the Microsoft forums. Try -

    http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/defaul...&lang=en&cr=US

    or

    http://social.msdn.microsoft.com/Forums/en-US/categories

    There's a Windows Forms forum at the above link, direct link is http://social.msdn.microsoft.com/Forums/en-US/winforms/threads
    Quote Quote  
  5. Member Safesurfer's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Search Comp PM
    Originally Posted by George2
    Hi Safesurfer,

    I am interested in your recommended forums. But for your 2nd/3rd link, I did not find a suitable sub-form to discuss Windows Media Encoder related issue? Please correct me if I am wrong.

    Originally Posted by Safesurfer
    Hi George:

    I really think you may be better served with coding questions on the Microsoft forums. Try -

    http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/defaul...&lang=en&cr=US

    or

    http://social.msdn.microsoft.com/Forums/en-US/categories

    There's a Windows Forms forum at the above link, direct link is http://social.msdn.microsoft.com/Forums/en-US/winforms/threads
    No, no subforum, but it is a gneral forum for Forms questions, which may or may not be relevant to your problem - just thought it might be a good place to start.
    "Just another sheep boy, duck call, swan
    song, idiot son of donkey kong - Julian Cope"
    Quote Quote  
  6. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    Normally when external user actions can't easily interrupt or interact with the process flow it's because a loop is too tight.

    I only write vb so can't comment on your code but in vb placing one or more DoEvents in the right place(s) usually between each frame capture just after writing the frame in the loop can work wonders.
    There's not much to do but then I can't do much anyway.
    Quote Quote  



Similar Threads