and i tried to attach my code but i couldnīt, and there the main form contains 4 picture boxes for 4 cameras and ryt now i can take images and save them, but i want convert them into a video file and there
i have a button labeled as test and when i click on that button there and error comes " vshost32.exe " stopped working.
the block of code of that test button is --> ( i am already using the windows encoder library and headerfile.)
string[] files = System.IO.Directory.GetFiles(@"C:\Users\gaurav\Desktop\New folder\video capture\video capture\bin\Debug\img");
WMEncoder encoder = new WMEncoder();
//profile for each frame
IWMEncProfile2 pro = new WMEncProfile2();
pro.LoadFromFile(
@"C:\Users\gaurav\test.prx");
//build up the collection of frames
IWMEncSourceGroup2 frameSourceGroup;
foreach (string filename in files)
{
frameSourceGroup = (
IWMEncSourceGroup2)encoder.SourceGroupCollection.Add(filename);
frameSourceGroup.set_Profile(pro);
//odd to have to do it this way instead of via property
IWMEncVideoSource2 sourceVideo = (IWMEncVideoSource2)frameSourceGroup.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
sourceVideo.SetInput(filename,
"", "");
}
encoder.File.LocalFileName =
@"C:\Users\gaurav\output.wmv";
encoder.PrepareToEncode(
true);
kindly help me guys...
I need your support asap
Thanks in advance
This post has been edited by tlhIn`toq: 08 January 2013 - 08:38 AM
Reason for edit:: Please use code tags

New Topic/Question
Reply



MultiQuote









|