Error when encoding with .SendScript
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Error when encoding with .SendScript

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Encoders
Author Message
nwr
Guest





Posted: Tue Sep 07, 2004 7:31 pm    Post subject: Error when encoding with .SendScript Reply with 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");

Back to top
NSN
Guest





Posted: Sun Sep 12, 2004 11:05 am    Post subject: RE: Error when encoding with .SendScript Reply with quote

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");
Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Encoders All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB