Académique Documents
Professionnel Documents
Culture Documents
Essential Materials
Outline
AV on the Web?
Shockwave, Flash
3 All copyrights reserved by C.C. Cheung 2003.
Basic Terms
Term
Bit Kilobit (Kb) Byte Kilobyte (KB) Megabyte (MB) Gigabyte (GB) Binary value 0 or 1 1,000 bits (approx.) 8 bits 1,000 bytes 1,000,000 bytes 1,000,000,000 bytes
Definition
Kbps
KB/sec
CSC1720 Introduction to Internet
Analog: A signal that has a continuous nature rather than a pulsed or discrete nature.
Note: Electrical or physical analogies, such as continuously varying voltages, frequencies, or phases, may be used as analog signals.
Digital Signal
Use Pulse Code Modulation (PCM) to represent an audio signal by digital data.
Sampling rate
Number of sample taken of a signal in a given time (usually one second)
Bit depth
Describes the accuracy of the audio data
Channels
E.g. Stereo has two channels
Bit rate
Measured in kilobits per second (Kbps) is a function of the bit depth and sampling rate
Sampling rate
The more sample taken per second, the higher the accuracy. Typically measured in kilohertz (KHz). CD audio has 44,100 samples per second (44.1KHz). 8 KHz produces lower quality radio sound. Standard sampling rates include 8KHz, 11.025KHz, The high-end 96K is used in DVD, but is not applicable to the Web.
9 All copyrights reserved by C.C. Cheung 2003.
Sampling Rate
demo
10
Bit depth
Also called sampling resolution or word length. The more bits, the better is the quality of the audio (and a larger file of course). Common bit depths are 8-bit (telephone like), 16-bit (CD quality), and 20, 24, 32, 48-bit depths. How many signal can a 8-bit and a 16-bit data represent?
0000 0000 1111 1111 0000 0000 0000 0000 1111 1111 1111 1111
11
Quantization
demo
12
Channels
Audio file can support one to six channels of audio formats. Mono one channel Stereo two channels Some others three, four channels. Six channels 5.1-channel surround sound. More multi-channel formats announce in the coming years.
13 All copyrights reserved by C.C. Cheung 2003.
Channel Examples
14
Bit rate
Audio files are measured in terms of bit rate which is measured in kilobits per second (Kbps). It can be calculated by dividing the file size by the time (in second) to play the audio clip.
E.g. 3Mb file play in 30 seconds 3000k / 30 = 100kbps.
Number of channels
A mono audio file is halved the space of a stereo file. Depends on your actual needs.
16
Bit depth
Audio file on the Web are usually 8-bits. Half the size of a 16-bit file.
Sampling rate
Half the sampling rate will also halve the space needed. Voice only audio file can be reduced to 8KHz. 22 KHz music clips are acceptable.
8-bit mono: seconds x KHz 16-bit mono: (seconds x KHz) x 2 8-bit stereo: (seconds x KHz) x 2 16-bit stereo: ([seconds x KHz] x 2)x2 E.g. the file size of 30 seconds of 16bit, 11KHz mono audio:
(30 x 11) x 2 = 660K.
18
Streaming Audio
What is it?
Play almost immediately after the request, continues playing the transferring data.
Advantages:
Address the problem of long download time. Control distribution and protect copyright, because the user cannot get a copy of the file.
Disadvantages:
Sound quality may be be affected by low speed or unstable Internet connection.
Reference
19 All copyrights reserved by C.C. Cheung 2003.
What is Streaming?
20
Web browser
Web browser request a RealAudio from the web server Web server
CSC1720 Introduction to Internet 21
RealAudio Server
Quality Comparison
http://www.cit.cornell.edu/atc/itsupport/streamcompare.shtml
22
WAV/AIFF (.wav/.aif/.aiff)
The Waveform Audio File format (.wav) was developed by Microsoft, supports arbitrary sampling rates and bit depths. The Audio Interchange File format (.aif, .aiff) was developed for Macintosh platform. They are less likely used on the Web, because people use mp3 or streaming.
23
http://www.nuance.com/prodserv/demo_vocalizer.html
WAV/AIFF
24
MP3 (.mp3)
Able to maintain excellent sound quality at very small file sizes. The compression reduces an audio file to one-tenth of its original size.
E.g. 40MB file 3.5MB
MP3 is actually MPEG-1 Layer-III Good for distribution of HQ audio. Demo: www.mp3.com
25 All copyrights reserved by C.C. Cheung 2003.
MP3 is actually the file extension for MPEG, audio layer 3. Layer 3 is one of three coding schemes (layer 1, layer 2, and layer 3) for the compression of audio signals. Layer 3 uses perceptual audio coding and psychoacoustic compression to remove all superfluous information. (More specifically, it removes the redundant and irrelevant parts of a sound signal--the stuff the human ear doesn't hear anyway). It also adds a MDCT (Modified Discrete Cosine Transform) that implements a filter bank, increasing the frequency resolution 18 times higher than that of layer 2.
26 All copyrights reserved by C.C. Cheung 2003.
MP3 Players
27
QuickTime is a well-known video format, but it can create audio-only movies. QuickTime is a container format, which is able to store still images, movie formats,
Excellent compression, true streaming
28
MIDI (.mid/.midi)
MIDI stands for Musical Instrument Digital Interface which is developed for electronic musical instruments. MIDI files are very compact and very good for low-bandwidth delivery. Instruments are piano, drums, bass, orchestral strings, It is very attractive for adding MIDI file to your website with very little download time. Demo: www.findmidis.com
29 All copyrights reserved by C.C. Cheung 2003.
MIDI
http://www.findmidis.com/
30
RealMedia/RealAudio (.rm/.ra)
RealAudio is a server-based streaming audio format. The RealServer responses to the requests and delivers the streaming packets, including the bandwidth negotiation. A robust RealServer can support thousands of simultaneous listeners. Good for continuous-playing audio and live broadcasts to a large group of people. Example: RTHK Radio
31 All copyrights reserved by C.C. Cheung 2003.
RealMedia/RealAudio
32
Windows Media is a streaming system. It wraps all media elements into a Active Streaming File (.asf). Audio may be saved as non-streaming Windows Media Audio format (.wma). Good for continuous-play audio. The encoder and player is Free, shipped with Windows OS.
33 All copyrights reserved by C.C. Cheung 2003.
Windows Media
34
35
A simple link
<A HREF=audio/song.wav>Play the song </A> <A HREF=music.mp3><IMG SRC=buttons/play.gif></A>
Background Sound
<BGSOUND SRC=audio/song.mid LOOP=3>
Link to RealMedia
<A HREF=song.ram>Link to the song</A> pnm://domainname.com/song.rm
36
37
Movie length Frame size Frame rate Quality Color bit depth Data rate (bit rate)
38
Movie length
File size is proportional to the movie length. Videos longer than 1 or 2 minutes cause long download times. If it is a long video, consider to use streaming video.
39
Frame size
Full-screen video is 640x480 pixels. The most common frame size for web video is 160x120 pixels. Not recommend to use a frame size larger than 320x240. The size depends on the CPU power and the Internet connection bandwidth.
40 All copyrights reserved by C.C. Cheung 2003.
41
Frame rate
Frame rate is measured in number of frames per second (fps). Standard TV-quality video uses 30 fps. For the web, 15 or even 10 fps is more appropriate and produces fair smooth quality for the user. Commercial Internet Broadcasts are using 0.5, 0.25 frames per second.
42 All copyrights reserved by C.C. Cheung 2003.
Quality
Many video-editors allow you to set the overall quality of the video. The degree of compression controls the target quality. The low or medium setting results a fairly high compression which is appropriate for web delivery. Frame rate and quality are usually tradeoff in different applications.
43 All copyrights reserved by C.C. Cheung 2003.
The number of pixel colors in each frame affects the size of the video. The file size of the video will be greatly reduced by changing the number of colors from 24-bit to 8-bit. It sacrifices the image quality of the video.
44 All copyrights reserved by C.C. Cheung 2003.
This is the rate that the data must be transferred in order to ensure the video can play smoothly without interruption. It is measured in kilobytes per second (K/sec or Kbps). It can be calculated by dividing the size of the file (in K) by the movie length (in seconds).
E.g. the video file size is 1.9MB 1900K Play 40 seconds long, Data rate = 47.5K/sec
46
Video CODECs
CODEC is Compression/Decompression algorithms. The sound and frame images of a digital video must be compressed.
The vast amount of data
47
reference
48
Lossless compression means no information is lost and the final file is the same as the original. Most compression methods are lossy.
Sacrifices some data from the file in order to achieve higher compression rates. Use complicated algorithm to toss out some data that is not discernible to the human eye or ear.
49
Spatial (Intraframe) compression takes place on each individual frame of the video. Temporal (Interframe) compression applies on a series of frames, it takes advantages of areas of the image remain unchanged from frame to frame.
Relies on the key frames and delta frames. A key frame is placed once every second. E.g. 15 fps, a key frame once 15 frames.
50
Delta frame
51
How to create?
Most video editor, QuickTime Pro.
How to play?
QuickTime plug-in or QuickTime player.
52 All copyrights reserved by C.C. Cheung 2003.
http://www.apple.com/quicktime/gallery/cubicvr/times_square.html
Quicktime
53
RealMedia (.rm)
Industry standard streaming format. RealPlayer for playback. RealServer for serving streams. RealProducer for creating .rm files. Good for
Long-playing video or broadcast to many people.
How to create?
RealSystem Producer
How to play?
RealPlayer (Free), RealPlayer Plus (Commerical)
54 All copyrights reserved by C.C. Cheung 2003.
Created by Microsoft, closely integrated with Windows OS. Support Windows Media Video (.wmv) and Advanced Streaming Format (.asf) and other formats (.avi, .mpeg, ) Also support streaming. How to create?
Windows Media Encoder, Windows Media Author
How to play?
Media Player in Windows OS
55 All copyrights reserved by C.C. Cheung 2003.
AVI (.avi)
Stands for Audio/Video Interleaved. Introduced by Microsoft in 1992. In a AVI file, the audio and video information are interleaved every frame. Good for
Short web clips, high-quality video
How to create?
Most video editing tools.
How to play?
Windows Media, QuickTime, etc.
56 All copyrights reserved by C.C. Cheung 2003.
reference
57
Created by Moving Picture Experts Group (MPEG). Supports 1) Video, 2) Audio, 3) Streaming. Extremely high compression rates with small quality degradation (lossy). MPEG-1 : VHS quality MPEG-2 : HQ standard for TV broadcast MPEG-4 : Very HQ for AV compression MPEG can be compressed by using three schemes: Layer-I, Layer-II, Layer-III.
58 All copyrights reserved by C.C. Cheung 2003.
reference
59
MPEG Comparison
MPEG-1 Standard since Default Video resolution (NTSC) Max. Audio Frequency range Max. audio Channel Regular data rate Frames per sec (NTSC) Video Quality Hardware requirement for encoding/decoding 1992 352 x 288 48 KHz 2 1380 kbit/s 30 Satisfactory Low MPEG-2 1995 640 x 480 96 KHz 8 6500 kbit/s 30 Very good Medium MPEG-4 1999 640 x 480 96 KHz 8 880 kbit/s 30 Very Good High
60
Advantages:
File sizes are small Image quality is high It uses streaming technology It uses high-quality streaming audio It is scriptable
Disadvantages:
A plug-in player is required Expensive authoring software Problems on printing their content
61
Summary
Discuss the basic digital audio/video terminology. Introduction to different formats: WAV, MP3, QuickTime, RealMedia, Windows Media, AVI, MPEG. To deliver long-playing audio/video or live broadcasts, you should choose one of the streaming media. Flash and shockwave are popular and appropriate format for the Web.
62 All copyrights reserved by C.C. Cheung 2003.
References
Design Web Audio (J. Beggs, D. Thede), Oreilly. E-Video (H. Peter Alesso), Addison-Wesley. Audio Video Knowledge Center Bible in MP3 format MPEG Musiq Luke Video
The End. Thank you for your patience!
63 All copyrights reserved by C.C. Cheung 2003.