Home  >  Article  >  Web Front-end  >  What audio formats does html5 support?

What audio formats does html5 support?

青灯夜游
青灯夜游Original
2022-01-23 16:00:026798browse

The audio formats supported by html5 are: 1. MP3 format, which is designed to greatly reduce the amount of audio data; 2. Ogg format, which is a completely free, open and patent-free audio format Compression format; 3. Wav format is a sound file format developed by Microsoft.

What audio formats does html5 support?

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

HTML5 provides a standard for playing audio files. You can use the

The embedded audio formats mainly include ogg, mp3, wav, etc.

##MP3audio/mpegOggaudio/oggWavaudio/wav
Format MIME-type
  • ogg:

    When the ogg file only encapsulates audio encoding, it will become an audio file. The ogg audio file extension is ogg. The ogg audio format is similar to the mp3 audio format. The difference is that the ogg format is completely free and has no patent restrictions. Under the same conditions, the sound quality and size of ogg format audio files are better than those of mp3 audio format.

  • mp3:

    The current mainstream audio format, its audio file extension is mp3. Like the mpeg4 video format, the mp3 audio format also has many restrictions such as patents and copyrights. However, because of the support of major hardware providers, mp3 still maintains a high usage rate relying on its rich resources and good compatibility.

    MP3 is an audio compression technology, its full name is Moving Picture Experts Group Audio Layer III (Moving Picture Experts Group Audio Layer III), referred to as MP3. It is designed to significantly reduce the amount of audio data. Using MPEG Audio Layer 3 technology, music is compressed into smaller files with a compression rate of 1:10 or even 1:12. For most users, the playback sound quality is no better than the original uncompressed audio. A significant decline.


  • wav:

    A sound file format developed by Microsoft (Microsoft), its extension is wav. As a lossless compressed audio format, WAV's sound quality is the best among the three audio format files, but its size is also the largest. The biggest advantage of the wav audio format is that it is widely supported by the Windows platform and its applications and is a standard Windows file.

Related recommendations: "

html video tutorial"

The above is the detailed content of What audio formats does html5 support?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn