Library:Bink Video
Appearance
| Developer | RAD Game Tools / Epic Games Tools |
|---|---|
| License | proprietary |
| Website | https://www.radgametools.com |
| On this wiki | Facts · Code · Notes · Topics |
RAD Game Tools' (now Epic Games Tools) video and audio codec runtime used in thousands of games; the data format is described on Format:Bink video (BIK, KB2).
Identification
- Files:
.bik,.bk2starting withBIKorKB2plus a revision letter, see Format:Bink video (BIK, KB2). - Runtime DLLs:
binkw32.dll(Bink 1, 32-bit) is confirmed by open-source code that replaces it (the C&C Renegade/Generals bink-sdk-stub, which maps_BinkOpen@8=BinkOpen@8etc.);bink2w64.dll(Bink 2, 64-bit) is confirmed by proxy loaders (DLLPluginLoader, whose bink2w64.def lists its exports). Seen in the wild but not confirmed in the code checked:binkw64.dll,bink2w32.dll. Many modern engines link Bink statically. - Exports: the 32-bit DLL uses stdcall decorated names with a leading underscore, e.g.
_BinkOpen@8(name, flags),_BinkClose@4,_BinkWait@4,_BinkDoFrame@4,_BinkNextFrame@4,_BinkGoto@12,_BinkSetVolume@12,_BinkCopyToBuffer@28,_BinkSetSoundTrack@8,_BinkSetSoundSystem@8,_BinkOpenDirectSound@4. The 64-bit Bink 2 DLL exports plain names (BinkOpen,BinkDoFrame...) about 73 of them, ordinal-sorted alphabetically in one SDK build (BinkOpen @28, BinkDoFrame @7), so ordinals are not stable across versions. See Fact:Bink Video/identification/binkw32 exports and Fact:Bink Video/identification/bink2w64 exports. - Typical playback loop: BinkOpen, then repeat { BinkDoFrame; BinkCopyToBuffer(handle, dest, pitch, height, x, y, surface flags); BinkNextFrame; while BinkWait } until the last frame, then BinkClose. The returned BINK handle starts with Width, Height, Frames, FrameNum, LastFrameNum, FrameRate, FrameRateDiv (32-bit each). Proxy DLLs (renamed original plus forwarding wrapper, Technique:DLL proxy loading) are a common way mods hook it.
- Audio tracks are one stereo/mono stream each; multichannel and multi-language soundtracks are several tracks with no channel layout information.
Related
Technique:Game audio and video middleware, Format:CRI USM.
Code & repositories
- https://github.com/TheSuperHackers/bink-sdk-stub @
f661603abeb4edace21a8a89ddd23587b76f0fc6· license: GPL-3.0-only (declared by the contributor for the files used; GitHub reports GPL-3.0 for the repository)
Null stub of the binkw32.dll subset used by C&C Renegade and Generals (GPL-3.0): bink.h prototypes and bink_mingw.def export names; read for names only.
Tested on: source read, not run: source read · checked 2026-10-18; last activity 2026-01-27
Evidence & references
- vgmstream commit db77f98f405a45ad08df98aa444cae3848f95e6c (ISC):
src/meta/bik.c.