indiWiz.com
SiteSearch:
Jump:

Site Map | WizTools.org | jCraze Blog
Web Developer's Den!
Home : WDD : Multimedia
This Article...
Print Version
Add Comment
View Comments
Multimedia
Golden Graphic Tips
Anti-alias
Fonts And Graphics
Graphic Formats Compared
Graphic Formats Tested
Animation Basics
Animation and HTML
Animation: Compression
Animation: Mini - FAQ
Animation: Downloads
FreeHand: Text in a Path
Streaming Audio
Sub-Sections
Flash5
Sections

Commniquè
Sign Guestbook!
Read Guestbook!
MailMe!

Compression

Compression means 'reducing the file size'. Without compression video files take a lot of space. Size matters in the web & even otherwise. Thus if you want a smaller video you have to compress your video using any of the various compression codecs available.

Types

Intra-frame compression: In this method each frame is compressed individually. Consider for example, if the color information in a video frame is represented by the following:
BBBBBCCC
After intra-frame compression the same data may be represented by:
5B3C
Suppose if each character is represented by one byte, the video file before compression takes 8 bytes, & after compression it takes only 4 bytes. While playing this file the video decoder (like QuickTime player or Windows Media player) decodes 5B3C to mean BBBBBCCC.

Inter-frame compression: In this method a key-frame is selected at a regular interval, say, every 5 frames. Every other frame is compared with the key frame & only the difference between them is stored. Consider this example, where 'I' & 'II' represent two different frames:
I:BBBBBCCC
II:BBBBCCCC
Both these frames take 16 bytes. Now after compression it looks like:
I:BBBBBCCC
II:    C   
Frame 'I' is taken as key-frame & it is compared with frame 'II'. Now frame 'II' is altered in such a way that only the difference between both these frames are stored. Thus now these frames take only 9 bytes. There is a saving of 7 bytes. A general rule regarding inter-frame compression: Higher the frequency of key-frames, better the video quality & more the size of file. That is, if you want to reduce the size of your video, just reduce the frequency of key-frames (ofcourse, at the price of quality!). Eg. If every 3rd frame is a key frame, reduce the frequency so that every 5th frame now is the key frame. The size of your animation should have reduced.

Some Well-known Compression Codecs

Inter-frame
  • Cinepak
  • H.261
  • H.263
  • Intel Indeo® Video
  • Sorenson Video
Intra-frame
  • Planar RGB
  • Photo JPEG
  • Motion JPEG A
  • Motion JPEG B
  • Component Video

Which Codec to Choose?

This actually depends on your need:

For Web Pages: You may choose from Cinepak or Photo JPEG for maximum cross platform compatability. Photo JPEG is good for short videos where you don't want any compromise on quality. But the Intel Indeo® Video is a better choice if your audience is PC & Mac users with the latest softwares.

For Video Capture: For video capture it is better to choose from intra-frame compression codec. Among the inter-frame codecs, never choose Cinepak. This takes longer to compress your video.

Video Conference: H.261 was specifically developed for video-conference. H.263 is an improvement over H.261.


User Comments

Add Comment

[Quick Stats: Number of main threads: 0, Number of sub-threads: 0]

Sign Guestbook | Who is Subhash?
The contents of this site are copyright© 2000-2008, indiWiz.com. All Rights Reserved.