Video: Difference between revisions

From XPUB & Lens-Based wiki
Line 55: Line 55:
== In principle ==
== In principle ==


<nowiki>
<source lang="html4strict">
<video controls autoplay>
<video controls autoplay>
     <source src="video.mp4">
     <source src="video.mp4">
     <source src="video.webm">
     <source src="video.webm">
     No video support!
     No video support!
</video>
</video>
</nowiki>
</source>


<nowiki>
<source lang="html4strict">
<audio controls autoplay>
<audio controls autoplay>
     <source src="audio.mp3">
     <source src="audio.mp3">
     <source src="audio.ogg">
     <source src="audio.ogg">
     No audio support!
     No audio support!
</audio>
</audio>
</nowiki>
</source>


== Compressing media ==
== Compressing media ==

Revision as of 10:34, 1 December 2011

History

A brief history of online video

  • 1990s QuickTime, Windows Media, RealPlayer
  • 2002 Flash (Player 6: Spark)
  • 2005 Flash (Player 8: On2 VP6)

Culture Shift / Patent Wars

Media formats have consistently been at the intersection of legal & social battles reflective of the impact of digital media on an established music and film industry.

Link to "new oil" site of Seb Luetgert

Terminology

Container

The container is the "box" that holds the video file. Containers organize how the audio/video data is "laid out" as a "byte stream" (thus may have an impact on how well a video can "stream" or appear in the browser when only partially downloaded). Container formats may also allow for "metadata" to be included (name-value pairs of data such as the artist name of a music track).

Examples:

  • MOV (Apple/QuickTime)
  • MP4 (MPEG)
  • WMV (Microsoft/Windows)
  • FLV (Flash Video)
  • AVI ("audio-video interleave": Microsoft)
  • MKV (Matroska, Free software, basis of WebM, Implemented by many hardware media players)
  • OGG (Free software)

Codecs

The specific (digital) format of audio / video data. The codec (COmpresion/DECompression) is the specific algorithm used to turn audio/visual data into digital data and vice versa. As the name "compression" implies, codecs are all about preserving the most quality of the image and sound using the least data (bitrate). Most codecs are "lossy", meaning that the original data is degraded somewhat in order to make the data size small enough for viewing online. Choosing an appropriate bitrate and compressing source material is an important and potentially complex process that can be greatly helped by tools that support sensible "preset" configurations.

Examples:

  • H.263
  • H.264
  • WAV (more or less "raw" uncompressed audio format)
  • AAC (Advanced Audio Codec)
  • MP3 (MPEG-1 Audio Level 3)
  • Theora (Free, typically in OGG)
  • Vorbis (Free, in OGG & WebM)
  • VP8 (webm: On2 -- bought by Google in 2010)
  • Dirac

The State of Codecs

Two camps:

  • "MPEG": Safari/iOS (Apple), Explorer (Microsoft): MP4 (H.264/AAC)
  • "Free": (Firefox, Chrome (Google), Opera): OGG (Theora/Vorbis) & WebM (VP8/Vorbis)

Only Chrome is supporting both MP4/3

Flash future for WebM/VP8 ?!

In principle

<video controls autoplay>
    <source src="video.mp4">
    <source src="video.webm">
    No video support!
</video>
<audio controls autoplay>
    <source src="audio.mp3">
    <source src="audio.ogg">
    No audio support!
</audio>

Compressing media

  • firefogg
  • ffmpeg2theora
  • HandBrake
  • ffmpeg
  • avidemux