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

Convert to .wmv

6 Answers 124 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
JOSE
Top achievements
Rank 1
JOSE asked on 02 Sep 2013, 10:05 AM
We have videos in the database as byte[] and they can be in any format. In order to use RadMediaPlayer, we need to convert them to .wmv or any other compatible format, how can we do that?

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Sep 2013, 08:03 AM
Hi Jose,

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.

C#:
Stream stream = new MemoryStream(buffer);
mediaPlayer.MediaElement.SetSource(stream);

Thanks,
Shinu.
0
JOSE
Top achievements
Rank 1
answered on 04 Sep 2013, 11:10 AM
Hi Shinu,
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?
Thanks
0
Hristo
Telerik team
answered on 05 Sep 2013, 07:30 AM
Hi Jose,

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.

Regards,
Hristo
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
0
Shinu
Top achievements
Rank 2
answered on 05 Sep 2013, 12:43 PM
Hi Jose,

One option is transcoding of media files via server side. Expression Encoder has a complete .NET accessible SDK you can use in C# that includes batch transcoding and it supports transcoding from AVI to WMV.

Thanks,
Shinu.
0
Simon
Top achievements
Rank 1
answered on 24 Mar 2014, 08:49 AM
Hi Jose,

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.
0
ruby
Top achievements
Rank 1
answered on 18 Apr 2018, 03:35 AM

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.

Tags
MediaPlayer
Asked by
JOSE
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
JOSE
Top achievements
Rank 1
Hristo
Telerik team
Simon
Top achievements
Rank 1
ruby
Top achievements
Rank 1
Share this question
or