- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Commonly used Video formats while using HTML5 video
The current HTML5 draft specification does not specify which video formats browsers should support in the video tag. But most commonly used video formats are −
- Ogg − Ogg files with Thedora video codec and Vorbis audio codec.
- mpeg4 − MPEG4 files with H.264 video codec and AAC audio codec.
You can use the <source> tag to specify media along with media type and many other attributes.
A video element allows multiple source elements and browser will use the first recognized format:
<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls autoplay> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> Your browser does not support the video element. </video> </body> </html>
- Related Articles
- Play local (hard-drive) video file with HTML5 video tag?
- Using FFMPEG with HTML5 for online video hosting
- Display video inside HTML5 canvas
- Playing MP4 video in WebView using HTML5 in Android
- HTML5 video not playing in Firefox
- HTML5 video full preload in JavaScript
- Streaming a video file to an HTML5 video player with Node.js so that the video controls continue to work
- Facing Problem in retrieving HTML5 video duration
- Can't connect with the video while using Whiteboard
- HTML5 Video Tag in Chrome - Why is currentTime ignored when video downloaded from my webserver?
- HTML5 inline video on iPhone vs iPad/Browser
- Play infinitely looping video on-load in HTML5
- Converting video to HTML5 ogg / ogv and mpg4
- How to prevent the HTML5 video from loading before playing?
- HTML5 video not working with jquery bxSlider plugin on iPad

Advertisements