Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: Windows Media Encoder SDK Streams a Blank Screen

HTVi
TV Discussion Newsgroups

Windows Media Encoder SDK Streams a Blank Screen
robbyking[ at ]gmail.com 6/19/2007 7:35:54 PM
Hey there,

I'm using the Windows Media Encoder SDK to run an web application that
streams a user's desktop. When I run the application in debug mode, it
works perfectly; when I run it outside of debug mode (http://localhost
instead of http://localhost:1234/folder/file.aspx) it streams a blank
page.

Has anyone experienced this issue, or have any ideas on how to remedy
it?

Thanks in advance,

Robby

Re: Windows Media Encoder SDK Streams a Blank Screen
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 6/19/2007 10:25:06 PM
On Tue, 19 Jun 2007 12:35:54 -0700, robbyking[ at ]gmail.com wrote:

[Quoted Text]
>Hey there,
>
>I'm using the Windows Media Encoder SDK to run an web application that
>streams a user's desktop. When I run the application in debug mode, it
>works perfectly; when I run it outside of debug mode (http://localhost
>instead of http://localhost:1234/folder/file.aspx) it streams a blank
>page.
>


I don't know what you mean by "debug mode" in that context.

The only difference between your posted examples is the port number
used to access the web server - which has no relation to the media
encoder activeX control (even if you're using one).

Since you haven't posted your page code, it's impossible to answer.

Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Windows Media Encoder SDK Streams a Blank Screen
robbyking[ at ]gmail.com 6/20/2007 1:42:30 PM
[Quoted Text]
> I don't know what you mean by "debug mode" in that context.

To clarify...

I'm using Visual Studio.NET to develop, and when I launch the app in
debug mode in VS, it works fine...when I run it though IIS, I get a
blank (black) stream.

Thanks...

Re: Windows Media Encoder SDK Streams a Blank Screen
robbyking[ at ]gmail.com 6/20/2007 4:27:47 PM
And the code, if that helps:

WMEncoderApp EncoderApp = new WMEncoderApp();
IWMEncoder Encoder = EncoderApp.Encoder;
Encoder.AutoIndex = true;

IWMEncSourceGroupCollection SrcGrpColl =
Encoder.SourceGroupCollection;
IWMEncSourceGroup SrcGrp = SrcGrpColl.Add("SG_1");
IWMEncVideoSource2 SrcVid =
(IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
IWMEncSource SrcAud =
SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);

SrcAud.SetInput("Default_Audio_Device", "Device", "");

SrcVid.SetInput("ScreenCapture1", "ScreenCap", "");
IWMEncProfileCollection ProColl =
Encoder.ProfileCollection;
IWMEncProfile Pro;

ProColl = Encoder.ProfileCollection;
int lLength = ProColl.Count;

for (int i = 0; i <= lLength - 1; i++)
{
Pro = ProColl.Item(i);
if (Pro.Name == "Screen Video/Audio High (CBR)")
{
SrcGrp.set_Profile((IWMEncProfile)Pro);
break;
}
}



// Create a broadcast.
IWMEncBroadcast BrdCst = Encoder.Broadcast;

BrdCst.set_PortNumber(WMENC_BROADCAST_PROTOCOL.WMENC_PROTOCOL_HTTP,
Port);



// Start the encoding process.
Encoder.PrepareToEncode(true);
Encoder.Start();

StartEncodingButton.Visible = false;
StopEncodingButton.Visible = true;

noteMessageLabel.Text = "The encoding stream was
successfully started. You can view the stream at <a href='mms://" +
ComputerName + ":" + Port + "'><u>mms://" + ComputerName + ":" + Port
+ "</u></a>";

Re: Windows Media Encoder SDK Streams a Blank Screen
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 6/20/2007 9:32:10 PM
On Wed, 20 Jun 2007 06:42:30 -0700, robbyking[ at ]gmail.com wrote:

[Quoted Text]
>> I don't know what you mean by "debug mode" in that context.
>
>To clarify...
>
>I'm using Visual Studio.NET to develop, and when I launch the app in
>debug mode in VS, it works fine...when I run it though IIS, I get a
>blank (black) stream.

Sounds like a permissions problem to me. Does the IIS process have
access to the directory containing the profiles ? That would normally
be C:\Program Files\Windows Media Components\Encoder\Profiles

IIS should *not* have access to that part of the filesystem, and
there's probably the root of your problem.

You should probably try instead WMEncProfile2.LoadFromFile or perhaps
LoadFromMemory with an in-memory stream (so you can keep the profile
in a secure area of the web root)


Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Windows Media Encoder SDK Streams a Blank Screen
robbyking[ at ]gmail.com 6/21/2007 3:32:02 PM
Thanks Neil...I think this is the problem, though I'm still
experiencing the issue.

I created a profile and added it to a new folder, C:\Inetpub\wwwroot
\EncodingProfiles\;

I then changed the part of my code that gets the profile to...

IWMEncProfile2 Pro = new WMEncProfile2();
SrcVid.SetInput("ScreenCap://ScreenCapture1",
"ScreenCap", "");
Pro.LoadFromFile([ at ]"C:\Inetpub\wwwroot\EncodingProfiles
\casscade.prx");
SrcGrp.set_Profile((IWMEncProfile)Pro);

Now, again, it's working through VS.NET's debug mode, but not directly
through IIS. To try to pinpoint the issue, I temporarily gave IUSR,
IWAM, and ASPNET full control over the folderthe EncodingProfiles
folder, but didn't have any luck.

I still think this is a permissions, error, though; the encoding
bitrate and resolution do not match the profile's.

Have any ideas as to who needs what additional permissions?

And thanks again, Neil, you've been a huge help.






Re: Windows Media Encoder SDK Streams a Blank Screen
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 6/21/2007 5:52:17 PM
Oh, hang on - screen capture ? Think about the user context...

Now try to do that with another capture source (any random hardware or
a file source). It could well be that the IIS server process has no
idea how to "interact with the desktop", so I'd like to revise my
possible diagnosis ;-)

Cheers - Neil

On Thu, 21 Jun 2007 08:32:02 -0700, robbyking[ at ]gmail.com wrote:

[Quoted Text]
>Thanks Neil...I think this is the problem, though I'm still
>experiencing the issue.
>
>I created a profile and added it to a new folder, C:\Inetpub\wwwroot
>\EncodingProfiles\;
>
>I then changed the part of my code that gets the profile to...
>
> IWMEncProfile2 Pro = new WMEncProfile2();
> SrcVid.SetInput("ScreenCap://ScreenCapture1",
>"ScreenCap", "");
> Pro.LoadFromFile([ at ]"C:\Inetpub\wwwroot\EncodingProfiles
>\casscade.prx");
> SrcGrp.set_Profile((IWMEncProfile)Pro);
>
>Now, again, it's working through VS.NET's debug mode, but not directly
>through IIS. To try to pinpoint the issue, I temporarily gave IUSR,
>IWAM, and ASPNET full control over the folderthe EncodingProfiles
>folder, but didn't have any luck.
>
>I still think this is a permissions, error, though; the encoding
>bitrate and resolution do not match the profile's.
>
>Have any ideas as to who needs what additional permissions?
>
>And thanks again, Neil, you've been a huge help.
>
>
>
>
>
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Windows Media Encoder SDK Streams a Blank Screen
robbyking[ at ]gmail.com 6/26/2007 7:24:55 PM
In case you're interested...

I just moved the profiles into my web root, and now they run fine (t
was a permissions issue). When I have time I'm going to pinpoint
exactly what wasn't able to read the other folder, but I have a
deadline to meet in the meantime. :)

Thanks for pointing me in the right direction!

Robby

Re: Windows Media Encoder SDK Streams a Blank Screen
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 6/26/2007 9:07:41 PM
On Tue, 26 Jun 2007 19:24:55 -0000, robbyking[ at ]gmail.com wrote:

[Quoted Text]
>In case you're interested...
>
>I just moved the profiles into my web root, and now they run fine (t
>was a permissions issue). When I have time I'm going to pinpoint
>exactly what wasn't able to read the other folder, but I have a
>deadline to meet in the meantime. :)
>
>Thanks for pointing me in the right direction!


Right-o.

The more I think about it though, the more it seems being able to run
screen capture under a web server process is a security hole - rather
like being able to open a mic on the server and broadcast the room
audio from the server room would be ;-)

Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Windows Media Encoder SDK Streams a Blank Screen
"Chris P." <msdn[ at ]chrisnet.net> 6/27/2007 3:19:38 AM
On Tue, 26 Jun 2007 21:07:41 GMT, Neil Smith [MVP Digital Media] wrote:

[Quoted Text]
> The more I think about it though, the more it seems being able to run
> screen capture under a web server process is a security hole - rather
> like being able to open a mic on the server and broadcast the room
> audio from the server room would be ;-)

<deafening scream of cooling fans> ;-)

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
: Windows Media Encoder SDK Streams with a delay of 5-6 seconds
Naveen koul 6/27/2007 11:52:02 AM
Sir,

I am developing an application were i need to stream live images to other
end , but i am getting an delay of 5 -6 secs using windows media encoder .I
need to remove this delay how can this be done i could not found any resource
for it on net .
*****************************************************
Image transfer application has two parts

1. server side application
2. client side application

1. server side application:

Download the media encoder 9 series and media encoder SDK 9 series first and
run those controls and add the path into vc++ directories. Now copy the
profile named “myprofile” attached into the c:\program files \ windows media
components\encoder\profiles and add the “encoderempl” class attached you’re
your application and write following code to crate and play encoder.


CEncoderImpl EncoderImpl; // create object into .h

EncoderImpl.CreateEnc();// call into .cpp
EncoderImpl.StartEncoder();

2. client side application:


On the client side application add a media player 4 active x control
and make an object of control class and set the url first and then called
the play function. Find the client side application attached.


Here m_MediaPlayer is member variable created through class wizard


CString str("http://"); // can use mms protocol
str+="192.168.1.111"; // change the system ip or can give the system name
str+=":8080";

m_MediaPlayer.SetUrl(str);
m_MediaPlayer.GetControls().play();

**************************************************
This is the fragment how i amtrying to do it.

I hope you can help me out.

Regards

Naveen

"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Tue, 19 Jun 2007 12:35:54 -0700, robbyking[ at ]gmail.com wrote:
>
> >Hey there,
> >
> >I'm using the Windows Media Encoder SDK to run an web application that
> >streams a user's desktop. When I run the application in debug mode, it
> >works perfectly; when I run it outside of debug mode (http://localhost
> >instead of http://localhost:1234/folder/file.aspx) it streams a blank
> >page.
> >
>
>
> I don't know what you mean by "debug mode" in that context.
>
> The only difference between your posted examples is the port number
> used to access the web server - which has no relation to the media
> encoder activeX control (even if you're using one).
>
> Since you haven't posted your page code, it's impossible to answer.
>
> Cheers - Neil
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>
Re: Windows Media Encoder SDK Streams a Blank Screen
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 6/27/2007 11:12:33 PM
On Tue, 26 Jun 2007 23:19:38 -0400, "Chris P." <msdn[ at ]chrisnet.net>
wrote:

[Quoted Text]
>On Tue, 26 Jun 2007 21:07:41 GMT, Neil Smith [MVP Digital Media] wrote:
>
>> The more I think about it though, the more it seems being able to run
>> screen capture under a web server process is a security hole - rather
>> like being able to open a mic on the server and broadcast the room
>> audio from the server room would be ;-)
>
><deafening scream of cooling fans> ;-)

OK, it's a fair point - security by obscurity LOL

Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen