Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to play video in HTML5

I just started learning HTML5, I started with normal text file and changed its extension to .html and added the below code.

<!DOCTYPE HTML>
 <html>
 <body>

  <video width="320" height="240" controls="controls">
    <source src="D:\Movies\Troy (2004).avi" type="video/avi" /> 
    Your browser does not support the video tag.
  </video>

 </body>
 </html> 

I am using FireFox 4.0.

like image 423
BreakHead Avatar asked Aug 31 '25 23:08

BreakHead


2 Answers

Firefox doesn't support the avi container format

like image 197
Quentin Avatar answered Sep 03 '25 20:09

Quentin


Firefox doesn't support the avi format. Only ogg and webm are supported as also stated in this topic.

Edit: Peter Paul Koch has an more detailed overview of supported codecs in the different browsers available nowadays. See the article here.

like image 32
Rob Avatar answered Sep 03 '25 21:09

Rob