How to use WME in ASP.NET application
- From: Ganesh.NET <GaneshNET@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 9 May 2006 01:29:02 -0700
Hi!
I want to use Windows Media Encoder for webLive Streaming using Webcam
in ASP.NET application. Plz give Ur valuable suggestion.
Operation System : Window 2000 Professional
.NET Framework 1.1
I used Window Media encoder SDK's Broadcast stream example in ASP.NET
applications. It given
Error Details
---------------
"Exception Details: System.Runtime.InteropServices.COMException: Unspecified
error
Source Error:
Line 60:
Line 61: // Start the encoding process.
Line 62: Encoder.PrepareToEncode(true);
Line 63:
Line 64: Encoder.Start();
".
My Source code
-------------------
WMEncoderApp EncoderApp = new WMEncoderApp();
IWMEncoder Encoder = EncoderApp.Encoder;
// Display the predefined Encoder UI.
EncoderApp.Visible = false;
// Specify the source for the input stream.
IWMEncSourceGroupCollection SrcGrpColl = Encoder.SourceGroupCollection;
IWMEncSourceGroup SrcGrp = SrcGrpColl.Add("SG_1");
IWMEncVideoSource2 SrcVid =
(IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
//SrcVid.SetInput("Default_Video_Device", "Device", "");
SrcVid.SetInput("VideoCAM Trek", "Device", "");
// Specify a profile.
IWMEncProfile Pro;
IWMEncProfileCollection ProColl = Encoder.ProfileCollection;
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;
}
}
// Create a broadcast.
//IWMEncBroadcast BrdCst = Encoder.Broadcast;
//BrdCst.set_PortNumber(WMENC_BROADCAST_PROTOCOL.WMENC_PROTOCOL_HTTP,
2526);
IWMEncFile f = Encoder.File;
f.LocalFileName = Server.MapPath("output.wmv");
// Start the encoding process.
Encoder.PrepareToEncode(true);
Encoder.Start();
Plz Help me.
.
- Follow-Ups:
- Re: How to use WME in ASP.NET application
- From: Neil Smith [MVP Digital Media]
- Re: How to use WME in ASP.NET application
- Prev by Date: Re: limiting player connections message ?
- Next by Date: Re: limiting player connections message ?
- Previous by thread: windows Media Encoder in ASP.NET (WEB live streaming(Webcam) ASP.N
- Next by thread: Re: How to use WME in ASP.NET application
- Index(es):
Relevant Pages
|