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,
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
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
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 -
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" -
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 -
Originally Posted by George2"Just another sheep boy, duck call, swan
song, idiot son of donkey kong - Julian Cope" -
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.
Similar Threads
-
My mouse stops working randomly
By sohaibrazzaq in forum ComputerReplies: 2Last Post: 17th Mar 2012, 17:30 -
Right click (mouse) not working?
By jh1966 in forum ComputerReplies: 8Last Post: 3rd Feb 2010, 01:21 -
mouse double click is not responsive during recording
By George2 in forum Newbie / General discussionsReplies: 0Last Post: 2nd Jul 2009, 00:56 -
No Mouse Double Click Button in Windows 7 ?
By wulf109 in forum ComputerReplies: 2Last Post: 22nd May 2009, 12:59 -
Rebuilding VLC under Windows. Have to get rid of fullscreen on double-click
By lagu2653 in forum ProgrammingReplies: 3Last Post: 20th May 2008, 14:12