Learning Resources

Home »  » Courses » Technology Education & Skilled Trades » Communications Technology 2104/3104 » Unit 03 » Set 02 ILO 03 » Go to Work

Lesson

Formats

Digital audio and video formats were covered in Unit 3, Section 1, Lesson 4. As a quick review, the dominant digital audio and video formats are

  • Audio
    • proproietary
      • .wav is Microsoft's wave format, which is the most widely used Windows format.
      • .aif, .aiff, .aifc are Apple QuickTime formats
      • .ra, .ram are Real Media audio formats
      • .wma is Microsoft's streaming audio format
    • non-proprietary
      • .mp3 is the Motion Pictures Expert Group's MPEG 1, Level 3 audio format. It is also a Codec.
  • Video
    • proprietary
      • .asf., .wmv, and .avi are Widows Media formats
      • .mov, .qt are Apple QuickTime formats
      • .rm is a Real Media format
    • non-proprietary
      • MPEG formats are used by many video players
        • mpeg-1, used for VCD (video-CD);
        • mpeg-2, used for DVD and digital satellite/cable;
        • mpeg-4, used for Divx.

Each media format can have its files compressed in one or more ways. Microsoft's avi format (audio-video-interleaved), for example is widely used, and can employ many different Codecs (compression methods).

File Size

As you've probably figured out in the previous two lessons, digitizing audio and video produces very large file sizes. In fact, a few seconds of video can produce several hundred megabytes worth of data. At that rate, a full movie would take up several terabytes. There are two key strategies to reduce the size of files

  • reduce the sampling size
  • compress the files

Reduce the Sampling Size

Reducing the sample size involves two actions

  • reducing the number of samples taken per second, and
  • reducing the resolution, or precision, of the sample (number of bits per sample)

CD Audio, for example is sampled at 44.1 KHz (thousand times per second). This is the lowest sample rate that can accurately record 20KHz audio, which is at the upper limit of human hearing. Most audio digitizing software allows you to set the rate from a low of 8 KHz to 44.1 KHz. Most computer audio sampling has a fixed sampling resolution of 8 (256 steps in resolution), 12 bits (4096 steps in resolution), or 16 bits. Some software allows changes to be made in resolution. Some does not. In some cases, selecting a lower sample rate automatically selects a lower resolution as well.

For video, reducing the sampling rate means reducing the number of frames per second that is captured. At the high end, this means capturing 60 fields per second At 2 fields per frame this makes up 30 frames per second, which is the frame rate for TV in North America (its actually 29.97 fps). When video is captured, software usually lets you select lower frame rates, with 15 fps and 10 fps being common choices. Reducing the sampling precision means reducing the frame size. Full size video taken from MiniDV, for example, is 720 by 480 pixels. Standard reduced video frame sizes are 640 by 480, 320 by 240, and 160 by 120. Many programs also let you specify any size you wish, although the standard sizes may be supported better by compression algorithms.

As you have learned in an earlier lesson, reducing sample rate and sample resolution results in smaller file sizes. It also results in lower fidelity. The digital signal, when converted back to its analog origins will not be exactly like the original. Usually, reducing the file size by reducing the sample rate and resolution results in lower quality when the file is played back.

Compress the Files

Just as with image compression, audio and video compression can take one of two forms

  • Lossy, which looses data when the file is compressed and does not recover it when the file is decompressed. Good lossy video compressors, for example, can get up to 10:1 compression without an obvious visible loss in video quality
  • Lossless, which compresses the data without loss of information. Most lossless compressors get no more than 2:1 compression

Compression schemes find ways to reduce file sizes by better managing redundancies in the data, by removing data that our eyes and ears normally cannot perceive, and by rearranging the data to take up less space. This encodes the file such that the decompressor is required to read the data again. If the compression was lossy, that data cannot be recovered.

Lossless audio compression looks for redundancies in the audio data. These can be represented as multiples of the original, taking up less storage space. Lossy compression uses psychoacoustic models, which is a mathematical model used to look for data than people cannot hear, or that is masked by other data and remove it.

Video compression is usually done in one, or both, of two ways

  • Temporal compression, which looks at similarities in frames over time

Figure Temporal Compression - Similarities Over Time (across multiple frames)
  • Spatial compression, which looks for similarities in a single frame

Figure Spatial Compression - Similarities in Data in the Same Frame

Codecs

File compression/decompression algorithms are called Codecs, which simply means Compressor/Decompressor (some say Coder/Decoder). There are large numbers of Codecs available. Some are specialized. some are more widely used. Here are a few common Codecs

  • Cinepak. This is one of the first Codecs, originally made for slower computers and for earlier CD-ROM encoding. It is slower and lower quality than newer Codecs.
  • Intel Indeo. This started as a hardware Codec, but has evolved into a series of software Codecs. It generally produces higher quality video
  • Motion JPEG (M-JPEG). High quality, based on single frame compression. Used mainly for higher end digital video editing.
  • MPEG-1. Codec started for CD-ROM use, has improved to 640 by 480 frame size and is used for satellite broadcast
  • DivX. Recent development based on MPEG-4. Used for compressing whole movies. Used in this course for demos of techniques.
  • MP3. Based on MPEG 1, Level 3 audio

Codecs work with applications used to capture, edit and show media. Usually, if a Codec is installed on a computer it is available to any program on the computer that can work with that media format.

Streaming Media

Media can be made available on the web by making a link to it from a web page or by embedding it in the web page. There is another way - streaming. Streaming media can be used to present live events, or content that is stored on the server. Streaming media can be set up so that it all downloads before it starts to play, or it can be setup to start playing as soon as it starts downloading. Streaming can be single cast or multicast. Single cast starts a new stream for every computer that contacts it. It can saturate bandwidth very quickly. Multicast serves only one stream that supplies all users.

Figure Single Cast Media Server

Figure Multicast Media Server

In addition, the media stream can be a fixed size, for example video at 320 by 240 pixels. Or, it can simultaneously broadcast a number of sizes and data rates to accommodate people with different connections such as dial up modems or DSL modems. A data stream would be in one format (Windows Media for example) with one type of encoding.

There are three commonly used streaming media formats

Vendor and Format

Component

Free

Apple's QuickTime

Can produce and broadcast only QuickTime using a variety of Codecs

Player can also play some Windows formats

Apple's QuickTime Pro (Mac and Windows content builder)

No (US$30)

QuickTime Streaming Server (Mac only)

Yes

QuickTime Broadcaster (Mac only)

Yes

Darwin Streaming Server (Open source) runs on Mac, Linux, and Windows

Yes

QuickTime Player runs on Mac, Linux, Windows

Yes

Microsoft's Media

Can produce Media formats only using a variety of Codecs

Windows Media Encoder runs on any Windows OS. It is used to capture, edit, and produce media streams. It can do basic streaming as well.

Yes

Windows Media Server runs on Windows Servers only.

Yes

Windows Media Player (runs on any Windows OS)

Yes

Real Networks Media

Produces Real Formats

Can also broadcast and play Windows Media Formats

Helix Producer

No (US$200, but free basic version available))

Helix Universal Server runs on Linux and Windows

No (US$2000 and up)

Helix Universal Gateway

No (US$2300 and up)

RealPlayer and RealOnePlayer

Yes

For Additional Information

If you need more information, check these sources

Activity

Assigned Activities

The purpose of this activity is to develop understanding of streaming media technology. This is an advanced project. You will need administrative access to the computer to complete it.

Please complete all parts of the activity

  • Download and install Windows Media Encoder. Version 7.1 is the correct version for Windows 2000.
  • Connect a camcorder to the computer using Dazzle or other audio/video input device
  • Run Media Encoder.
    • Select Broadcast, ... as the option
    • Select Broadcast a live event... as the option
    • Select DC 80 as the video option (audio should be check but greyed out)
    • Leave the HTTP port at the default 8080, but write down the urls just below. It should show the IP of your computer in two ways

      http://computername:8080
      http://computerip:8080
    • Leave the Profile selection at the default
    • When you click finish, you will see an information window saying only the required items are showing. Click OK
    • Click Start in the lower left corner
    • You should be webcasting on your LAN
  • To view the webcast, go to another computer on the LAN and start Windows Media Player.
    • On the Menu, Select File / Open URL
    • Type in the URL you wrote down previously. On this computer, the urls were

      http://red:8080, and
      Http://192.168.1.50:8080
  • Create an entry in your course portfolio for this activity and write a brief report
  • Publish the report to your course portfolio web

Test Yourself

There is no self test for this lesson.