Convert digital video file formats

 
   

 

Fx Video Converter
  Features
  Batch Converter
  Download Free
  Order $30.00
  Replacement CD $9.50
  Requirements
 
Tutorial
  Getting Started
  Animation Basics
  AVI Source Movies
  Codecs and compression
  Converting to AVI/MPEG-4
  Converting to MPEG
  Converting to Real Media
  Converting to Win Media
  MPEG Source Movies
  Selecting a Source
  Selecting a Target
  Technical Support
  Troubleshooting
  TV Standards
  Windows Media Source
   
   
   
   
Pad File
   
   
 

 

Multimedia Basics - Animation

Animation is a sequential series of still images that create an illusion of motion.

In the examples on this page we're working with animated GIF files with a transparent background.

The rabbit example is a slide show where frames are held on the screen for specified periods of time that range from 10/1000 to 100/1000th of a second.

 

To create the most convincing illusion of motion frames should be played at movie speed of 30 frames per second. Unfortunately, that tends to create a very big file. The skeleton example below holds the frames for 100/1000th of a second producing a 66KB file.

 

   

Aside from the obvious problem of disk space, file size can have an impact on playback quality as well. When your computer plays a movie or animation sequence it will load as many frames as possible into memory and then fetch the next frame as it plays one. This technique is called cached sequencing.  To create smooth playing animations you must consider the complexity and size of each frame as well as the color depth and number of frames per second. Only the very fastest of modern desktop computers can play back full screen, 24 bit color video at 30 frames per second.

Movies

Unlike an animation that we can create from drawings or images a movie is generally created by a photographic process and converted or ported to a computer so that each frame has data stored in every pixel. As we discussed in the animation lesson, a computer's resources can be sorely taxed by dense video; but movies also have the added element of sound making them even more resource demanding. You already know the basics of computer generated movies because they are no more than an array of still images synchronized with a sound file. The synchronization is accomplished using key frames and the playback computer's onboard clock.

To reduce the size of a movie's footprint various compression techniques are employed. Video compression often uses the removal of redundant pixels as a vehicle for reducing data size.

To illustrate that process we're going to use a GIF animation (which could just as easily be a 29 frame movie file). The GIF file uses the technique of removing redundant pixels to reduce the footprint on the server and the load time of each frame but it runs in the browser making the overhead and encumbrance of a movie player unnecessary.
Of the 29 frames making up the fish tank animation, the first frame (right) is the only frame that contains all the data. This is the first and only key frame of this sequence.
Frame 2 (below) contains only those pixels that are different than those in the key frame. In this case the only movement is water shimmer and one goldfish beginning to appear from behind the castle. There are perhaps only half as many colored pixels in the frame. Frame 3 (below) is more shimmer and the fish moving further to the left.
With each subsequent frame you will see that only the changed data has been written to the frame data.

If we convert the above GIF to an AVI it will be very small but it won't load into most editors and Windows Media Player will fail when trying to fast forward since there is only one key frame. We could of course partially solve that problem by adding the first frame as frame 30 and then setting frame 30 as another key frame but fast forward would move to the end and fast rewind to the beginning.

You may be asking yourself why a tutorial would be showing you how to create a movie that crashes everything that tries to load it. The answer is to show you how easy it is to do and to point out how important key frames are to the software that plays or edits your movies. Without a key frame at every scene change and at reasonably spaced intervals, the player or editor has to load all the frames just to get a complete picture.

Similar to the above illustrations, MPEG movies use 16 pixel x by 16 pixel data squares then removes "generally" redundant squares instead of redundant pixels.

The below left image represents one 256 pixel square in the center of the below right image.

Expanded we can see each of the 256 pixels in the 16 by 16 square.

Whether or not this square would be "generally" redundant depends entirely upon the codec's settings. Some codecs that have quality/speed settings might include this square when the quality was set high but exclude it otherwise.

The technique of removing generally redundant squares produces very high compression. As you might imagine in a scene where only the faces of two people talking to each other only those squares around the speaker's mouth would need to be copied to the next frame. However, since only the changed squares are carried from one frame to the next you don't have a complete picture so a key frame that contains all the data is inserted periodically.

Let's try to examine this another way. If we select frame 5 in a movie that has no key frames we must also load frame 1, 2, 3, and 4 then stack all the squares to create frame 5. The problem here is that without key frames you can't select the exact point from which to watch the movie. That is, you can't watch half a movie and then come back later and simply fast forward to the last frame you saw because there's no reference point to key on.

   

The top row of the images above represents frames 1 through 5 in an uncompressed AVI file. Notice how each frame is a complete picture. The next row represent the same frames from an MPEG file. As you can see, frames 1 and 5 are Key frames showing a complete picture, but frames 2, 3, and 4 contain only the bits of information (delta frames) that are different from the previous.

A key frame should be added every few seconds (typically 5 to 10 seconds) and when a scene changes in order to track the position of the movie. In MPEG encoding key frames are called I-Frames or Intra-frames while half-frames which contain the formula to reconstruct missing frames from the differences  are called B-frames (backward frames - behind the keys) and P-frames (predicted frames - preceding the key).

Because key frames are full pictures they obviously hold much more information than partial frames so the more key frames, the bigger the movie. Keep in mind that when you split an MPEG file between key frames video for windows players will not be able to reconstruct the movie frames until they reach the next key frame.

Movie size on disk and in memory depends upon the video playback window size, the frame rate (how many frames are played in each second), the audio sample rate and size and the codec used to encode the file.

Below is a table representing a 30 second clip from a movie captured from VHS saved at various sizes with different codecs and settings.

Width

Height

FPS

CODEC

Color

Depth

Audio

CODEC

Audio Sample Rate

Audio Sample Size

Mono Stereo

Total File Size

W=320

H=240

15 Sorenson 32 Bit

Millions

IMA 4:1 22.05 kHz 16 bits mono 2.8 MB
W=240

H=180

15 Sorenson 32 Bit

Millions

 

IMA 4:1 22.05 kHz 16 bits mono 1.7 MB
W=240

H=180

.53 Sorenson 32 Bit

Millions

 

Qdesign Music 2 8 kHz 16 bits mono 108 KB
W=160

H=120

15 Sorenson 32 Bit

Millions

 

Qdesign Music 2 22.05 kHz 16 bits mono 536 KB
W=320

H=240

15 Cinepak 32 Bit

Millions

 

DVI IMA 22.05 kHz 16bits mono 2.7 MB
W=160

H=120

15 Cinepak 32 Bit

Millions

 

DVI IMA 22.05 kHz 16 bits mono 1.7 MB
W=320

H=240

 

15 MPEG-4 32 Bit

Millions

Microsoft

IMA

ADPCM

22.05 kHz 16 bits mono 4.6

MB

W=320

H=240

 

30 MPEG-4 32 Bit

Millions

Windows

Media

22.05 kHz 16.bits stereo 1.8

MB

IPB recording.

An I-frame (Intra coded frame) contains all the data necessary to paint a complete video frame. Video encoded as I-frame only poses no restrictions on video editing insofar as cuts can be made at any frame of the file but it is very large.

As in the above examples where compression is accomplished by removing the redundancy the incomplete frames are called P-frames (Predicted frames).

If a movie was constructed of only P-frames moving objects might reveal some unwanted data from a previous pictures (called artifacts) so B-frames (Bi-directional frames) are created from preceding- or later I- or P-frames.

An I-frame followed by a succession of B- and P-frames is called a GOP (Group Of Pictures). A typical broadcasting GOP has the structure IBBPBBPBBPBB.

 

 

 

 

Copyright 1995-2008 J. Hepple, Inc. DBA Fx, Sound & Magic

Fx, Sound & Magic and Fx Video Converter are trademarks of J Hepple, Inc.

Developer Member

OISV - Organization of Independant Software Vendors - Charter Member