nwr
Guest
|
Posted:
Tue Sep 07, 2004 7:31 pm Post subject:
Error when encoding with .SendScript |
|
|
I can encode a simple .jpg and mp3 file into a .wmv but
when I add any .SendScript method I get the following
error:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in Streamer.exe
Additional information: Exception from HRESULT: 0xC00D1B5F.
code clip, which is basically microsoft example apart from
encoding files rather than default device, as follows:
WMEncoder Encoder;
Encoder = new WMEncoder();
IWMEncSourceGroupCollection SrcGrpColl;
IWMEncSourceGroup SrcGrp;
SrcGrpColl = Encoder.SourceGroupCollection;
SrcGrp = SrcGrpColl.Add("SG_1");
IWMEncSource SrcAud;
IWMEncVideoSource SrcVid;
IWMEncSource SrcScript;
SrcVid = (IWMEncVideoSource)SrcGrp.AddSource
(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcScript = (IWMEncSource)
SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_SCRIPT);
SrcVid.SetInput("C:\\inimage.jpg", "", "");
SrcAud.SetInput("C:\\inaudio.mp3", "", "");
SrcScript.SetInput("", "UserScript", "");
IWMEncProfile2 Pro = new WMEncProfile2();
Pro.LoadFromFile(@"C:\test.prx");
SrcGrp.set_Profile((IWMEncProfile)Pro);
IWMEncFile File = Encoder.File;
File.LocalFileName = "C:\\OutFile1.wmv";
Encoder.PrepareToEncode(true);
Encoder.Start();
Encoder.SendScript(0, "TEXT", "This is a test");
|
|
NSN
Guest
|
Posted:
Sun Sep 12, 2004 11:05 am Post subject:
RE: Error when encoding with .SendScript |
|
|
0xC00D1B5F - NS_E_MISMATCHED_MEDIACONTENT The media content defined in the
profile does not match the media content defined in the source group.
Make sure that the profile that you are loading from c:\test.prx has a
script stream in it.
Thx
- Niranjan
"nwr" wrote:
| Quote: | I can encode a simple .jpg and mp3 file into a .wmv but
when I add any .SendScript method I get the following
error:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in Streamer.exe
Additional information: Exception from HRESULT: 0xC00D1B5F.
code clip, which is basically microsoft example apart from
encoding files rather than default device, as follows:
WMEncoder Encoder;
Encoder = new WMEncoder();
IWMEncSourceGroupCollection SrcGrpColl;
IWMEncSourceGroup SrcGrp;
SrcGrpColl = Encoder.SourceGroupCollection;
SrcGrp = SrcGrpColl.Add("SG_1");
IWMEncSource SrcAud;
IWMEncVideoSource SrcVid;
IWMEncSource SrcScript;
SrcVid = (IWMEncVideoSource)SrcGrp.AddSource
(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcScript = (IWMEncSource)
SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_SCRIPT);
SrcVid.SetInput("C:\\inimage.jpg", "", "");
SrcAud.SetInput("C:\\inaudio.mp3", "", "");
SrcScript.SetInput("", "UserScript", "");
IWMEncProfile2 Pro = new WMEncProfile2();
Pro.LoadFromFile(@"C:\test.prx");
SrcGrp.set_Profile((IWMEncProfile)Pro);
IWMEncFile File = Encoder.File;
File.LocalFileName = "C:\\OutFile1.wmv";
Encoder.PrepareToEncode(true);
Encoder.Start();
Encoder.SendScript(0, "TEXT", "This is a test");
|
|
|