COMPSCI 105 Lecture Notes - Lecture 15: Lossy Compression, Harry Nyquist, Moving Picture Experts Group
Thursday, April 3, 2014
CompSci 105 - Lecture
Multimedia
-Sound: pressure waves in the air
-Sound hits your eardrum, vibrates small hairs in ear canal connected to nerves
-Sound hits diaphragm in a microphone, changes vary pressure waves into varying
electrical signals
-Varying electrical signal goes to a A/D (analog to digital) converter; emits stream of
numbers
Questions:
1. How many independent channels?
-1 for mono, 2 for stereo
2. How good is each sample?
-1 byte (voice) or 2 bytes (music)
3. How many samples per second per channel?
a. What is the highest frequency humans can hear?
-Around 22KHz (22,000 cycles/sec)
b. How does frequency map onto samples per second?
-Harry Nyquist (early 20th century)
-Nyquist Sampling Theorem: to capture any signal, you must sample at
least twice the rate of the highest frequency that you wish to capture
-For CDs:
2 channels (stereo)
2 bytes/sample (music)
44,100 samples/sec/channel
176,400 bytes/sec
-Compression: lossy compression
-MP3: about 3704400 bytes (10:1 compression)
-WMA: about 1852200 bytes (20:1 compression)
-MIDI: musical instrument digital interface
-Sequence of events as notes are hit and released
-Digital sheet music; requires an audio card that can duplicate instruments
-Video
-Width of image (pixels)
-Height of image (pixels)
-Bytes per pixel (for color)
-Frame rate (frames per second)
Formats:
-AVI: Audio Video Interleave (native format for Windows)
-MOV/MP4: Apple Quicktime
-MPEG: Motion Picture Experts Group
-Only stores differences between frames
-Compression takes very long time; playback is very fast
Document Summary
Sound hits your eardrum, vibrates small hairs in ear canal connected to nerves. Sound hits diaphragm in a microphone, changes vary pressure waves into varying electrical signals. Varying electrical signal goes to a a/d (analog to digital) converter; emits stream of numbers. Nyquist sampling theorem: to capture any signal, you must sample at least twice the rate of the highest frequency that you wish to capture. Sequence of events as notes are hit and released. Digital sheet music; requires an audio card that can duplicate instruments. Avi: audio video interleave (native format for windows)