Search within TutorialsPark

HTML5 Multimedia Codec


Types of Multimedia files, popularity and browser support.


HTML5 Media Codec.

1.Multimedia files are stored in encoded form, and when a browser needs to play the multimedia file it needs to decode it, and then the user can see or hear the media file.

2.The unit or component that performs both the encoding and decoding part is called as the codec.

3. The codec of the media file can be known from the file's extension. (i.e .mp3, .avi etc). Also the MIME type defined within the type attribute specifies the codec of the media file.

4. Codec can be compressed in two ways LOSSY and LOSSLESS.

a. In LOSSY compression no data is lost while compression and retrieval of data.

b. In LOSSLESS compression some data is lost but a very high compression is achieved.


Video Container .

VideoContainer
Metadata
AudioStream
Video Container
The Figure shows a video container with components of Metadata, Videostream and Audiostream

Video Container.

1. The Video Container is a Wrapper that contains the Metadata, Video Stream and Audio Stream.

2. The Utility of the Video Container is to encapsulate the Metadata, VideoStream and AudioStream Components inorder to provide synchronisation and lag-free streaming support

3. Generally, a Video Container Contains one video stream and one audio stream, but even multiple audio and video streams are allowed.For 3D videos two video streams are used, one for each eye to create a 3D effect.

4. Some Popular Video Containers.

Audio Video Interleave(.avi)

Flash Video(.flv)

MPEG 4(.mp4)

Ogg(.ogv)

Matroska(.mkv)


Metadata.

1.Metadata contains information about the contents of the video container.

2. Usually it contains, production Date, resolution, artists names and details of the codecs.


Video Stream.

1.Video Stream Contains the moving images of the video file.

2.The number of video streams can be one for normal video and two video streams for 3D videos.


Audio Stream.

1.The Audio Stream Contains the audio part that will be played(synchronized) along with the video file.

2.The number of audio streams can be one for normal audio and in case of popular commercial films, multiple audio streams for each language to which the film is translated to.


HTML5 Supported Media Formats .

Audio Formats .

Format Extention Description
Ogg Vorbis .ogg
.oga
Developed by Xiph.Org Foundation. It is completely free and Open Container format. Better than any other lossy audio formats.
Best Known for high fidelity, low compression size and zero restrictions.
WAV .wav
.wave
Waveform Audio File Format was developed Jointly by Microsoft and IBM. It stores data in form of "chunks"(an application of Resource Interchange File Format(RIFF))
When compared to other format WAV files are quite large in size.Hence not suitable for Internet.
AAC .m4a
.m4b
.m4p
.m4v
.m4r
.3gp
.mp4
.aac
Advanced Audio Coding(ACC) is as popular as .MP3 file format. But produces better sound quality at same bit rates as compared to .MP3. Its Licence free and is a standard format for iPhone, iPad, Youtube, PlayStation3 etc. Hence, a future replacement for .MP3 format.
MP3 .mp3 Moving Pictures Expert Group(MPEG) developed the format MP3(standard MPEG-1 or MPEG-2)
It is the Most Popular format for audio files on the Internet, and a defacto standard when it comes to audio compression(lossy).
It a patented format and hence Licencing is required for encoding.
WebM Vorbis .webm WebM Vorbis is an Audio format designed for HTML5 audio.
It Developed by Google Inc and is an extension from Matroska format.
Its an Opensource, free, patent and royalty free format.
Supported on Mozilla Firefox, Google Chrome and Opera browsers.
Ogg Opus .opus Opus Audio Codec Format was developed by Internet Engineering Task Force(IETF)
to effectively support Interactive Real-Time audio over the Internet.
It supports lossy audio compression and is licence and royalty free.

Browser Support for HTML5 Audio Formats.

Audio Formats Chrome chrome Safari safari Firefox firefox Opera opera IE internetexplorer
MP3 Yes Yes No Yes Yes
Wav Yes Yes Yes Yes No
Ogg Vorbis Yes Yes Yes Yes No
Ogg Opus Yes No Yes Yes No
AAC Yes Yes No Yes Yes
WebM Vorbis Yes No Yes Yes No

NOTE-The stats are valid for the latest stable versions of the above browsers .

Video Formats .

Format Extention Description
Ogg Theora .ogg
.ogv
Developed by Xiph.Org Foundation. It is completely free and Open Container format. Performance wise Comparable to H.264/MPEG-4 .
Best Known for high fidelity, low compression size and zero restrictions.
H.264/MPEG-4 .mp4
H.264/MPEG-4 is the most popular and de-facto standard for video compression.
Used mostly to encode High Definition(HD) and Blu-ray Disks.
It available in a set of 21 profiles (capabilities) for different kind of demands.
Popular on the internet with Youtube Vimeo iTunes.
WebM .webm WebM audio format is designed for HTML5 audio and video.
Its a project funded by Google Inc.
It Consists of VP-8 and VP-9 video and Vorbis and Opus audio streams and an extension of Matroska container.
Its an Opensource, free, patent and royalty free format.

Browser Support for HTML5 Video Formats.

Audio Formats Chrome chrome Safari safari Firefox firefox Opera opera IE internetexplorer
Ogg Theora(.ogv/ .ogg) Yes No Yes Yes No
H.264/ MPEG-4(.mp4) Yes Yes No No Yes
WebM(.webm) Yes No Yes Yes No

NOTE-The stats are valid for the latest stable versions of the above browsers .

Related Examples

Related Tags