
Mixing audio into a Bink file
Mixing audio interleaves the sound data into the video frames of a Bink file. Normally you won't need to do it, because the compressor carries the input file's sound track into the Bink as it compresses the video. The mixer is for replacing or adding a sound track afterwards - a new language, a music stem, 5.1 or 7.1 channels - or for taking a track out.
A Bink file holds any number of audio tracks, each with its own track ID, and a game can route each track to specific speakers at runtime. That is also how you put several languages in one Bink and pick between them when it plays.
To mix audio into a Bink file, highlight the Bink file and the sound file to mix in (hold down Control while clicking to highlight more than one file), then click "Mix in sound". The mixer window opens with these options. Click on a section of the screenshot for help on it, or use the links below.
For 5.1 or 7.1 audio, mix the mono or stereo input files - the "stems" in video editing terms - into different Bink track IDs, one at a time. Then tell your programmers the layout (track ID 0 is front left and right, and so on) and they direct each track to the right speaker at runtime - or use the simplified track routing layouts below, which the Bink player works out from the filename.
Jump to: Sound file | Output file | Frame rate | Sound settings | Buttons | Simplified track routing
Sound file to mix:
The sound file to put into the Bink - a WAV, or any other sound or video file the tools can read (the sound track of an MP4, for example). Use Browse to pick one from another folder. Enter "-" to remove the existing sound track instead of mixing one in.
Output file settings:
The Bink file to write; the input Bink isn't touched. Use Browse to pick a folder with your mouse, and check "Automatic overwrite?" when you don't want to be asked before an existing file is replaced.
Frame rate settings:
Override input frame rate: Relabels the output with a new frame rate (fractional rates are fine, and a negative number is milliseconds per frame). The frames are not changed, so the video plays faster or slower and the sound is laid against the new timing.
Sound settings:
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. Bink Audio reaches around 10 to 1 at level 4 without audible artifacts, so leave it at 4 unless you are squeezing a file for size.
Input from track: Which of the sound file's tracks to read, when it has more than one (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.
Mix into Bink track number: The track ID the sound goes into. Track IDs are entirely up to you - they don't have to be contiguous or in order. Mixing into an ID that already exists in the file replaces that track.
Extra switches: Anything you type here is passed to the mixer as command line switches - the "..." button shows the complete list. The useful ones: /StartFrame# pads the start of the sound with silence so it begins on that frame (a negative number is a millisecond offset instead); /Loop repeats a sound that is shorter than the video until the end; /AudioStartOffset# shifts the sound by milliseconds (positive drops that much from its start, negative adds silence in front); /NormalizePeak# normalizes the loudest peak to that many dB below full scale (1 if no number) - for one clip to be as loud as it can be without clipping; /NormalizeLoudness# normalizes to a loudness in LUFS below zero (16 if no number; 16 is the streaming standard, 23 broadcast, 18 to 24 matches most game mixes) - for many clips to sound the same volume; /InputForceType#, /InputForceRate# and /InputSkip# read a headerless raw sample file (or non-sound data, type 5) by telling the mixer its format, rate and how many bytes to skip.
Buttons:
Mix: Writes the output Bink.
Batch: Adds this mix, 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 Bink FAQ in your browser.
Mixing for simplified track routing:
Bink supports simplified track routing, which lets you set up and load your tracks at runtime with one call. To use this feature, you must use the exact Bink track layout that Bink expects. Here is a list of these layout options with more documentation in the Bink SDK docs:
BINKHLSNDLAYOUT_SIMPLE - this option tries to figure out what layout to use based on the substring searches of the filename of the Bink file.
If the filename ends in "_51", we use the BINKHLSNDLAYOUT_51 option.
If it ends in "_51L", then it uses BINKHLSNDLAYOUT_51LANGUAGEOVERRIDE.
If it ends in "_71", then it uses BINKHLSNDLAYOUT_71.
If it ends in "_71L", then BINKHLSNDLAYOUT_71LANGUAGEOVERRIDE.
Otherwise, we just play the single Bink track specified by the "tracks_start" parameter.
BINKHLSNDLAYOUT_LANGUAGEOVERRIDE - this option plays two tracks - the audio in track 0 (usually the background music/effects) and then also the track specified by the "tracks_start" value (which is usually the language track). So, you could do something like:
Track 0 - music
Track 1- English
Track 2 - German
Track 3 - French
And then use 'track_start' to select the language track based on user settings.
BINKHLSNDLAYOUT_51 - this option plays the 6 mono tracks starting at the track specified by the "tracks_start" parameter (by default, 0) into the systems. So, the simple setup is:
Track 0 - front-left
Track 1 - front-right
Track 2 - center
Track 3 - sub/LFE
Track 4 - surround-left
Track 5 - surround-right
But you can also do fully localized 5.1 tracks for multiple languages and use "tracks_start" to specify 0, 6, or 12 in a layout like this:
Track 0 - English front-left
Track 1 - English front-right
Track 2 - English center
Track 3 - English sub/LFE
Track 4 - English surround-left
Track 5 - English surround-right
Track 6 - German front-left
Track 7 - German front-right
Track 8 - German center
Track 9 - German sub/LFE
Track 10 - German surround-left
Track 11 - German surround-right
Track 12 - French front-left
Track 13 - French front-right
Track 14 - French center
Track 15 - French sub/LFE
Track 16 - French surround-left
Track 17 - French surround-right
Although most of the time for multiple languages, you don't bother localizing all 5.1 tracks and instead just do the center track and use the BINKHLSNDLAYOUT_51 option.
BINKHLSNDLAYOUT_51LANGUAGEOVERRIDE - this option plays the 6 mono tracks starting at the track 0, and then also one track specified by the "tracks_start" parameter mixing into the center track. So you use "tracks_start" to specify 6, 7, or 8 in a layout like this:
Track 0 - front-left
Track 1 - front-right
Track 2 - center
Track 3 - sub/LFE
Track 4 - surround-left
Track 5 - surround-right
Track 6 - English center language track
Track 7 - German center language track
Track 8 - French center language track
BINKHLSNDLAYOUT_71 - this option is similar to BINKHLSNDLAYOUT_51 but there is an additional two channels for back-left and back-right. The layout is as follows:
Track 0 - front-left
Track 1 - front-right
Track 2 - center
Track 3 - sub/LFE
Track 4 - back-left
Track 5 - back-right
Track 6 - surround-left
Track 7 - surround-right
BINKHLSNDLAYOUT_71LANGUAGEOVERRIDE - and this option is just like BINKHLSNDLAYOUT_51LANGUAGEOVERRIDE only there is an additional two channels for back-left and back-right.