SMFPlayer not working at all

Oct 25, 2010 at 2:47 PM

Hello, I have a weird and annoying problem:

I'm trying to set up a live streaming application, and I decided to use the SMFPlayer. The problem is the player won't play any file of any type in any conditions. First, I tried using different settings for IIS 7 Live SS and Expression Encoder 4, but then I realized the player won't even play local or remote static files. I tried with local .wmv, remote .wmv, remote .ism, and also with all combinations of DeliveryMethod property. I just can't get to see video in the player. When I debug in Google Chrome, the player doesn't even send requests for the manifest file. In opposition, I put a simple MediaElement in the same page with the same settings, and it worked fine, except for the live streaming, which I didn't managed to get working at all. I also tried starting the project in debug/without debug in both Visual Studio and Blend.

My setup is Windows 7 64bit, and all the tests are done on a single computer.

Thanks in advance.

Oct 25, 2010 at 3:08 PM

Hi;

any error?  Did you try to play one of the samples through the player? This is a Smooth Streaming link to try...  Put it in a playlist like this below and enable the playlist as shown...

http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest

 

                        MyPlayer.Playlist.Add(new Microsoft.SilverlightMediaFramework.Core.Media.PlaylistItem
                        {
                            MediaSource = new Uri(String URL here),
                            DeliveryMethod =  DeliveryMethods.Whateverdeliverymethod you are using....  for this url above it will be Deliverymethods.ProgressiveDownload,
                            Title = String Titile,
                            Description = String Description,
                            LiveDvrRequired = true or false,
                            JumpToLive = true or false,
                            ThumbSource = new Uri("Images/Playlistimage.png", UriKind.RelativeOrAbsolute)  This param is optional
                        };

                    MyPlayer.PlaylistVisibility = Microsoft.SilverlightMediaFramework.Core.FeatureVisibility.Visible;


                    //MyPlayer.GoToPlaylistItem(0);  use this to set the item to be played as opposed to selecting the item from the playlist if yah like

 

Should be then just a matter of hitting the play button or calling the play method...

 

Hope it helps;

Cheers;

Brendon

Oct 25, 2010 at 6:57 PM

Few questions:

1) Do you have IIS Smooth Streaming client installed? (http://www.iis.net/download/SmoothClient)

2) After you have downloaded the SMF binaries, did you unblock them? Right clicking the DLL, going to properties and selecting unblock, and then Apply or OK.

3) Download the smooth streaming template from the Download section and change the URL and see if it works. Currently that download is being taken off, not sure if you already have that from the past version. If you have, you can try with that to see if it works.

Thanks,

 

Oct 25, 2010 at 7:43 PM

Missing reference did this to my player...  I was referencing only what I needed and nothing would play...so I referenced the whole lot of them and voila... the thing started playing.  I did not need the others for what I was doing or so I thought but it seemed to be very unhappy and would not play anything even though I never got any exceptions or errors and it compiled without even so much as a warning...  everything worked fine except play...  I referenced the whole lot of em again and it worked...   sounds like it should not be but it worked for my scenario...  I have an issue posted with a black textbox appearing and I can't get rid of it...  yes when I deploy the XAP file so it is not in the aspx and the older DLL(s) work fine deployed in the xap file but anyhow, I recreated this problem while working on it and checked it again and this seems to be a symptom.  References could be it...  bad as it sounds it might be it...   Good luck anyhow for what it is worth....

 

Oct 26, 2010 at 10:50 AM

Thanks all for your responses.

But my problem gets even weirder. I followed bhaktavatsal's solution, and I installed the IIS Smooth Streaming client (didn't know it was necessary), and I tried playing that BigBuckBunny test file, and it really did. Then, I tried testing for my live streaming. Started IIS, started the endpoint, connected to it from encoder, started encoding, set the source in blend, and... nothing. I went to chrome dev console, and 3 requests for the Manifest file were made, but there was also a warning there (I don't know if it has something to do with it) that said 'Resource interpreted as image but transferred with MIME type text/html.'

I then switched back to the BigBuckBunny test, and again, that annoying black screen. The source was absolutely the same. I restarted my PC, and nothing still. I just can't figure out what's happening.

I also saw that again the Manifest was not requested from the server.

Am I missing something regarding parameters? I used all combinations of them. Example XAML source is:

<smf:SMFPlayer Margin="0" d:LayoutOverrides="Width, Height">
  <smf:SMFPlayer.Playlist>
    <smfMedia:PlaylistItem MediaSource="http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest"/>
  </smf:SMFPlayer.Playlist>
</smf:SMFPlayer>

Also can you tell me more explicit how can I unblock the DLL? I searched everywhere and I can't find that Unblock property.

Thanks.

 

Oct 26, 2010 at 11:53 AM

You select the file

right click

properties...

security tab.. 

unblock button... if it isn't blocked then you will not see the button...

Oct 26, 2010 at 12:04 PM

just a thought... Big Buck bunny is a smooth streaming progressive download... (.ISM)  Live smooth streaming would be from a web cam or something of that sort through encoder (.ISML)... You have to be sure the publishing point url is a .ISML/Manifest...  You also have to set the live driver parameter in the playlist item and the delivery method should still be DeliveryMethods.AdaptiveStreaming. 

Something for yah to check...

Oct 28, 2010 at 9:37 AM

Is it any known issue of SMF or even Silverlight having problems on Chrome or Firefox? Cause I tried to play again the demo in IE and it worked, and the same demo in Chrome and Firefox, and it didn't.

Oct 28, 2010 at 1:13 PM

Never tried chrome but Firefox is fine far as I know....  couple of things to check... sometimes the url paths equate fine in IE but not in FF (in your HTML object tag).  Is the player loaded and not playing or just the space on the page taken and no player...  Check your HTML/ASPX object tag syntax.... have a look at the error console in FF... Tools -> Error Console and see if you see any error there...  Download Firebug, install and make sure FF is finding the XAP file ...   Little bug in bottom right corner of FF...  click that after install and voila... you see firebug just in case you are not familiar... 

I use FF to test pretty much exclusively because of these tools... no problem with FF here...  just be sure your player is loaded all right and then go from there....  it should work fine once any idiosyncrasies are ironed out of it

          <param name="source" value="ClientBin/Debug/myPlayer.xap"/> works on FF and IE as far as I can tell....  notice no ../ or ~/ or  / in the beginning of the path...

 

not much but I hope it helps yah!!!

Cheers;

Brendon

Oct 29, 2010 at 3:39 AM

It works fine on all three browsers for me, no issues. My suggestion to you would be to isolate the problem.

Test two scenarios, one only with IIS (Check through pushencoder.exe) if the feed is received and the publishing point is working fine. Sometimes if you are testing with the bigbuck which has a time limit, by that time the clip gets over, so you won't get anything on the player.

If IIS is working fine, check the manifest? By typing the <Your URL>Streaming File name.isml/manifest. If you can see the manifest that is good.

Which version of Expression encoder are you using? and what settings? I am assuming you are selecting Smooth streaming settings while pushing the feed. Use minimum bitrates you start with, you can remove the higher bitrates, although it is local, it is better to just test with couple of variations.

Hope it helps.

 

Oct 29, 2010 at 11:31 AM

I just can't get it to work for my live setup. I tried everything, every possible method, I tried MediaElement, SmoothStreamingMediaElement, SMFPlayer, none of them played my live stream in any condition. I can't figure if it's a problem with the stream, with my computer, etc. Can you provide me just one single example of a silverlight player that plays a live stream? Or can you provide a test live stream to test it with the player? Or some sample code, anything. Please, it's starting to become an emergency, and I'm about to go with Flash!

Thanks again.

Oct 29, 2010 at 12:19 PM

Is it Cross domain or cross scheme issue....  http://msdn.microsoft.com/en-us/library/bb820909.aspx

Oct 29, 2010 at 5:57 PM

What is the setup, please provide details.

EE4 - What profile?
IIS 7 - Does the publishing point changes to "Started" once you start the push from EE4?

These questions are important because you are trying with the client, but the server isn't behaving well, so please test and confirm that first.

Thanks,

 

Oct 29, 2010 at 6:22 PM

Thinking more about your issue, did you tried the Smooth streaming template HTML first to see if the live stream is working?

 

Oct 30, 2010 at 7:52 PM

Thanks so much. I checked out the URL Access Policy, then I checked out once again the Chrome console, and when the web page requested the stream from the server (which is different from the web server) it returned a Clientaccesspolicy.xml file. So I tried putting the web page on the streaming server and... voilla. it's WORKING!

But I am left with two problems:

1. The delay between the encoder and the web page is over 1 minute.

2. Encoder gives me an error which says "cannot create device. It may be in use by another program" when I try to select either microphone or line in for the audio. I don't have any specific audio drivers installed, just the win7 ones. And also, I am just doing tests here, but for the final app the video setup will be a little more complicated (cameras, even a video control desk). Can Expression Encoder handle it? Cause I read some more articles, and I'm seeing so many problems with it.

Cheers

Oct 30, 2010 at 11:00 PM

EE4 Pro can handle complicated scenarios. It dependts on various environments, for example: IP cameras in setup, dealing with capture cards of specific manufacturer and things like that. For questions on EE4, please post your questions on http://social.expression.microsoft.com/Forums/en-US/encoder/threads since it is likely that you will get faster answer on EE4 issues.

Thanks and happy to know its finally working.

Oct 30, 2010 at 11:31 PM

I understand. It's finally working, but please if you can still help, both the delay and the sound problem are big major issues that cause a lot of trouble for the app. Thanks

Oct 31, 2010 at 4:30 AM

Here is a good example on Latency:

http://social.expression.microsoft.com/Forums/en-US/encoder/thread/304c2e79-1d58-4655-97f1-72d8dd6e8ee1

Again this is something that will always be there in EE and is accepted because it is not built for 0-second latency. There are many more threads on EE forums regarding latency that will help you decide on what you are trying to achieve.

For Audio issue, don't know the answer, my suggestion would be to post it on the EE forum.

Thanks,

Nov 5, 2010 at 4:33 AM

Checkout the information on new release IIS Media 4. See the specific comment on latency on this page.

http://blogs.iis.net/chriskno/archive/2010/11/01/iis-media-services-4-0-released.aspx?CommentPosted=true#commentmessage

Hoping it helps.

Nov 10, 2010 at 8:53 AM

 

Hi,

As a previous poster stated it might be cross domain access.  My problem started when I started changing my IIS applications around on my hosted site, the other 3rd party hosted video files would stream just fine but not the one hosted from my site that I encoded with Expression Encoder 4, even though I could confirm it was there and it was working previously from a different IIS directory on my site that I had deleted.  What I ended up doing was opening up Fiddler and running it and see what was being requested when I clicked on my video in the playlist that was hosted from my site.  I saw it was looking for a clientaccesspolicy.xml and a crossdomain.xml file but was getting a 404 error returned.  After some investigation, I ended up figuring out the solution.  With IIS 7 you need to create a clientaccesspolicy.xml file in the root of web site (i.e C:\...\inetpub\wwwroot) to allow the download to kick off essentially.  I used something along the lines of this:

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">      
        <domain uri="*"/>
      </allow-from>      
      <grant-to>      
        <resource path="/Media" include-subpaths="true"/>
      </grant-to>      
    </policy>
  </cross-domain-access>
</access-policy>

where 'Media' was the name of my IIS application.  As soon as I did this the player streamed my video without even having to refresh the page for the Silverlight application.  You can find a more details here: http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx  

Mar 25, 2011 at 1:53 AM

it could be caused by no DLL was found, check this out,

http://androidyou.blogspot.com/2011/03/why-silverlight-smf-player-never-play.html