ISM Smooth Streaming videos on database

4 posts, 0 answers
  1. Andrea Ferrari
    Andrea Ferrari avatar
    9 posts
    Member since:
    Apr 2010

    Posted 01 Jun 2010 Link to this post

    Hi.
    I'm developing an application in Silverlight 4 with a very large database connected with Ria Services.
    My customer asked me for putting all the images and videos on the main database.
    No problem for images but now I don't know how to play and bind MediaPlayer with Video stored as byte[] in a table and use the ISM Smooth Streaming.
    I think also I need a ValueConverter like the ones I've written for images shown below
    public class ImageConverter : IValueConverter  
      {  
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)  
        {  
          BitmapImage bi = new BitmapImage();  
     
          if (value != null)  
            bi.SetSource(new MemoryStream((Byte[])value));  
     
          return bi;  
        }  
     
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)  
        {  
          throw new NotImplementedException();//image is readonly(view only)    
        }  
      } 

    What could be the converter for a wmv or mp4 video?
    Plaese, can you help me?

    Thanks a lot and regards
    Andrea Ferrari
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 04 Jun 2010 Link to this post

    Hi Andrea Ferrari,

    In order to use Smooth Streaming, you'll need to encode the videos for that. Smooth Streaming actually means that you have one video, but saved in a lot different sizes and having one manifest file that describes the different sizes and their addresses . And when the smooth streaming mechanism detects, that you have better/weaker bandwidth (or CPU capabilities), it'll switch to the other video file.
    Having this in mind i don't think is possible to dynamically create for example 10 video files out of the bytes from db, and create the manifest as well. (encode it dynamically).
    And also it's not good idea to keep the videos in the db. It's better to encode them as you want to, store them on the server, and keep in the db only the addresses/information for them.
    You can read more about smooth streaming here.

    Greetings,
    Miro Miroslavov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Manuel Felício
    Manuel Felício avatar
    64 posts
    Member since:
    Oct 2009

    Posted 29 Jun 2010 Link to this post

    Are there any other options to acomplish video streaming out of the database without ISM ?
  5. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 02 Jul 2010 Link to this post

    Hello Manuel Felício,

    You can get the video out of the database and write it to the output stream of a ASP.Net web page, but this is not real streaming and it will not work perfectly. This way will disable some nice features like position scrubbing, fast forward...
    For best user experience you should use real media services.

    Best wishes,
    Miro Miroslavov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top