Click here to Skip to main content
16,016,157 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<video width="320" height="240" controls>
 <source src="C:\chella\Chella Software with voiceover.mpg" type="video/mpg">
 <source src="C:\chella\Chella Software with voiceover.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>


but when i run it the video is not playing please help me
Posted

As you can read here
http://www.w3schools.com/tags/tag_video.asp[^]
the video tag attribute "src" specifies the URL of the video file.

"C:\chella\ChellaSoftwarewithvoiceover.mpg" is not a URL, it is a file path.

Change your HTML to this:
HTML
<video width="320" height="240" controls="">
 <source src="ChellaSoftwarewithvoiceover.mpg" type="video/mpg">
 <source src="ChellaSoftwarewithvoiceover.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

Moreover you must copy your video files to the same folder as your HTML file.
If you put them in e.g. a subfolder you must adapt the URLs.
 
Share this answer
 
v2
Sometimes file names with white spaces causes issue.
Try removing the spaces in filename i.e, try renaming files like
ChellaSoftwarewithvoiceover.mpg
ChellaSoftwarewithvoiceover.ogg

and then modify the source accordingly
HTML
<video width="320" height="240" controls="">
 <source src="C:\chella\ChellaSoftwarewithvoiceover.mpg" type="video/mpg">
 <source src="C:\chella\ChellaSoftwarewithvoiceover.ogg" type="video/ogg">
Your browser does not support the video tag.
</source></source></video>

Hope, it helps :)
 
Share this answer
 
Comments
Member 11387088 9-Feb-15 6:34am    
No it is not playing
Suvendu Shekhar Giri 9-Feb-15 6:51am    
In which browser you have tested?
Suvendu Shekhar Giri 9-Feb-15 6:53am    
Check here for the full table of browser support

http://en.wikipedia.org/wiki/HTML5_video#Table
Member 11387088 9-Feb-15 6:54am    
I tested using google chrome
Member 11387088 9-Feb-15 7:27am    
does html supports mpg format for video

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900