locked
Creating a progressive video player with SMF 2.5 RRS feed

  • Question

  • Hi everyone,

    I'm new to silverlight development; I'm coming over from flash and so far I've been struggling to learn silverlight.  I've tried working with Visual Studio to create my first silverlight app, a progressive video player, but I wasn't having luck with that at all.  Now I am trying out MS Expressions Blend 4 + SMF 2.5 to create a basic video player, and I"m still having problems.

    Main problem: I can create the pre-made SMFPlayer in Blend4, and I can have it work fine with adaptive streaming videos (...ssm/manifest), but when I try to load a local or progressive media source (/video.wmv), it doesn't load the video.

    I am a bit confused, because I simply change the playlist mediasource to a local WMV or MP4 file, and change the delivery method from adaptive streaming to progressiveDownload ...  and hit run, but no video playback.  really odd IMO.

    I am using the trial version of Expression Blend 4; I've tried WMV and MP4 h264 video files with no luck.

    What am I doing wrong?  I am feel very frustrated by this little problem and have been stuck for a while now.  Thank you for any possible help.

     

    -steve

     

    Thursday, June 2, 2011 12:29 AM

Answers

  • I'm not very familiar with the SMFPlayer itself, but it sounds like this might be an issue with the videos not being accessible to the SL app. SL in general can't access the loca file system. Are the videos in the .xap file or at least in the same directory as the .xap file?
    • Marked as answer by xyster Thursday, June 2, 2011 3:33 AM
    Thursday, June 2, 2011 1:57 AM
    Moderator

All replies

  • I'm not very familiar with the SMFPlayer itself, but it sounds like this might be an issue with the videos not being accessible to the SL app. SL in general can't access the loca file system. Are the videos in the .xap file or at least in the same directory as the .xap file?
    • Marked as answer by xyster Thursday, June 2, 2011 3:33 AM
    Thursday, June 2, 2011 1:57 AM
    Moderator
  • Yay!

    I was having a brain fart and you helped solve the problem.    I put the video file on the net and called it via its http address instead, and it worked.   I should of tried that earlier.

     

    but gah...   I am still a bit confused though.  A guide provided to me by Nvidia regarding one of its SL plugins states it supports local video playback, and Expression Blend automatically transferred the selected local video file to the project's build folder when I ran the project, so it was in the same folder as the XAP file.   There is even a 'select video from local folder' button in Blend 4.  As far as I can tell, SL should support local videos.. but apparently it doesn't?

    I am so confused.  Anyways, that doesn't matter I guess, You helped me get it working.

     

    Infinite thanks.

    -steve 

    Thursday, June 2, 2011 3:32 AM
  • If it is in the build folder it probably should work, but there is sometimes a subtle difference if you run the sl app via the built in web server (address bar will say http://localhost:XXXXX/YourPage.html) vs local file system (c:\path\to\app\YourPage.html). They run in different security zones so that might be part of the issue. 

    You are right though, it should work if it is in the build folder. Maybe the path needs to be relative or something, not sure without seeing specifics.

     

    Glad you got it worked out.

    Thursday, June 2, 2011 1:50 PM
    Moderator
  • you need to refer to a file that uses one of the supported media formats for Silverlight if you want to try Progressive Download

    http://msdn.microsoft.com/en-us/library/cc189080(v=VS.95).aspx

    also the file has to be remote or you should give SMF a stream to a local file, but you have to get that stream either from a trusted app or from an open file dialog invoked by a user action (like a button press) only if you don't have a trusted app

    note, that there's a property DeliveryType at PlaylistItem that you may have to set to DeliveryMethods.ProgressiveDownload (or may even work if you don't set that and leave it unspecified - but check if the project templates Expression Blend uses try to set it to SmoothStreaming instead)


    Microsoft MVP J# 2004-2010, Borland Spirit of Delphi 2001

    Monday, October 1, 2012 5:18 PM