
Compressing with Smacker
Smacker was our first video codec, released in 1994. It makes 256-color (8-bit) videos and is included for legacy and extremely low-end projects. In almost every case you should be using Bink.
That said, compressing with Smacker is simple - highlight the file you want to compress and hit the "Smack" button. The Smacker compressor window opens, looking something like this. Click on a section of the screenshot for help on it, or use the links below to jump to the topic you need.
Jump to: Output file | Frame rate | Frame control and filters | Palette | Audio | Advanced | Buttons
Output file settings:
Enter the filename to compress to in this field, or use the Browse button to pick a folder with your mouse. Check "Automatic overwrite?" when you don't want to be asked before an existing file is replaced. The destination isn't overwritten until the compression completes, so an accidental overwrite can be saved by canceling before it finishes.
There is no data rate field on this window: Smacker picks a data rate suited to the video by itself. To set one, add a Data rate override entry to the filter list - with a blank frame range it applies to the whole movie. A data rate of -1 is lossless: the palettized frames are stored without any further lossy video compression (the palette conversion and the filters still apply).
Frame rate settings:
-
Override input frame rate: Relabels the output with this frame rate (fractional rates are fine) without adding or removing any frames, so the same frames play faster or slower. Enter a negative number to give the rate in milliseconds per frame instead. You need this when you compress still images, which default to 10 frames per second.
-
Convert to output frame rate: Changes to this frame rate by duplicating or dropping frames, so the movie runs for the same length of time. A 15 fps animation converted to 30 fps has every frame processed twice; a 60 fps capture converted to 30 fps keeps every other frame. Frame lists in the filters below still count the input's original frames.
Frame control and filter settings:
The list in the middle of the window is a pipeline: every entry runs on each frame, in the order shown, top to bottom. Click Add... to pick an entry from the menu, Edit... to change the highlighted one, Up and Down to reorder, and Delete to remove. The order matters - crop before scale and you scale the cropped area, scale before crop and you crop the scaled frame. The one exception is Include frames: there is only ever one, it stays at the top of the list, and adding it again edits the existing entry.
Frames to affect: Most entries have a frame range at the bottom of their dialog (the flips and rotations have no dialog and always apply to the whole movie). Leave the range blank to affect the whole movie, or enter frames and ranges separated by spaces, like 1-4 8 100-e. s is the first frame and e the last; s10 is ten frames in from the start and e10 ten back from the end, so e9-e is the last ten frames. A range can also be in seconds: t5.5-t10 is the frames shown from 5.5 s up to 10 s, and te30-te the last thirty seconds. Frames are numbered as in the input file, before any Include frames entry and before any frame rate conversion. You can add the same filter several times with different ranges and settings - a gentle smooth on the whole movie and a stronger one over a noisy section, for example. Where two data rate entries overlap, the one lower in the list wins; filters all run.
Include frames: Reads only the listed frames from the input and skips the rest, sound included (this is the one entry that needs a frame list). Use it to compress a section of a movie, to cut out a slate or a tail, or just to try settings on a short piece before you commit to the whole file. The other entries still count frames as they were before this skipping.
Data rate override: Sets the data rate for a range of frames - either in bytes per second (at least 1000; 0 is the automatic rate, -1 is lossless), or as a percentage (1 to 200) of the input file's average data rate. Without one of these, the compressor picks a rate suited to the resolution and frame rate automatically. The usual way to work is to compress once at the automatic rate, look at the result (and at the analyzer), then add an override to move the whole movie up or down, or just a troublesome section. An entry with a blank range is the data rate for the whole movie.
Key frame data rate override: Caps the peak data rate - the burst a key frame or a hard scene change is allowed - either as a multiple of the data rate (1.0 to 10.0, normally 3) or in bytes per second. Peak rate is what a streaming device has to keep up with; lower it if playback from a slow device stutters at scene changes, and leave it alone otherwise.
Key frames: Makes the listed frames key frames - frames that don't depend on the frames before them, so playback can start or seek there. Give a count to make one key frame every so many frames within each range instead (100 for one every hundred frames). Key frames cost bandwidth and decode time, so only add them where you need to seek or loop.
Crop: Keeps the part of the frame starting at left, top and width by height pixels big. Any field can be left empty - an empty left or top starts at the frame's edge, an empty width or height keeps everything out to the right or bottom edge.
Pad: Centers the frame on a black frame of this size, letterboxing or pillarboxing it. A side left empty keeps its size; a size smaller than the frame crops the middle out instead.
Scale: Resizes the frame with a high quality resampling filter. Each side is a size in pixels, 0 to keep the aspect ratio from the other side, or a negative number for a multiple of the current size (-2 is twice, -0.5 is half). -1 means the movie's original size, before any filter. Set one side or both.
Point sampled scale: The same sizes, but pixels are duplicated or dropped rather than resampled. Use it for pixel art and for exact integer scales where you want hard pixel edges rather than a smooth resize.
Flip horizontally / Flip vertically: Mirrors the frame left to right, or top to bottom. These have no settings, so they are added straight to the list.
Rotate left / Rotate right: Turns the whole movie a quarter turn, swapping its width and height.
Smooth: Blurs the frame by a percentage. 1% is enough to remove the invisible high frequency detail that costs bits for nothing, which makes the video compress much better - a slightly smoothed video is a much smaller file at the same quality. 100% is extremely blurry.
Bilateral denoise: Averages each pixel with the neighbors that look like it, so grain, noise and dither smooth out while edges stay sharp - usually a much smaller file with no visible change. Strength is how different a neighbor may be and still count (0.02 gentle, 0.05 typical, 0.1 strong); radius is the reach in pixels, 1 to 8 (2 typical). Leave a field empty for the typical value. This is the first filter to reach for on camera footage.
Temporal denoise: Blends each pixel toward the same pixel of the previous frame when it barely changed, so noise that flickers from frame to frame averages away and the video compresses much better. Anything that moved is left alone. For grainy camera footage - on clean, noise-free renders it has nothing to remove and can make the file bigger. Strength is how much a pixel may change and still count as noise (0.01 gentle, 0.03 typical, 0.06 strong).
Deinterlace: Keeps one field - the even or the odd lines - and fills in the other from it, so interlaced video loses its comb teeth. Blending averages the two fields instead of taking one.
Contrast: Boosts the contrast - the darks get darker and the brights brighter, stretching about the middle. 0 changes nothing, 0.03 is a mild boost, 0.1 is strong, 0.25 very strong (0.5 is the most). A mild boost pushes almost-black pixels to black, which compresses better and usually looks better too.
Black clamp: Everything at or below this level (0 = black, 1 = white) becomes black. 0 changes nothing; 0.1 kills the noise in the darkest tenth, which helps compression. Good for dark scenes and captured titles where the black isn't quite black.
Brightness: Multiplies the brightness: 1.0 changes nothing, 0.5 is half as bright, 2.0 twice as bright (anything over white clips). Give an end multiplier too for a fade: each frame range runs from the start value to the end value, so 0 to 1 over s-s29 fades the first thirty frames in from black, and 1 to 0 over e29-e fades the last thirty out.
Gamma: Bends the brightness curve between black and white, which stay put: above 1.0 lifts the midtones (1.2 is gentle, 2.0 strong), below 1.0 pushes them down (0.8 gentle, 0.5 strong). 1.0 changes nothing.
Saturation: Scales how far every color is from gray: 1.0 changes nothing, 0 is black and white, 0.8 is a little muted (which also compresses a little better), 1.3 is vivid.
Palette settings:
Smacker video is 256 colors, so every frame is drawn from a palette. These settings control where the palettes come from and how the input is reduced to them. The defaults keep an 8-bit input's own palette and build optimized palettes for high-color input, which is what you want nearly all of the time.
Use palette from: "The input file" builds the palette from the frames themselves (or keeps the input's palette if it has one). "File:" remaps every frame to the palette of a graphics file you name - use it when the video has to share a palette with the rest of a screen.
New optimized palette every how many frames: How often a fresh palette is computed for high-color input. Blank computes one palette for the whole movie, which avoids palette changes; a number makes a new palette at that interval, which tracks the colors of changing scenes better at the cost of a palette switch (and a bigger frame) each time.
Palette entries:
- To use: How many colors the new palettes have (up to 256). Use fewer when the video has to leave palette entries free for a user interface drawn around it.
- To begin at: The first palette index the new palette occupies; by default it is centered in the palette.
- To rotate: Leaves this many palette entries free and rotates new palettes through them: with 128, the first palette uses entries 0 to 127, the next 128 to 255, and so on. This lets palettes change without the previous frame's colors being disturbed on 256-color displays.
Windows system colors: Whether the first ten and last ten palette entries are reserved for the Windows system colors. "On new palettes" (the default) reserves them only when a new palette is created, "Always" also overwrites them in an 8-bit input's palette, leaving the middle 236 colors alone, and "Never" uses all 256 entries.
Perform halftoning: Halftoning dithers smooth 24-bit gradients so that they look right in 256 colors. Smacker halftones selectively, only in the areas of a frame that need it. "On high-color" (the default) halftones high-color input and leaves 8-bit input alone; "Always" and "Never" override that. Short or low-color inputs can be a little smaller with halftoning off.
On 8-bit input file: What to do with an input that already has a palette. "Use existing palette" (the default) uses the input's palette rather than calculating a replacement, on the assumption that you already built the palette you want (Smacker stores palette colors with six bits per channel). "Create new" builds one optimized palette for the whole file, and "New on changes" builds a new one whenever the input's palette changes.
Audio settings:
Compress audio: Check this to carry the input file's sound into the Smacker file. The sound is compressed with Bink Audio, which sounds better and compresses far better (around 10 to 1 at level 4) than the original Smacker audio codec. If you must have the old codec for a legacy player, put /SmackerAudio in the extra switches field.
Compress level: How hard Bink Audio compresses: 0 is the biggest file, 4 the best trade-off and perceptually lossless on most material, 6 very lossy.
Input from track: Which of the input file's audio tracks to use (0, the first, by default).
Convert to rate: Resamples the sound to this rate (48000, 44100, etc.) as it is compressed. Start from a high quality recording - resampling can't add anything that wasn't recorded.
Advanced settings:
Set scaling compression options: Compresses the video at half height and lets the player stretch it back, which shrinks the file a lot. "Interlaced" plays back with every other line black, TV style, and is the fastest to draw; "Doubled" plays back with each line doubled. "No scaling compression" (the default) compresses every line.
Ring frame: Adds a copy of the first frame at the very end that holds only the differences from the last frame, so a looping animation wraps around smoothly instead of paying for a full first frame on every loop.
Auto key frame when this % changed: Promotes a frame to a key frame when at least this much of it changed from the previous frame, so a scene cut becomes a seek point. Key frames cost bandwidth, so keep the percentage high. To put key frames at fixed places, use a Key frames entry in the filter list.
Frames to preview for bandwidth allocation (2-64): How many frames ahead Smacker looks when it decides where to spend bandwidth, so bytes the easy frames didn't need go to the hard frame that follows them, while never exceeding the peak rate. More frames means better allocation and more memory while compressing. A good rule of thumb is 12 for CGI and 8 for live video.
Extra switches: Anything you type here is passed to the compressor as command line switches, so the whole command line interface is available from the window - the "..." button shows the complete switch list. Besides the ones above: /AudioStartOffset# shifts the sound by milliseconds, /NormalizePeak and /NormalizeLoudness normalize the sound, and /CPUs# limits the number of threads.
Buttons:
Smack: Starts the compression. You can preview the frames compressed so far while it runs, and stop at any point and keep what has been done.
Batch: Adds this compression, with all of its settings, to the RAD Batch Editor instead of running it now.
Defaults: Puts every setting on the window back to its default.
Help and FAQs open this page and the FAQ in your browser.