Bongo: Video Encoder and Formats

This guide builds on concepts found in the Render the Animation guide.

Bongo Video Encoder Icon Bongo comes with a separate integrated video encoder application that can combine a sequence of rendered images into a single video file.

To use the video encoder to create a video from rendered frames:

  1. From the Bongo menu, choose Video Encoder.
  2. In the Video dialog box, enter the full path to the output file.

The file extension must be either avi, mpg, wmv or ogv. The encoder will determine which type of compression options to display depending on this type.

Render an animation with the Create video file option enabled, the Video Encoder dialog box appears when all of the animation images have been rendered and automatically compiles the video file.

Video Files and Codecs

To produce an avi or mpg file from a sequence of stills, Bongo uses a codec (compressor/de-compressor). There are many different codecs available and your computer will have many installed already. Codecs compress images into a single file removing information until they are small enough to be played at the correct speed. The quality of the output depends a great deal on the quality and type of the codec and the data rate (the speed the information is read from the file) and can vary from extremely poor to virtually perfect.

If you are writing to an mpg file, you will not have to worry about choosing a codec. MPG uses MPEG-1 compression that is very compatible and produces reasonable quality at a small size. You may still want to set the data rate. If you are writing to avi, you will need to consider carefully how to compress the video.

Choosing a codec is tricky. In addition to quality factors, you may need to take into account the size of the resulting file (determined mainly by the data rate) and the likelihood of it working on another computer. These are the three factors to consider when choosing a codec: quality, file size, compatibility.

In general, higher quality is possible only with increased size. The size of the output file can be estimated by this formula:

Size (kilobytes) = Data Rate x Run Time (in seconds)

Individual codecs will recommend a certain data rate to achieve a reasonable level of quality.

To set the video compression:

  1. From the Bongo menu, choose Render Animation.
  2. In the *Bongo Render Animation dialog box, under Video Output, check Create Video File.
  3. Chose a Video Type: avi, mpg*, *wmv*, *ogv* or *mp4*.
  4. Click Compression options.
  5. Choose the compression settings you want to use.
Please Note

Bongo does not come with codecs but uses what you have on your computer. Many codecs can be downloaded from the internet. A full discussion of codecs is beyond the scope of this document. More information on codecs can be found any various books and sites. For example:

Choosing a video format for your animation

Choosing a method of encoding your animation for video playback is one of the most complicated and difficult problems you will face when you first start producing video. In general, most of the basic choices are flawed in some one and you will always have to make some kind of compromise.

First,some basics. The output of any rendering software is a single image, usually some kind of bitmap. In order to create an animation from a rendering program, you will need to create a sequence of these images. Bongo’s BongoRenderAnimation command enables you to easily create this sequence ready to convert to a ready video format. However, it is not possible to view this sequence of images as a video until they have been encoded into one of the many video formats available.

It is crucially important to save the sequence of images once an animation is rendered because each type of video format throws away an enormous amount of data from the original renderings. Re-encoding a new video file from another means that you will reduce the quality each time you do it. This is especially true of older video formats such as Cinepak or Indeo.

Selecting a Format

Most video players are able to cope with a large number of video formats. However, it’s the differences that are important. The most important video players are:

Windows Media Player: Video for Windows (AVI)*, MPEG, Windows Media (WMV)

Apple Quicktime: Video for Windows (AVI)*, MPEG, Quicktime Video (MOV)

As you can see, MPEG and AVI are the common format. However, these formats are quite dated and have a number of problems associated with them. In addition, it is not possible to run Windows Media Player (and therefore WMV files) on an Apple Mac.

See also:

Video formats that the Bongo Video Encoder can create

Video for Windows (AVI)

The AVI file format is the format of the Video for Windows system - a rather out of date video platform. It is not actually a method of encoding video - in fact the format uses something called a “codec” (Compressor/Decompresor) which needs to be installed on both the machine doing the encoding and also on the machine doing the playing. This is the main problem with AVI since in general is it only possible to rely on some very old codecs being present on playback machines.

That said, there are some excellent modern codecs available - including the popular DivX (www.divx.com ). However, in order to use these you must download and install the codec on both the encoding and the playback computer. This is fine if you have access to both machines, but if you are distributing your video you will inevitably get into problems with users who don’t know how to view your animation.

It is best to avoid AVI completely unless you have complete control over all playback targets. That said, AVI is convienient since it can be produced automatically from Bongo.

DivX is also a good choice for transferring video to other formats (such as WMV or Quicktime) by re-encoding since it is very high quality. Don’t try this with other older AVI codecs - the quality loss will be dramatic.

Note that the open source XVid codec is also a popular choice for AVI encoding, but is less prevelent on computers. www.xvid.org

MPEG

MPEG is an evolving format supported by most players. The original MPEG1 format (supported by Bongo) is quite basic and only supports small image sizes and certain fixed frame rates. This limits its usablility somewhat, but if it fits your needs then this is an excellent format.

Modern MPEG4 video is very high quality - and is the technology behind DivX, Quicktime and WMV. However, tough licencing conditions have meant that the pure MPG format has never really caught on. It is tricky to find encoding software to produce this kind of video - however, high end programs such as Adobe Premiere should have no problem.

Windows Media (WMV)

Windows Media is another excellent high quality format. However, the WMV format is only supported on Windows - you won’t be able to play it (easily) on a Mac. That said, if your only target is Windows machines, you can be virtually guaranteed that any computer build during the last 8 years will play it - and many older ones too if they have used Windows Update to get the latest Windows Media Players.

The difficulty with this format is that you will need to use Windows Media Encoder - available as a free download from Microsoft - to produce these files from the original files. We have found that the best way of doing this is to re-encode from a DivX or Full Frames AVI.

OGV

Ogg is a free, open container format maintained by the Xiph.Org Foundation. The creators of the Ogg format state that it is unrestricted by software patents and is designed to provide for efficient streaming and manipulation of high quality digital multimedia.

Because the format is free, and its reference implementation is not subject to restrictions associated with copyright, Ogg’s various codecs have been incorporated into a number of different free and proprietary media players, both commercial and non-commercial, as well as portable media players and GPS receivers from different manufacturers.

MP4

MPEG-4 Part 14 or MP4 is a digital multimedia container format most commonly used to store video and audio, but it can also be used to store other data such as subtitles and still images. Like most modern container formats, it allows streaming over the Internet.

Re-compressing Video

If you have made a bad choice of codec or you want to compress your video for several different uses, you may want to use the video encoder in interactive mode (BongoVideoEncoder command) to re-write the avi* or *mpg** file. Because Bongo saves the entire output of the renderer in the single-frame sequence you can re-compress from the original data ensuring you get the best possible quality.

The Bongo video encoder cannot re-compress avi* or *mpg** files. You will need to use a third-party application to do this. Remember that re-compressing a video file such as an *avi** results in lower quality for every generation.

Bongo Video Encoder Dialog

Using the Bongo Video Encoder in Interactive Mode

Usually the video encoder will be launched automatically after completing rendering. However, in certain cases you may want to use the encoder on its own.

The Bongo Video Encoder takes a numbered sequence of images and writes either an avi, mpg, wmv, or ogv file, sets the frame rate, the start and end frames, and the compression options.

To start the video encoder:

  1. From the Bongo menu or toolbar, choose Video Encoder (or run the BongoVideoEncoder command).

Video Encoder Options

Source File: Enter the path to one of the images to be compressed or click Browse to select an existing file.

Target File: Enter the full path to the output file. The file extension must be either avi, mpg, wmv, or ogv.

Compression Options: Launches the preview and codec window. The codec, data rate, and other options can be set here. If compression options are not set, the encoder uses the last codec specified for the target file type.

First Frame/Last Frame: Enter the first and last frames from the image sequence to compress.

Frame Rate: The number of frames per second displayed by the video file. See also: Render the Animation.

Compress/Play: Click Compress to start compression. The Compress button will only be highlighted when all required fields are valid. The Compress button changes to Play when the compression is finished. The Play button will launch the video file in the associated media player.

Next Steps

Read the Object Properties guide.