6 Answers, 1 is accepted
One option is you can use the byte data to directly play the video instead of converting to .wmv format. The RadMediaPlayer is basically a wrapper around the Silverlight's MediaElement control. Therefore RadMediaPlayer supports the same media formats as SIlverlight's MediaElement does. You can find a full list of the supported media formats here. In cases when you want to use a byte stream to set the RadMediaPlayer items, you can set the RadMediaPlayer.MediaElement source as shown in the following sample code.
I've already tried your solution but it does not work for me because the original video format, that is converted to byte, was .avi. So I get the following error: "3001 AG_E_INVALID_FILE_FORMAT".
Is there a way to convert the byte to a compatible format?
The following post on Microsoft forums provides good info about the error: http://social.msdn.microsoft.com/Forums/silverlight/en-US/6b1a279e-96e3-43e2-a218-b7f985e9c9de/is-there-any-way-to-get-more-details-of-a-3001-ageinvalidfileformat-error.
As to the converting media to different format, you could take a look at the following article. I would like to note that this is third party code and media formats conversion is outside the scope of our Silverlight suite.
Alternative approach would be to store the video directly in the required format, instead converting it later on, should applicable to your case.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
As we all know, few software supports to convert files to wmv formats. But RedMediaPlayer also supports mp4 formats. So converting your file to mp4 format with some software is your best choice. I recommend Faasoft Video Converter for Windows or Mac. Works like a charm.
Check VideoSolo Free Video Converter.
It helped me successfully converting MP4 to WMV, and it supports converting 300+ formats. Hope this can help you as well.