Solved

mp4 video play in HTML5

Posted on 2011-03-23
12
2,386 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Worldmap 1 28
Can't get js code to execute 8 30
How can I use Javascript to insure proper entry of URL? 6 26
Jquery driving me nuts... 14 27
This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

685 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