ThePlace

Home ] Search ] Resources ] Site Map ] Contact Me ]
Dave's Information Technology Resource

Up ]

Multimedia References ] Text ] Graphics ] Digital Audio ] MIDI Files ] [ Digital Video ] Streaming Content ] Flash Animation ]

--- Digital Video ---

Issues for Playing Digital Video on Web Pages

bulletLack of standards for video formats and web browsers, especially true for PC vs. Apple-based systems.
bulletBandwidth limitations; slower connections are the most problematic, video requires significantly more bandwidth than audio.
bulletPlug-in/ActiveX installation issues (how to install, size of installation and time to install, lack of skills or knowledge by the end user).
bulletAbuse of the technology: not a major issue yet because of larger bandwidth and standards issues.

References on Digital Video Technology

bulletMPEG information ...  http://www.mpeg.org/MPEG/index.html ... also http://bmrc.berkeley.edu/frame/research/mpeg/ 
bulletQuicktime ... http://www.apple.com/quicktime/ 
bulletWindows Media ... http://www.microsoft.com/windows/windowsmedia/EN/default.asp 

 

Video File example 

AVI file format...Video File (click to download/show)...or

Vdemo.avi (234642 bytes)

Mouse over activates the video...

Details on the video clip...

bulletLength 1.265 seconds
bulletAudio: PCM,22,050 Hz, 8 Bit, Mono
bulletSize: 160 x 120 pixels
bullet19 Frames
bulletFrame rate: 15.032 Frames/Sec, 181 KB/Sec
bulletFormat: MS-CRAM

MPEG video clip (click to download and play)

bulletLength 7 seconds
bulletAudio: MPEG Audio
bulletVideo: MPEG Video

 

Common Video File Formats

The following formats are the most popular digital formats for web applications:

bulletAudio/Video Interleaved (.AVI) common PC/Windows format (can be played on Macs)
bulletQuickTime (.MOV) common Macintosh format (can be played on PCs)
bulletMPEG I, II (.MPG) -- becoming the de facto standard for the industry (especially with DVD growth).
bulletStreaming Video - streaming format (plays while loading) -- Microsoft streaming format (.ASF) and RealMedia are the most common.
 

Digital Video Characteristics

  1. Image size - width and height in pixels - typically frame sizes are 4:3 ratio 160X120, 240X180, 320X240, 640X480
  2. Frames per second (fps) (up to 30) - 5-10 frames minimum to 30 frames (full-motion)
  3. Color depth 256 colors (1 byte) to true color/16 million colors (3 bytes)

Formula to calculate uncompressed video size:

time * height * width * fps * bytes = filesize
add 1-10MB for digtial audio

1 minute of uncompressed digital video - 640X480, 30 fps, true color...

60 * 640 * 480 * 30 * 3 =  1,105,920,000 bytes

File sizes are mitigated by...
bulletReducing frame rate
bulletReducing frame size
bulletUsing compression ranges from 10:1 to 50:1 - various algorigthms such as Indeo, Quicktime, RLE, and MPEG

Codecs (compressor/decompressors) are specifications and code that are used to provide compression for raw digital video.  There are various techniques that are applied and depend on factors such as...

bulletLoss of data (e.g., frames) or degradation of images and audio tracks.
bulletAmount of compression (more compression means more loss)
bulletType of compression algorithm (e.g., run-length encoding, vector quantization, wavelet, frame-based, etc.).
bulletThe ability of the playback device (and delivery mode for that matter) to send and playback the data in realtime.

Typical digital video for multimedia: 1 minute, 320 X 240, 15 fps, true color, using compression...

(60 * 320 * 240 * 15 * 3) / 40 = 5,184,000 bytes

Summary of Techniques for Digital Video Compression

bullet

Image compression: take advantage of patterns of bitmaps in images (repeating color, sections of the image, etc.).   Similar to techniques used for run-length encoding in bitmaps, GIF (LZW), Discrete Cosine Transform and Huffman (JPG).  This technique was used extensively in older AVI formats.

bullet

Discrete Cosine Transforms: computationally intensive; images are broken down into coefficients that can be mathematically reconstructed.  Used extensively in MPEG I and II, H.261 and H.263 formats.

bullet

Discrete Wavelet Transforms: similar to discrete cosine transform but based on simpler functions that can be processed faster.  Uses a three-dimensional approach with inter-frame techniques are further used to increase compression.

bullet

Fractals: formulas are stored that define images based on subset portions of images.  Very computationally intensive.

bullet

Others: e.g., hybrid wavelet-fractal transforms, essentially variations of the above in combination. 

Detailed Format Descriptions

File Format Description
AVI (Audio Video Interleaved) (.avi format) An excellent resource on AVI technology is at...   http://www.jmcgowan.com/avi.html 

From Microsoft Corp.

AVI has been around since the early 90's.

The Microsoft Audio/Video Interleaved (AVI) file format is a RIFF file specification used with applications that capture, edit, and playback audio/video sequences.  In general, AVI files contain multiple streams of different types of data.  Most AVI sequences will use both audio and video streams.

The audio and video chunks in an AVI file do not contain time stamps or frame counts. The data is ordered in time sequentially as it appears in the AVI file.  A player application should display the video frames at the frame rate indicated in the headers.  The application should play the audio at the audio sample rate indicated in the headers.  Usually, the streams are all assumed to start at time zero since there are no explicit time stamps in the AVI file.  The lack of time stamps is a weakness of the original AVI file format.

The video data in an AVI file can be formatted and compressed in a variety of ways.  There are, and have been several compressors:

bulletIntel Indeo (version 3.2)
bulletMicrosoft Video 1
bulletMicrosoft RLE (Run Length Encoding)
bulletCinepak

Note: you can also save without compression (full-frame mode).

 

MPEG (Motion Picture Experts Group)

 

from: http://www.mpeg.org  

MPEG (Moving Pictures Experts Group) is a group of people that meet under ISO (the International Standards Organization) to generate standards for digital video (sequences of images in time) and audio compression.

following is from http://bmrc.berkeley.edu/frame/research/mpeg/mpeg2faq.html 

MPEG is a generic means of compactly representing digital video and audio signals for consumer distribution.  The basic idea is to transform a stream of discrete samples into a bitstream of tokens which takes less space, but is just as filling to the eye (…or ear). This "transformation," or better representing, exploits perceptual and even some actual statistical redundancies. The orthogonal dimensions of Video and Audio streams can be further linked with the Systems layer---MPEG's own means of keeping the data types synchronized and multiplexed in a common serial bitstream.

The essence of MPEG is its syntax: the little tokens that make up the bitstream.  MPEG's semantics then tell the decoder how to inverse represent the compact tokens back into something resembling the original stream of samples.  These semantics are merely a collection of rules (which people like to called algorithms, but that would imply there is a mathematical coherency to a scheme cooked up by trial and error….).  These rules are highly reactive to combinations of bitstream elements set in headers and so forth.

MPEG video is often quoted as achieving compression ratios over 100:1, when in reality the ratios are between 8:1 and 30:1.

There has been an evolution of standards for MPEG for example, MPEG-1 was optimized for CD-ROM or applications at about 1.5 Mbit/sec. Video was strictly non-interlaced (i.e. progressive).

The White Book specifies the file structure and indexing of multiplexed MPEG video and audio streams.  The specific MPEG parameter definitions of White Book are:

bulletAudio coding method: MPEG-1 Layer II
bulletSampling rate: 44.1 kHz
bulletCoded bit rate: 224 Kbits/sec
bulletMode: stereo, dual channel, or intensity stereo
bulletVideo coding method: MPEG-1
bulletPermitted sample rates:
bullet352 pixels/line x 240 lines/frame x 29.97 frames/sec (NTSC rate)
bullet352 pixels/line x 240 lines/frame x 23.976 frames/sec (NTSC film rate)
bullet352 pixels/line x 288 lines/frame x 25 frame/sec (PAL rate)
bulletMaximum bitrate: 1.1519291 bits/sec
bulletRecommendations include:
bulletpixel aspect ratios: 1.0950 (352x240) or 0.9157 (352 x 288)
bulletIntra pictures be placed at least once every 2 seconds.
bulletStill pictures: ("Intra" picture_coding_type only)
bulletNormal res: 352 x 240 or 352 x 288 (maximum 46 Kbytes coded size)
bulletDouble res: 704 x 480 or 704 x 576 (maximum 224 Kbytes coded size)

MPEG I and II standards use discrete cosine transform transforms for compression.

 

QuickTime (.mov format) from Apple... http://developer.apple.com/quicktime/ 

QuickTime is a cross platform system-level software package for Macintosh, Windows and Java which adds the capability to play movies, synthesize music, display animations, view virtual reality worlds and add multimedia capability to the computer desktop.

QuickTime is implemented as a set of extensions on the Macintosh platform and a dynamic-link library (DLL) on Windows. It can process video data, still images, animated images (also known as sprites), vector graphics, multiple sound channels, MIDI music, 3D objects, virtual reality objects, panoramas and text. Currently, more than 70 different formats can be imported or exported and as formats are added, applications created today will work with them automatically.  QuickTime is a generalized way to define time lines and organize information along these time lines.

 

 

Home ] Up ] Computer Architecture ] Programming Bootcamp ] Database Bootcamp ] Visual BasicS ] Web Basics ] Web Programming ] Advanced Web Topics ] Developing Web Sites ] XML Technology ] Web Glossary ]

Copyright © 1999 - 2005 
ThePlace - Written and Sponsored by Dave Hillman