Compressing with Bink
Bink is our latest video codec. It can scale from a tiny Nintendo DS up to the latest and greatest game consoles and PCs. It is used in hundreds of games every year.
Compressing with Bink is so easy - just highlight the file that you want to compress, and then hit the "Bink It!" button. The Bink compressor window will pop up, looking something like this. Click on the screenshot for help, or use the following links to get right to the help topic you need.
Output file settings:
Enter the filename that you'd like to compress to in this field. You can use the Browse button to choose from a directory with your mouse. Use the "automatic overwrite" switch when you don't want Bink to ask you if you want to overwrite the destination filename. Note that Bink doesn't overwrite the destination filename until compression has been completed, so if you choose to overwrite a file accidentally, you can save it by cancelling the compression before it is finished.
Compression settings:
Overall data rate options:
-
Compress to a data rate: This is the standard way to control the amount of compression Bink applies. Simply choose the output data rate that you want in bytes per second.
The data rate that you should use depends on mostly your target platform. Use this table to get a starting data rate, and then you can start moving the rate up or down depending on the quality and file size:
- Platform
- Data Rate
- Modern PCs and Macs faster than 1.5 Ghz (P4, Athlons, G5s, Intel Macs) 1280x720 HD video
- 1200000 to 1800000
- Slightly older PCs and Macs faster than 750 Mhz (P3, P4, P-Ms, Athlons, G4s or G5, etc) 640x480 video.
- 750000
- Microsoft Xbox 1280x720 HD video
- 1200000 to 1800000
- Microsoft Xbox 640x480 video
- 750000 to 900000
- Microsoft Xbox 360 1280x720 HD video
- 1200000 to 2200000
- Nintendo DS 256x192 video
- 50000 to 75000
- Nintendo Wii 640x480 video
- 750000 to 900000
- Nintendo GameCube 640x480 video
- 500000 to 750000
- Sony PlayStation 3 1280x720 HD video
- 1200000 to 2200000
- Sony PSP 480x272 HD video
- 400000 to 500000
- Sony PlayStation 2 640x480 video
- 500000 to 750000
- Old PCs and Macs: PIIs, old Athlons, old PIIIs, old G3s and G4s 640x480 video
- 450000
- Really Old PCs and Macs: Pentiums, AMD K6s, G3s 512x384 video
- 250000
Note that you don't have to use these rates! If your CD or DVD is close to being full, then you can always lower the data rate to make a smaller file. These listed are should just be a starting point for you.
- Compress to a percentage of the original: This is an alternative method of controlling the compression ratio. It tells Bink to create a final file size that is based on the original file size - for example, if you enter 50, then you will get a Bink file that is pretty close to half of the input video file size. This is a nice option for times when the disk space footprint is more important than the data rate.
Keep peak data rate under a:
Under a multiple of the overall data rate: This option tells Bink to keep the peak data rate under the specified number times the overall data rate. For example, the default value for this option is 3.0 and the default overall data rate is 650,000 bytes per second. That means the peak data rate will be 1,950,000 bytes per second (3*650000). Bink will never let the data rate exceed this value. Usually, you shouldn't have to change this option.
Under a specific data rate (in bytes): This option is an alternative method of controlling the peak data rate. This option tells Bink that the peak rate must never exceed this rate (bytes per second). Usually, you shouldn't have to change this option.
How many frames to preview during bandwidth allocation (2-64): This option controls how many frames Bink pre-analyzes to see if bandwidth can be borrowed for more difficult frames. For example, imagine an all black screen that suddenly flips to a full screen picture - Bink can steal the bandwidth from the easy-to-compress black frame and give it to the full screen picture frame (while never exceeding the peak data rate). This feature greatly improves Bink's output quality. Note that the higher the number that you choose for this setting, the more memory Bink will use while compressing. A good rule of thumb is to use 12 for CGI videos, and 8 for live video.
Compress video as grayscale: This option tells Bink to process the movie in grayscale, which gives you faster playback and better compression for grayscale movies.
Include input video's alpha plane: You can use this option to tell Bink to include the alpha plane from the original video. The alpha plane is a method of supplying transparency and translucency information. There are three options available: "include alpha plane and leave unchanged", "include alpha plane and convert to pre-multiplied alpha", and "include alpha plane, convert to pre-multiplied, filter, and then convert back to non-premultipled alpha".
You almost always want to use pre-multiplied alpha so that filtering behaves correctly, but Bink doesn't know if you have already converted to premultiplied format. These options let you set the exact alpha mode that your programmer or engine is using.
Key frame control:
-
At % changed: This option lets you control the frequency at which key frames are inserted in the video stream. Key frames are frames that don't rely on previous frames for decompression (they contain no delta-ed or inter-frame compression information). Key frames are very expensive for Bink both in decompression time and bandwidth, so you should usually try to avoid them.
Key at least every: Input a frame interval at which you want to have a key frame inserted. For a key frame insert every 100 frames, type 100 in this box.
Scaling compression: This option lets you use scaling compression to really shrink the size of your files. Most codecs use scaling compression internally, but Bink (and Smacker) allow you to control it explictly. Scaling compression takes a, say, 640x480 video and compresses it at 640x240 - then, at runtime, the Bink player stretches the video window back up to 640x480.
2x height doubled is scaling along the height - each scanline is doubled at playback time.
2x height interlaced is the TV-style (every other scanline is black) 2x height compression. This is faster at runtime than 2x height doubled.
2x width doubled is scaling along the width - each column of pixels is doubled at playback time.
2x width and height doubled is scaling along both the width and height - each column and each row is doubled at playback time .
2x width and height interlaced is scaling along both the width and height - each column is doubled and every other scanline is black. This is faster at runtime than 2x width and height doubled.
Hint Window: The hint window allows you to set specific data rates for each individual frame in the movie. With Bink's new preview mode, you won't have to use this window much, but if you've got a stubborn video file that just won't compress the way you'd like it to - you can always use the hint window to override with precise settings.
You enter data into the hint window in this order - Start frame, End frame, Data Rate, Peak Rate, Key frame? (0=no, 1=yes), Contrast adjustment, Smoothing adjustment, black clamp adjustment, brightness adjustment, and gamma correction. You separate each number with a space, and you can enter multiple lines by pressing Control-Enter.
Video settings:
Frame rate control:
-
Force (no adding or removing) to: Input a new frame rate for the output file with this option (fractional rates are ok). The RAD Converter will not duplicate or remove frames during conversion to achieve the new rate. This value is specified in frames per second. You can also specify this value in milliseconds per frame by entering it as a negative number. You'll need to set this option when you compress still images, which have a default rate of 10 frames per second.
-
Adjust (adds/removes frames) to: You can adjust to a new frame rate by duplicating or removing frames with this option. Say, for example, you had a 15 frames per second animation and you adjusted to 30 frames per second, then each frame of the movie would be processed twice.
You would end up with twice as many frames, but they'd playback twice as fast. This option can also be used to make easier-to-playback movies - if you have a 24 fps movie that Bink can't quite keep up with, just use this option to drop it to an easier 12 fps. The value is specified in frames per second. You can also specify this value in milliseconds per frame by entering it as a negative number.
Frame range: Use this option to control what sections and pieces of the input file are actually processed. The "Start" and "End" fields let you set the beginning and ending frame numbers of the range to convert. Note that even if you use the "Adjust (adds/removes frames) to" feature, these fields use the original, "un-adjusted" frame numbers. The numbers are inclusive, so, for example, a start frame of 5 and an end frame of 6 would make a two frame output file.
Frame size (cropping): The left, top, "Width", and "Height" options tell the RAD Converter to process only a sub-rectangle of each video frame. This is a handy tool for making cropped versions of your videos. If you are both cropping and scaling, the cropping takes place after the resize.
Frame Scaling (resizing): The "Width", and "Height" options specify what size to resize the input video frames to. The "scaling type" button allows you to choose the method of resizing: high-quality (bi-cubic interpolation - usually the best quality, but sometimes a little fuzzy), medium quality (bi-linear interpolation), and low quality (where the pixels are just dropped or duplicated). Usually, you should just stick with high-quality mode.
Contrast increase: This filter allows you to increase the contrast of a video. Increasing the contrast will make the blacks blacker and the whites whiter. This almost always improves compression because it will make "almost black" pixels fully black. The contrast range is 0 (no contrast increase) to 127 (maximum increase). A good default value is 8.
Smoothing percentage increase: This filter allows you to smooth out the video. Smoothing a video blurs the pixels together giving smoother and easier to compress video frames. The smoothing range is 0 (no extra smoothness) to 100 (maximum blur). A good default value is 3 percent.
Black clamp: This filter hard clamps the pixels to fully black when each of the color values are below the specified value. This is another way to force "almost black" pixels to become fully black. It's especially good for video captured titles. For most video, however, the contrast control is the best way to get black pixels looking nice and dark. The clamp range is 0 (no clamp) to 255 (all colors forced to black). A good starting value is 20.
Video de-noising: This filter will clean up video by reducing by running a de-noise filter across the image. It's a good way to increase compression when you have poor quality input files.
Video de-interlacing: This filter will clean up interlaced video that was captured from a TV source. De-interlacing video isn't a perfect process - there is no one right way to de-interlace video, so we provide several different techniques. The first is simple "blend" mode - this causes the even and odd fields of the video to be blended together. You can also select to weight either the even or odd fields more heavily with the "even and odd lines" radio buttons. The other de-interlacing techniques just use the even or odd fields by themselves - to do this, just select even or odd without the checking "blend".
Brightness adjustment: This filter lets you increase or decrease the brightness of the input video frames. The brightness control is a percentage where 100% is the existing brightness, 10% is 10 percent of the existing brightness (or 10 times darker), and 200% is twice as bright.
Gamma correction: This filter lets you increase or decrease the gamma of the input video frames. Gamma is kind of like non-linear brightness - that is, the entire spectrum isn't all brightened by the same amount. The gamma correction range is from 0.0 (completely dark) to 1.0 (the existing level of gamma) to above 1.0 (which brightens the pixels). Gamma correction is usually used to adjust a Mac-authored movie that plays too dark on a PC. A gamma of 1.4 is usually about right for converting the gamma of a Mac input file to the same level of PC brightness.
If you have a movie that looks good on the PC and you want to use it on a TV (like, through a game console), then you need to adjust the gamma (or the movie will be too bright and washed out). Use a factor of 0.88 to covert from PC gamma to TV gamma.
Audio settings:
Compression level: This option controls how much audio compression Bink applies. Bink's powerful audio codec is capable of up to 10 to 1 compression in perceptually lossless mode (which basically means you can save a ton of space in your audio tracks without hearing any compression artifacts). Quality level 4 is perceptually lossless on most files, and many files can even use a setting of 5 or 6. Settings of 9 and higher get pretty noisy.
Convert to rate/format: These settings let you convert the sound format as it is compressed into the Bink file. They are there for your convenience, but for maximum quality, you should always start with original high-quality recordings. The RAD Converter can convert a 22 Khz file up to a 44 Khz file, but it can't make it magically sound any better that the original 22 Khz
Bink Tips:
- Use the Contrast filter to darken the blacks in your videos - this will give better looking compression and will look nicer too. A good starting range is 8 to 16.
- Use the data rate table above to pick a appropriate starting data rate.
- If you are compressing for TV output, make sure your gamma is set correctly for your video.
- Use the Smoothing filter to smooth your videos slightly when compressing. This will usually give better compression. Start with a smoothing value of 3 percent.
- Put our Preview feature to work for you! The Preview button lets you play the Bink video up to the most recently compressed frame. That means you can look at the frames that have been compressed before Bink is done with the whole file! You can avoid wasted time if you use this button to check out compression settings "real-time", rather than waiting for long periods only to discover that you've got a compression setting that you don't like.
- Note that you can also stop the compression process at any time and simply keep the frames that have been completed up to that point.
- If you want to test a lot of difference settings, use the start and end frame options just to experiment on a portion of the video (so you don't have to wait for the entire video to finish).
- The Bink compressor is massively multi-threaded. Every extra CPU core will linearly speed up the compression. Quad-core CPUs are a good bang for the buck in this regard.