Accessing Music and Video

From CompSciWiki
Revision as of 00:18, 7 December 2009 by KevinQ (Talk | contribs)

Jump to: navigation, search

COMP1260 > Using the Internet



Introduction

 

...by students

HI!
This is some text!

Codec

A codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal[1]. Codecs are used to encode a data stream or signal for storage, or decoding them for playback and editing. Codecs are a key component of audio and video playback, creation and distribution. In general raw audio and video is far too large for distribution and storage, for instance we need 118 Gb (or about 26 single layer DVDs) to store a raw video 90 minutes in length at VHS quality[2]. To remedy this we use codecs to compress (encode) the data before it is stored or distributed. As a consequence any user who wishes to playback the media must have the same codec to uncompress (decode) the data.

Codec Types

There are two types of codecs:

  • Lossy Codecs: Lossy codecs achieve compression by reducing the quality of the media by some amount, but employ some algorithm to give the impression of the data being there. Some examples of popular lossy codecs include: MP3, WMA, and MP4.
  • Lossless Codecs: Lossless codecs achieve compression while retaining all information present in the original media. As a consequence of all the original information being retained, the media encoded are substantially larger then that of their lossy counterparts. Lossless codecs are generally preferred if the media is going to be put through further processing (ie editing), in which case the constant reprocessing on lossy codecs would cause the media to degrade in quality at each step. Some examples of popular lossless codecs include: FLAC, APE, and FFMPEG


Digital Media

  • Digital Audio: Digital audio uses digital signals (binary) for reproducing sounds. As such, it is the representation used by modern computers to playback, record, and edit audio. Audio playback on a computer requires several steps; first, the file to be played is decoded using the appropriate codec to convert it into raw digital audio. Second, the raw digital audio is converted to an analogue signal inside the sound card of the computer. Third, the analogue signal is amplified and broadcast through the speakers or headphones connected to the computer.
  • Digital Video: Digital video, like digital audio utilizes digital signals to reproduce video. Since most videos have sound, digital video is usually stored in what is know as a "container format". This container format allows video and audio streams to be stored in a single file with each being decoded separately then synchronized. Video playback on a computer can be broken down into several steps; first, the container file is broken into an audio stream and a video stream. Second, the streams are each decoded to raw media using their respective codecs. Third, the video frames are processed by the CPU (and possibly the graphics card as well depending on the software used) and displayed on the screen synchronized with the audio (see audio playback above).

Media Playback

  • Audio Playback: Audio playback is accomplished through an audio or media player. Traditionally, programs dedicated to only playing audio (audio players) were usually used for audio playback. The current trend, however, is towards using general media players (that can play a range of media including audio and video) for audio playback. These players come bundled with popular codecs for decoding audio media right out of the box(ie mp3, Redbook Audio aka commercial audio CDs). If the codec for the audio format is not available on the user's computer the user is usually given the option to acquire the codec automatically online or has the ability to install it manually.
  • Video Playback: Video playback, like audio playback is accomplished via a media player. Unlike with audio, many popular codecs (ie divx or xvid) do not come with many of the popular media players. This problem is compounded by the fact that video files tend to use a vast array of different codecs for video encoding, far more then audio files. Many of these codecs are also proprietary (they must be purchased), or licensed to competing media players resulting in no support for the codec. This usually means users will have to have multiple commercial media players installed to handle all the formats. Alternatively, the user can install an open source media player that comes bundled with numerous codecs such as the VLC Media Player. Popular media players include: Windows Media Player, Itunes, QuickTime, Winamp, and VLC Media Player.



Acquiring Media

One Type of Early Punch Cards


Further Readings

History of Operating Systems on Wikipedia: http://en.wikipedia.org/wiki/History_of_operating_systems
Computer History Timeline: http://www.computerhistory.org/timeline/?category=sl
Operating System Timeline: http://trillian.randomstuff.org.uk/~stephen/history/timeline-OS.html
Detailed Timeline of Non-UNIX Operating Systems: http://www.oshistory.net/metadot/index.pl?id=2165;isa=Category;op=show
Screenshots of Major Operating Systems: http://www.guidebookgallery.org/guis

References

  1. http://en.wikipedia.org/wiki/Codec
  2. http://www.fastvideoindexer.com/articles/VideoSizes/VideoSize.htm

Previous Page: Roles of the Operating System

Next Page: Protecting your Computer