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

cannot play .mp4

23 Answers 326 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Damian
Top achievements
Rank 1
Damian asked on 05 Nov 2013, 02:26 AM
Based on the demo available on https://demos.telerik.com/aspnet-ajax/media-player/examples/overview/defaultcs.aspx#qsf-demo-source, I have used mediaplayer in my project. It plays all the .mp4 files except two in my list. That is confusing me. I checked the extension of the two files and both are .mp4 files. Both these files are of 1080p with large file size. Does that matter?

23 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 05 Nov 2013, 04:53 AM
Hi Damian,

The RadMediaPlayer is capable of playing full HD (1080p) videos of any file size. Please note that the extension of the video file is not the only factor which determines whether the file can be played in the RadMediaPlayer. The .mp4 video file should be having H.264 as the video codec and AAC as the audio codec, then only it can be played in the RadMediaPlayer. Even if the file is having a .mp4 extension but if the codec are different like XVID or PCM then you cannot play such files. So if these requirements are not met, please convert the video file to the supported format with the prescribed codecs.

Hope this helps,
Shinu.
0
Damian
Top achievements
Rank 1
answered on 05 Nov 2013, 03:45 PM
Thankyou shinu. The video codec was different MPEG-1/2. I converted the video and it worked.
0
Shwetha
Top achievements
Rank 1
answered on 05 Nov 2013, 04:00 PM
Telerik Team:

Can you please suggest video converters to use to get videos playing on radmediaplayer. I'm using trial version and unable to play .mp4 videos. Thank you.

0
Shinu
Top achievements
Rank 1
answered on 06 Nov 2013, 04:24 AM
Hi Shwetha,

Even if you are using the trial version of RadControls, you can play video files using this control. Only thing is that the video file should be in MP4 format with H264 video codec and AAC audio codec or WebM format with VP8 video codec and Vorbis audio codec or Ogg format with Theora video codec and Vorbis audio codec.

You can use any video converting software which can convert video files to .mp4 format with H.264 video codec and AAC audio codec. You can try some of these converters available on the internet which are free to download and use.
Any Video Converter, MyFFVideoConverter.

Hope this helps,
Shinu.
0
Shwetha
Top achievements
Rank 1
answered on 06 Nov 2013, 03:22 PM
Thanks Shinu for responding back so quickly. I'll use the converters to get .mp4 videos and try playing it on media player.
0
Shwetha
Top achievements
Rank 1
answered on 06 Nov 2013, 04:53 PM
I converted .mov videos to .mp4 using suggested video converter. I still have issues playing converted video using media player. Please help.

Below is my code -

<telerik:RadMediaPlayer ID="RadMediaPlayer1" runat="server" HDActive="false" Width="700px"

Height="500px" StartVolume="90"

Source="~/App_Data/sample.mp4">

</telerik:RadMediaPlayer

 

It works when I set url from youtube as source but not otherwise. If you could point me to few working examples that would be very helpful. Thank you very much.

 

<%-- <telerik:RadMediaPlayer ID="RadMediaPlayer1" runat="server" HDActive="false" Width="700px"

Height="500px" StartVolume="90" Source="http://www.youtube.com/watch?v=3FcCUXrR1-0"></telerik:RadMediaPlayer>--%>

 It also works on IE 10 when I used HTML 5 code as shown below -

 <video controls="controls" autoplay="autoplay">
  <source src="C:\sample.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

0
Eyup
Telerik team
answered on 07 Nov 2013, 10:36 AM
Hello Shwetha,

You can use many online converters to assemble your videos:
http://video.online-convert.com/

Can you please verify that you have defined the correct MIME settings?
http://www.telerik.com/help/aspnet-ajax/mediaplayer-getting-started.html

I am attaching a sample web site for reference. Please run the application and let me know if it helps you.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Shinu
Top achievements
Rank 1
answered on 07 Nov 2013, 01:17 PM
Hi Shwetha,

As a security measure, files in the App_Data, App_Code folders are not served by the Web server. This is why if you place your video files in any of those folders it won't be public and you won't be able play it. I suggest you place all the video files in a separate folder and try the following code.

ASPX:
<telerik:RadMediaPlayer ID="RadMediaPlayer1" runat="server" HDActive="false" Width="700px"
    Source="../Videos/RadControls.mp4" Height="500px" StartVolume="90">
</telerik:RadMediaPlayer>

Thanks,
Shinu.
0
Shwetha
Top achievements
Rank 1
answered on 07 Nov 2013, 05:22 PM
Telerik team:
 
Thanks for quick response. I was able to play videos(webM and ogg) using mediaplayer on Firefox and chrome browsers but not IE 10. I'm still having issues playing .mp4 files on those 3 browsers. I also tired mp4 file that you sent with example. It didn't work. I just get black screen with play button in center but video is not loaded. Could this be an issue of browser settings, activex controls? Please let me know. Thank you very much for all your help.

-Shwetha
0
Shinu
Top achievements
Rank 1
answered on 08 Nov 2013, 08:01 AM
Hi Shwetha,

Currently, RadMediaPlayer supports three media formats : MP4, WebM and Ogg. The WebM and Ogg formats are supported in Firefox, Chrome and Opera but unsupported in Internet Explorer and Safari. Regarding the MP4 format, it is well supported in IE, Safari, Chrome, Firefox( minimum version required is Firefox 21 running on Windows 7) but does not work in Opera.

Note: If you are developing on an intranet and you have rendering issues for HTML5 video and other features, you can add <meta http-equiv-"X-UA-Compatible" content="IE=edge"/> to the "<head>" block of a webpage for testing. This forces Windows Internet Explorer to use the latest standards. If you prefer, configure your web development server to send a meta http-equiv-"X-UA-Compatible" header with IE=9 or IE=10 instead. For more info about document compatibility, see Defining Document Compatibility.

Hope this helps,
Shinu.
0
Eyup
Telerik team
answered on 08 Nov 2013, 09:53 AM
Hi Shwetha,

Can you please verify that you are trying the player on IE9+?
Looking forward to your reply.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Shwetha
Top achievements
Rank 1
answered on 08 Nov 2013, 06:52 PM
Telerik Team,

I'm using IE 10 browser for playing videos. Finally, I was able to play .mp4 videos by adding setting to web.config file as told by Shinu. Now, I can play .mp4 videos on FF, chrome and IE 10 . Thank you for all your help in making this work. 

<system.webServer>

<httpProtocol>

<customHeaders>

<clear />

<add name="X-UA-Compatible" value="IE=10" />

</customHeaders>

</httpProtocol>

 </system.webServer>
0
Henry
Top achievements
Rank 1
answered on 12 Nov 2013, 06:20 PM
Hi shinu, admin,

I was trying this control and got stuck with playing HD videos. I set the source to a 720p HD mp4 video and it played fine. But when I press the HD button in the player toolbar, suddenly the video stops playing and the control looks as if there is no video file to play. How to deal with this?

Thanks
Henry
0
Shinu
Top achievements
Rank 1
answered on 13 Nov 2013, 06:59 AM
Hi Henry,

When you press the HD button in the player toolbar the control will look for an HD video source which can be specified in the HDSource property of the RadMediaPlayer. So check whether you have set any URL to HDSource property. If you are already setting an HD video as the Source, then you can hide the HD button as shown here.

Thanks,
Shinu.
0
Henry
Top achievements
Rank 1
answered on 14 Nov 2013, 02:10 AM
Thanks. Got it.
How can I display an image on the media player when the video is loaded and not yet started playing?
0
Shinu
Top achievements
Rank 1
answered on 14 Nov 2013, 05:22 AM
Hi Henry,

Please set the Poster property of the control as shown below.

ASPX:
<telerik:RadMediaPlayer ID="RadMediaPlayer1" runat="server" Width="700px" Height="500px"
    Source="../Videos/SampleVideo.mp4" Poster="../Images/Poster1.jpg">
</telerik:RadMediaPlayer>

Thanks,
Shinu.
0
Shwetha
Top achievements
Rank 1
answered on 26 Mar 2014, 03:22 AM
I was able to play .mp4 videos on IE, FF and Chrome using radmediaplayer in DEV environment that has IIS 7. Unfortunately, I can't get videos to play in  PROD which has IIS 6. I'm having this issue with IE only. I don't get any errors but video is not loaded. It works fine in FF and Chrome. I tried compatibility setting in web.config and doesn't help. Any alternatives? Please suggest. Thank you very much.
0
Eyup
Telerik team
answered on 28 Mar 2014, 12:29 PM
Hi Shwetha,

I'm afraid it is difficult to determine the cause of the issue without replicating it locally. I can suggest that you double check your MIME settings whether the production server has them enabled. You can also do that by testing to play your video files with a standard HTML5 video tag:
http://www.w3schools.com/html/html5_video.asp

You can also check this article:
http://www.telerik.com/help/aspnet-ajax/mediaplayer-playing-video-on-ie.html

Hope this helps.

Regards,
Eyup
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Prajeesh
Top achievements
Rank 1
answered on 28 May 2014, 06:05 AM
Hi all,
     I am using telerik rad mediaplayer for playing audio in one of our medical transcription application. I face some issues in it,
1. It only play MP3 files
2. I want to play each file in button click, but in current scenario, when I play first file, then select second file, then also it just  continue to play the first file itself.
3. Is both video and audio player are using the same skin?
4. have any other player for playing audio files?
  
0
Maria Ilieva
Telerik team
answered on 02 Jun 2014, 12:59 PM
Hi Prajeesh,

Find an online demo below that presents the proper functionality of audio/video files played with MedialPlayer:

http://demos.telerik.com/aspnet-ajax/media-player/examples/functionality/mediatypes/defaultcs.aspx

Test it on your end and verify what the difference in your case is.

Currently the RadMediaPlayer is the only control in our suite that can be used for playing audio files.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ramprit
Top achievements
Rank 2
answered on 24 Jul 2015, 05:09 AM

Hi Shinu,

 

Is there any way to access

files in the App_Data, App_Code folders are not served by the Web server. This is why if you place your video files in any of those folders it won't be public and you won't be able play it. I suggest you place all the video files in a separate folder and try the following code.​

 

0
Ramprit
Top achievements
Rank 2
answered on 24 Jul 2015, 05:30 AM

Hi Shinu 

Is there any way to access video file from app_data folder.

files in the App_Data, App_Code folders are not served by the Web server. This is why if you place your video files in any of those folders it won't be public and you won't be able play it. I suggest you place all the video files in a separate folder and try the following code.​​

0
Eyup
Telerik team
answered on 24 Jul 2015, 12:54 PM
Hello Ramprit,

As explained in the copied text you provided, these destinations are interpreted as special folders by Visual Studio. You will need to place your video files in different folders or directly to the project folder. Alternatively, you can upload them to a live site and use the generated URL as the Source for RadMediaPlayer.

I hope the clarification was helpful.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
MediaPlayer
Asked by
Damian
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Damian
Top achievements
Rank 1
Shwetha
Top achievements
Rank 1
Eyup
Telerik team
Henry
Top achievements
Rank 1
Prajeesh
Top achievements
Rank 1
Maria Ilieva
Telerik team
Ramprit
Top achievements
Rank 2
Share this question
or