Solved

mp4 video play in HTML5

Posted on 2011-03-23
12
2,367 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

708 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

19 Experts available now in Live!

Get 1:1 Help Now