P
priya
Hi,
I want to convert an .mpeg to a .wmv file.
//Creating an Encoder object
WMEncoder Encoder = new WMEncoder();
//Create a Source Collection Group
IWMEncSourceGroupCollection SrcGrpColl =
Encoder.SourceGroupCollection;
//Adding a source to the SrcGrpColl
IWMEncSourceGroup SrcGrp = SrcGrpColl.Add("SG_1");
//Adding video to the Source Group
IWMEncVideoSource2 SrcVid = (IWMEncVideoSource2)
SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcVid.SetInput(source,"","");
//Specifying where to save the video file
IWMEncFile File = Encoder.File;
File.LocalFileName = ("c:\\output.wmv");
//Starting Encoding
Encoder.PrepareToEncode(true);
Encoder.Start();
Console.WriteLine("Press Enter when the file has been encoded");
Console.ReadLine();
}
That is the code that I have partially written and borrowed from the
SDK code samples. I am encoutering an error at Encoder.Start()
Could anyone suggest anything.
Thanks
I want to convert an .mpeg to a .wmv file.
//Creating an Encoder object
WMEncoder Encoder = new WMEncoder();
//Create a Source Collection Group
IWMEncSourceGroupCollection SrcGrpColl =
Encoder.SourceGroupCollection;
//Adding a source to the SrcGrpColl
IWMEncSourceGroup SrcGrp = SrcGrpColl.Add("SG_1");
//Adding video to the Source Group
IWMEncVideoSource2 SrcVid = (IWMEncVideoSource2)
SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcVid.SetInput(source,"","");
//Specifying where to save the video file
IWMEncFile File = Encoder.File;
File.LocalFileName = ("c:\\output.wmv");
//Starting Encoding
Encoder.PrepareToEncode(true);
Encoder.Start();
Console.WriteLine("Press Enter when the file has been encoded");
Console.ReadLine();
}
That is the code that I have partially written and borrowed from the
SDK code samples. I am encoutering an error at Encoder.Start()
Could anyone suggest anything.
Thanks