Why should I use ogg and webm file?
Ther开发者_开发技巧e is a option to add ogg and webm file in wordpress plugin of MediaElement.js. Why I should use it? What is the benefit?
Ogg is a free media container format by Xiph.Org. It is typically used to hold audio compressed with Vorbis, but can also be used for FLAC audio and Theora video.
Vorbis is an efficient, royalty-free audio compression format. It is open source and is supported on many platforms (such as Windows, Linux, smartphones). It has better audio quality than MP3, and comparable quality to AAC.
WebM is a free media container format, whose development is sponsored by Google, that is a subset of the existing free format Matroska.
WebM files typically contain video compressed with VP8 or VP9, and audio compressed with Vorbis or Opus. The VP8 video codec is somewhat less efficient than H.264 / MPEG-4 AVC, but its royalty-free status means that it may supported on more platforms than MP4 video files.
Browser compatibility, sound/video quality, and bandwidth or download time.
Mozilla has the authoritative answer on browser compatibility. tl;dr mp3
has the widest browser support, webm
is supported by almost everyone, except Safari.
For sound quality, webm
and ogg
should be better than mp3
.
For bandwidth or download time, I don't see much difference between the three formats. Obviously, picking mp3
enables one file download that works in all browsers, so should be the least bandwidth.
All things considered, I have my audio source arrays set for webm
as the first element and mp3
as the second element. I considered doing webm
, ogg
, and mp3
but this seems like overkill.
精彩评论