Therefore, if you want to embed a video and audio file in a web page, you must first choose the correct video and audio file format. The following will introduce some common video and audio formats in HTML5 and the support of browsers.
The video formats supported by 1 and HTML5 are mainly ogg, MPEG-4-4, wehm and so on. Details are as follows.
Ogg: An open source video packaging container. Its video file extension is ogg, and it can package vobris audio coding or theora video coding. At the same time, ogg files can also mix audio coding and video coding.
Mpeg4-4: The most popular video format at present, and the video file extension is mp4.
Under the same conditions, the video quality of MPEG-4 format is better, but its patent is controlled by MPEG-LA. Any device that supports playing MPEG-4 video must have a license issued by MPEG-LA.
At present, MPEG-LA stipulates that you can get a free license as long as it is a free video broadcast on the Internet. Webm: an open and free media file format released Webm:Google, and its video file extension is webm.
Because the video quality of webm format is close to mpeg4-4, and there is no patent restriction, webm is used by more and more people. Chanz Podcast web Front-end Training Version 6.5 is recommended.
2. Audio formats supported by HTML 5 The audio formats embedded in HTML 5 mainly include ogg, mp3, wav, etc. Details are as follows.
Ogg: When an ogg file only encapsulates audio coding, it becomes an audio file. Ogg audio file extension is ogg. Ogg audio format is similar to mp3 audio format, except that ogg format is completely free and there are no patent restrictions.
Under the same conditions, the sound quality and volume of ogg audio files are better than mp3 audio files. Mp3: The current mainstream audio format, and its audio file extension is mp3.
Like mpeg4-4 video format, mp3 audio format has many restrictions such as patents and copyrights. However, due to the support of major hardware providers, mp3 still maintains a high utilization rate with its rich resources and good compatibility.
Wav: A sound file format developed by Microsoft. Its extension is wav. As a lossless compressed audio format, wav has the best sound quality and the largest volume among the three audio formats.
The biggest advantage of wav audio format is that it is widely supported by Windows platform and its applications, and it is a standard Windows file.
Extended data:
Smart forms for html5:
Forms are the main part to realize the background interaction between users and pages, and HTML5 is more powerful in the design of forms.
The diversity of input types and attributes greatly enhances the expressive form of HTML, and with some new form tags, controls that originally needed JavaScript can be directly implemented with HTML5 forms.
Some functions, such as content prompt, focus processing, data verification, etc. , or through the smart form property tag of HTML5.