473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PrepareToEncode Encoder SDK (push server) failed???

Hi

I m working on WEBRADIO Software. im using Windows media encoder 9 SDK
on Windows 2003 server using VB.NET.
My current scenario is my soundcard . My application will push my
server the live audio on specific port.

I am using Windows media encoder sdk sample (entire code), currently i
am facing problem in "PrepareToEncode" (Number Error: 0XC00D2F0C),
entire code is given below:
'====================================

Imports WMEncoderLib
Public Class Form1
' Declare variables.
Dim WithEvents Encoder As WMEncoder
Dim SrcGrpColl As IWMEncSourceGroupCollection
Dim SrcGrp As IWMEncSourceGroup2
Dim SrcAud As IWMEncAudioSource
Dim SrcVid As IWMEncVideoSource
Dim ProColl As IWMEncProfileCollection
Dim Pro As IWMEncProfile
Dim PushDist As IWMEncPushDistribution
Dim strServerName As String
Dim strPubPoint As String
Dim strPubTemplate As String
Dim MyNSCFile As String
Dim MyNSCURL As String
Dim MyASXFile As String
Private Function Encoder_OnAcquireCredentials(ByVal strRealm As
String, ByVal strSite As String, ByVal varUser As Object, ByVal
varPassword As Object, ByVal lngFlags As Long) As Boolean
'strRealm = ""
'strSite = "media.site.com.br"
varUser = "admin"
varPassword = "statesecret"
lngFlags = 2
'MsgBox("Credenciais")
End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' Generate the announcement file.
PushDist.GenerateMulticastInfoFile(MyNSCFile)
PushDist.GenerateAnnouncementFile(MyNSCURL, MyASXFile)

' Start encoding.
Encoder.Start()
MsgBox("Click OK to stop broadcasting.")
Encoder.Stop()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' Create a WMEncoder object.
Encoder = New WMEncoder

' Retrieve the source group collection and add sources.
' Use the default devices for the audio and video sources.
SrcGrpColl = Encoder.SourceGroupCollection
SrcGrp = SrcGrpColl.Add("SG_1")
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO)
SrcVid = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO)

SrcAud.SetInput("device://default_audio_device")
SrcVid.SetInput("device://default_video_device")

' Retrieve the profile collection. This example uses the 3rd
profile.
ProColl = Encoder.ProfileCollection
Pro = ProColl.Item(2)
SrcGrp.Profile = Pro

' Set up the push broadcast.
PushDist = Encoder.Broadcast

' Specify the push distribution variables, including the
Windows Media
' server name, publishing point, and announcement files.
' Provide real values for the following placeholders.
strServerName = "media.site.com.br"
strPubPoint = "webradio"
strPubTemplate = "tmp_online"
MyNSCFile = ""
MyNSCURL = ""
MyASXFile = ""

' Remove the publishing point when the broadcast is over.
PushDist.AutoRemovePublishingPoint = True

' Set the push distribution variables.
PushDist.ServerName = strServerName
PushDist.PublishingPoint = strPubPoint
PushDist.Template = strPubTemplate
Encoder.PrepareToEncode(True)
End Sub
End Class
'====================================

Could anybody please help me out.
Any hints/ ideas will be highly appreciated.
Thnx
Crisco

Oct 4 '06 #1
0 2781

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michele | last post by:
Hi all, I have developed a PHP-based website where a "planner" user can make up schedules of activities to be performed, storing them into MySQL tables. Afterwards, other "watcher" users can...
3
by: Paul Home | last post by:
Hi How come I always encountered this error after executing the following command ? C:\Inetpub\wwwroot\ASP>screnc admin.asp eadmin.asp Scripting encoder object ("Scripting.Encoder") failed on...
5
by: Vilmar Brazão de Oliveira | last post by:
HI there, Does anybody know why Microsoft Script Encoder can not encript(encode) all the page including html, js, vbs and asp parts? - In asp case only encoded the asp part. Page.asp - In html...
0
by: rockstar1971 | last post by:
Hello. I’m working with the Windows Media Encoder SDK to create an online jukebox for myself, but I’m having problems getting it to work. Here’s what I want to do: I’ve got a large...
3
by: Matt | last post by:
I'm trying to simply convert a .avi file recorded by our program to a wmv file, of course compressed as possible. I've looked at the examples provided by microsoft @...
14
by: Nick K. | last post by:
I am looking for architecture to push information from a server to a client browser. This information would be in the form of an alert. What I do not want to do is have the browser be on a timer...
1
by: Eric | last post by:
Our .Net installation project includes a custom action that is launched post install. When the msi is run from a desktop, all is fine. We tested an install doing an Active Directory push to...
30
by: mistral | last post by:
Neeed good javascript unescape encoder, to protect javascript code. Some advices? Online tool, or ready javascript only. Any opinions about the Javascript Obfuscator:...
0
by: sunny152 | last post by:
Hello Friends, I'm very interested to broadcast our church worship service live on internet.My web server having streaming feature and i have windows media encoder program.I usually...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.