Difference between revisions of "Courses/Design & Technique-Essential Web Design/Q2/06"

From Publication Station
(Created page with "=audio and video in HTML5= HMTL5 includes a standard way to embed audio and video tags, without the use of flash. It playing audio and video quite easy and opens up a lot of...")
 
Line 25: Line 25:
* is patent-encumbered
* is patent-encumbered


===Theora==
===Theora===
* royalty-free codec
* royalty-free  
* cane be embedded in any codec, but is most common in .ogv container  
* can be embedded in any codec, but is most common in .ogv container  




==audio codecs==
==audio codecs==
===MP3===
Also know as MPEG-1 Audio Layer 3.
* number of channels: 1 or 2
* possible bitrates: 64 kbps, 128 kbps, 192 kbps
* is patent-encumbered
===AAC===
AAC or Advanced Audio Coding
* is patent-encumbered
* number of channels: up to 48
===Vorbis===
can be embedded in .ogg (also .mp4, .webm, .mkv) containers
* royalty-free
* number of channels: any
===audio channels===
Unlike video, audio typically is in ''stereo'', which means that it has ''2 channels'' or streams




Line 37: Line 59:


== event listeners==
== event listeners==
<ref name="all">All info on av codecs and containers in http://wiki.multimedia.cx/</ref>

Revision as of 16:58, 23 December 2015

audio and video in HTML5

HMTL5 includes a standard way to embed audio and video tags, without the use of flash. It playing audio and video quite easy and opens up a lot of possibilities audio-visual interaction and manipulation.

Let's see how.

requirements

files

Video files such as .avi .mp4 .ogv .mkv are just container formats. Just like a ZIP file can contain any sort of file within it, video container formats only define how to store things within them, not the kinds of data are stored. [1]

Each of the container formats has a corresponding audio and video codec. A codec defines the way (the algorithm) by which a audio or video stream is encoded. [2]

  • container
    • medium
    • audio codec
    • video codec - H.264, Theora
    • browser

CREATE TABLE

video codecs

H264

  • can be embedded in mp4 container
  • is patent-encumbered

Theora

  • royalty-free
  • can be embedded in any codec, but is most common in .ogv container


audio codecs

MP3

Also know as MPEG-1 Audio Layer 3.

  • number of channels: 1 or 2
  • possible bitrates: 64 kbps, 128 kbps, 192 kbps
  • is patent-encumbered

AAC

AAC or Advanced Audio Coding

  • is patent-encumbered
  • number of channels: up to 48

Vorbis

can be embedded in .ogg (also .mp4, .webm, .mkv) containers

  • royalty-free
  • number of channels: any

audio channels

Unlike video, audio typically is in stereo, which means that it has 2 channels or streams



tags

event listeners

[3]

  1. http://diveintohtml5.info/video.html
  2. Note: a lossy audio and video compression codecs try to store the max amount of information in the smallest amount of space. One technique use to achieve this goal in video is the use of key frames instead of sequence of frames. In a second there only two or three key frames are used to create the illusion of movement, the remaining frames are filled with inbetweens, changes og pixel color. When a drastic change to the image occurs a key frame must be created.
  3. All info on av codecs and containers in http://wiki.multimedia.cx/