Hello everyone,
I am using the following code to leverage Windows Media Encoder to record screen. I am using Windows Vista, screen resolution 1024 × 768, 32-bit. My issue is, the video could be recorded successfully, but when I playback the recorded video, the quality of video is not very good -- e.g. characters are very obscure. I am wondering what are the parameters I should try to tune to get better quality of recorder video?
My code,
thanks in advance,Code:static WMEncoder encoder = new WMEncoder(); IWMEncSourceGroup SrcGrp; IWMEncSourceGroupCollection SrcGrpColl; SrcGrpColl = encoder.SourceGroupCollection; SrcGrp = (IWMEncSourceGroup)SrcGrpColl.Add("SG_1"); IWMEncVideoSource2 SrcVid; SrcVid = (IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO); SrcVid.SetInput("ScreenCap://ScreenCapture1", "", ""); IWMEncFile File = encoder.File; File.LocalFileName = "C:\\OutputFile.avi"; // 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 == "Windows Media Video 8 for Local Area Network (384 Kbps)") { SrcGrp.set_Profile(Pro); break; } } encoder.Start();
George
+ Reply to Thread
Results 1 to 7 of 7
-
-
Is there a profile of 1200-1500kps from Wnidows Media Encoder? I enumerate all but not found. Any ideas? Am I wrong?
Originally Posted by guns1inger -
The profiles and Windows Media Profile Editor comes with WME9, there is a
"Windows Media Video 9 for Local Area Network (768 Kbps)" profile that ships with it but it's easy to customize your own profiles (.prx file), by using the editor (dimensions, bitrate etc...). It's also possible that you didn't setup the screen dimensions properly (the profile defaults to 320x240). It also looks like you are using an older version (your profile references WME8, not WME9) you might consider upgrading
I don't know how to implement this through code, only through the regular interface, but it looks like your code references the actual profile name so this should work in theory if you reference the modified profile
[quote]
(Pro.Name == "Windows Media Video 8 for Local Area Network (384 Kbps)")
[quote]
I think I suggested this to you in another thread about streaming for tutorials, but you will get much better quality results using h.264 and flash. You could probably use 1/2 the bitrate that you would use for wmv, and the quality would still be better. Bandwidth costs money, and this is why most sites have adopted the h.264/aac format. And even MS has "caved in" and announced h264 support to Silverlight recently -
Hi George:
Couple of posts from the first page of comments from the http://www.codeproject.com/KB/audio-video/CaptureScreenAsVideo.aspx?display=PrintAll&f...=1160633#xx0xx site may be of use.
how to improve quality? member ping_jacob 8:10 26 Jan '09
i tested this application but so blur
any text can't read
how to improve?, config framrate?
please give some hint or tip to me
thanks a lot
Answer Re: how to improve quality? member Armoghan Asif 0:43 28 Jan '09
Change profile from
Pro.Name = "Windows Media Video 8 for Local Area Network (384 Kbps)"
to
Pro.Name = Screen Video/Audio High (CBR)
How do WMencoder Works member NiyaHere 23:13 19 Aug '08
Hi,
Have a small query...Pls tell me whether WMencoder saves the screen shots anywhere in the local machine? or is it directly creating the .wav file ?
If it is creating temporary images/ screen shots , pls tell me where it is getting saved?
And whether I can set the encoder to take a screen shot in every 2 seconds or so..
Thanks in Advance
Niya
Answer Re: How do WMencoder Works member Armoghan Asif 23:51 19 Aug '08
WMEncoder saves stream to the file directly, no temporary place saving.
As it is saving video accoding to the profile, so you can set frames per second etc
Create a new profile by running following exe
C:\Program Files\Windows Media Components\Encoder\WMProEdt.exe
and set its FrameRate, Video Bit rate etc
General Re: How do WMencoder Works [modified] member NiyaHere 20:23 20 Aug '08
Hi,
Thanks for ur reply... Smile
Could u pls tell me what will be the default frame rate for this? n How to set the same...
n still m confused about setting the time interval, like i wanna capture screen shot every 2 seconds. how can i do that by code?
Thanks
Niya
modified on Thursday, August 21, 2008 5:57 AM
General Re: How do WMencoder Works member Armoghan Asif 19:42 24 Aug '08
Hi
you just have to change the following line
Pro.Name = "Windows Media Video 8 for Local Area Network (384 Kbps)"
with the new profile you make using the method present in my previous comment.
Once you run the WMProEdt.exe and import pre existing profiles, you will get an idea how to set the framerate. You can make frame rate = 0.5 per second, should capture screen after two seconds.
Hope this helps."Just another sheep boy, duck call, swan
song, idiot son of donkey kong - Julian Cope" -
Thanks Safesurfer,
Your solution works -- to set the profile as screen recording high. There is a new issue which is related to Windows Media Encoder installation, it is appreciated if you could take a look and help to show your great ideas again!
The new question is,
https://forum.videohelp.com/topic367881.html#1966058
Originally Posted by Safesurfer -
Thanks poisondeathray,
Your suggestion works -- I solve my problem by setting the profile as screen recording high. There is a new issue which is related to Windows Media Encoder installation, it is appreciated if you could take a look and help to show your great ideas again!
The new question is,
https://forum.videohelp.com/topic367881.html#1966058
[quote="poisondeathray"]The profiles and Windows Media Profile Editor comes with WME9, there is a
"Windows Media Video 9 for Local Area Network (768 Kbps)" profile that ships with it but it's easy to customize your own profiles (.prx file), by using the editor (dimensions, bitrate etc...). It's also possible that you didn't setup the screen dimensions properly (the profile defaults to 320x240). It also looks like you are using an older version (your profile references WME8, not WME9) you might consider upgrading
I don't know how to implement this through code, only through the regular interface, but it looks like your code references the actual profile name so this should work in theory if you reference the modified profile
[quote]
(Pro.Name == "Windows Media Video 8 for Local Area Network (384 Kbps)")
I think I suggested this to you in another thread about streaming for tutorials, but you will get much better quality results using h.264 and flash. You could probably use 1/2 the bitrate that you would use for wmv, and the quality would still be better. Bandwidth costs money, and this is why most sites have adopted the h.264/aac format. And even MS has "caved in" and announced h264 support to Silverlight recently
Similar Threads
-
How would you improve the quality of this video?
By choobies in forum Newbie / General discussionsReplies: 0Last Post: 28th Nov 2011, 12:24 -
Improve video quality [HELP]
By v1rto in forum Newbie / General discussionsReplies: 8Last Post: 13th Jul 2011, 08:46 -
How to improve the quality of the video
By kemo1000 in forum Video Streaming DownloadingReplies: 2Last Post: 24th Apr 2011, 15:36 -
how to improve video quality?
By George2 in forum ProgrammingReplies: 1Last Post: 19th May 2009, 02:07 -
Low quality video on high resolution screen, improve video quality?
By Nitrius in forum Software PlayingReplies: 4Last Post: 29th Dec 2008, 13:38