This is a migrated thread and some comments may be shown as answers.

ISM Smooth Streaming videos on database

3 Answers 76 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Andrea Ferrari
Top achievements
Rank 1
Andrea Ferrari asked on 01 Jun 2010, 07:49 AM
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

3 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 04 Jun 2010, 07:53 AM
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.
0
Manuel Felício
Top achievements
Rank 1
answered on 29 Jun 2010, 11:49 AM
Are there any other options to acomplish video streaming out of the database without ISM ?
0
Miro Miroslavov
Telerik team
answered on 02 Jul 2010, 07:49 AM
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
Tags
MediaPlayer
Asked by
Andrea Ferrari
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Manuel Felício
Top achievements
Rank 1
Share this question
or