Solved

mp4 video play in HTML5

Posted on 2011-03-23
12
2,370 Views
Last Modified: 2012-08-13
Dear Experts,

I am trying to  a simple example from w3school for video play with video tag in HTML at
the site of http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_video_all
There is no any issue at all in Firefox but I need to play it in IE7 so  I just follow the code from the solution
provided at  http://allaboutbasic.com/2010/12/30/internet-explorer-7-8-ie-7-8-html-5-video-tag-support-play-your-video-in-a-tricky-way/, So and anyway  finally I can play it in Firefox and IE7 .

The question when I try to switch the example mp4 file to my music video mp4 file at D: drive . The browers will run it  butwhen I click to play button in IE7/Firefox, it will ask me to save or play it from other application media player such as mircosoft window media player  from Download Dialog Window. Why it will be that ?
Suppose HTML video tag doesn't need any mp4 player such as Flash or Windows Media PLayer to play video , Is it RIght ? If not, why the example in W3school can be working.

How the html video tag can do mp4 converter without other video codec software ?

Please advise and check my following , why it doesn't play ?

Duncan



HTML for mp4 file from D: driver is not playing in Firfox and IE7
==================================================================
<!DOCTYPE HTML>

<html>

<head>

<title> HTML5 Video</title>

<script type="text/javascript" src="http://html5.kaltura.org/js"></script>

</head>

<body>
<video  width="360" height="240"  poster="http://allaboutbasic.files.wordpress.com/2010/12/html5-video-tag-on-ie-8.png" controls="controls">



<source src="file:///D:/wkw/summary/video/29161187_mp4_h264_aac_hd.mp4" type="video/mp4" />
  
Please Wait... or Your browser does not support HTML5 video tag.
</video>



</body> 

</html>


HTML for video file Example from W3school and  it works fine  in IE7 and Firefox
================================================================
<!DOCTYPE HTML>

<html>

<head>

<title> HTML5 Video</title>

<script type="text/javascript" src="http://html5.kaltura.org/js"></script>

</head>

<body>
<video  width="360" height="240"  poster="http://allaboutbasic.files.wordpress.com/2010/12/html5-video-tag-on-ie-8.png" controls="controls">


 <source src="http://www.w3schools.com/html5/movie.ogg" type="video/ogg" />
  <source files="D:\\wkw\summary\video\29161187_mp4_h264_aac_hd.mp4" type="video/mp4" />
  <source src="http://www.w3schools.com/html5/movie.webm" type="video/webm" />
Please Wait... or Your browser does not support HTML5 video tag.
</video>



</body> 

</html>

Open in new window

0
Comment
Question by:duncanb7
  • 6
  • 6
12 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35204527
Without investigating further I think your code wants a mime type which your server might send but your harddisc does not. Install a server and try localhost instead of the file system
0
 
LVL 13

Author Comment

by:duncanb7
ID: 35215472
I get it run after I install quicktime software.
I have question if it is  HTML5 video tag, why I still need quicktime or adobe flash player to activate HTMl5 code works ?
Is it correct HTML5 video tag doesn't any other video codec player to help ?
0
 
LVL 13

Author Comment

by:duncanb7
ID: 35215480
I get it run after I install quicktime software.
I have question if it is  HTML5 video tag, why I still need quicktime or adobe flash player to activate HTMl5 code works ?
Is it correct HTML5 video tag doesn't "Need" any other video codec player software  to help
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35216705
No. Only if it is a built-in codec like ogg
0
 
LVL 13

Author Comment

by:duncanb7
ID: 35221544
In other words, all mpe4 in all browser must need quicktime or adobe flash or other vdieo decoder software
to be played even with HTMl5. Is it correct ?

How can convert mpeg for ogg for those who never use quicktime or flash users?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35221564
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 13

Author Comment

by:duncanb7
ID: 35221960
In other words, all mpe4 in all browser must need quicktime or adobe flash or other vdieo decoder software
to be played even with HTMl5. Is it correct ?

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35221976
I believe so. I can investigate
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 35222027
0
 
LVL 13

Author Comment

by:duncanb7
ID: 35306040
So for my understanding from this site at http://camendesign.com/code/video_for_everybody/test.html

HTML video tag will call its internal javascript script to play the video but need some specified video format for specified web browsers.
IE9 (vista/7) can play html5 video but only with mp4 format.
Firefox 4ß  can play html5 video but onyl with WEBM/OGG format

The html video tag will call some script to do video codec internally with correct video format and browser
and doesn't any flash and quciktime video player or codec to involve

Is the concept correct to HTML5 video tag from what I said ?

Please advise

Duncan  
Playback Used Notes 
IE9 (Vista/7) HTML5-MP4 Even with the WebM plugin installed, IE9 will still default to the MP4 because it has to be listed first in the source list due to an iPad bug 
IE8 (XP/Vista/7) Flash  
IE7 (XP/Vista) Flash  
IE6 (XP) Flash  
Gecko  
Firefox 4ß HTML5-WEBM/OGG  
Firefox 3.6 HTML5-OGG  
Firefox 3.5 HTML5-OGG Does not support poster image,
encode your poster image into the first frame of the video 
Firefox 3 Flash  
Firefox 2 Flash Prompts to install Flash if it is missing (the only browser to do so) 
Camino 2.1a HTML5-OGG  
Camino 1, 2 Flash Camino has a built-in Flash blocker, users may have to click the flash object to load it 
WebKit

Open in new window

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35306367
That is how I understand this too. I do not have much experience with Codecs to be of much more service to you...
0
 
LVL 13

Author Closing Comment

by:duncanb7
ID: 35343076
Thanks for your reply
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now