Forum archive - mouse double click is not working quite good during screen recording

http://www.supermediastore.com/



Forum Archive Home -> Programming -> mouse double click is not working quite good during screen recording



mouse double click is not working quite good during screen recording

George2 posted 2009 May 21 21:42
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,

:

    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



poisondeathray posted 2009 May 21 22:01
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



Safesurfer posted 2009 May 22 08:00
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/newsgroup ... &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



George2 posted 2009 May 22 09:11
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. :-)

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/newsgroup ... &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



Safesurfer posted 2009 May 22 09:46
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. :-)

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/newsgroup ... &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.



gll99 posted 2009 May 28 19:07
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.




Login/Register to our forum to be able to post here.








Replay Media Catcher lets you record ANY streaming video and save on your computer! More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics