Skip to content

A Windows DLL interceptor for the Bink video codec that adds subtitle support, enhanced logging, and frame-by-frame playback control.

License

Notifications You must be signed in to change notification settings

dev-zetta/BikMod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BikMod

A Windows DLL interceptor for the Bink video codec that adds subtitle support, enhanced logging, and frame-by-frame playback control.

Version: 0.3f (Beta)

Overview

BikMod is a proxy wrapper around the native Bink video library (binkw32.dll) that intercepts and enhances video playback functionality. It adds the following features:

  • Subtitle rendering with automatic .srt file detection and multi-track support
  • Detailed logging for debugging video playback issues
  • FPS counter and performance diagnostics
  • Frame buffer management with GDI+ graphics support
  • Configurable feature toggles via INI file

Installation

  1. Locate your game's installation folder
  2. Rename the original binkw32.dll to binkw32_original.dll (BikMod will load this)
  3. Extract the BikMod archive to the game folder
  4. Run the game

Uninstallation

  1. Delete the BikMod binkw32.dll
  2. Restore the original DLL:
    Rename-Item binkw32_original.dll binkw32.dll

Configuration

All settings are controlled via binkw32.cfg (INI format). Common options:

General

[general]
show_fps=true           ; Display FPS counter during playback
version_check=true      ; Check for updates online

Subtitles

[subtitle]
enabled=true
search_ext=srt          ; File extensions to search for
search_path=./subtitle/ ; Directories to scan for subtitle files
placement_x=50          ; X position (percentage)
placement_y=90          ; Y position (percentage)

Logging

[log]
enabled=true
file=./binkw32.log      ; Output log file
debug=true              ; Log debug messages
call=true               ; Log Bink API calls

Font Properties

[font]
family=Arial
size=18
color=0xFFFFFF         ; White (BGR format)
outline_size=2
outline_color=0x000000 ; Black
right_to_left=false    ; For RTL languages

Subtitle Support

BikMod automatically searches for and displays subtitles during video playback.

Naming Convention

Subtitle files must match the video filename with language code and track index:

VideoFile.bik              → VideoFile_en0.srt   (English, track 0)
                          → VideoFile_en1.srt   (English, track 1)
                          → VideoFile_fr0.srt   (French, track 0)

Search Paths

Configure where BikMod looks for subtitles in binkw32.cfg:

search_path=./subtitle/,./,../subtitles/

Each video file can have multiple subtitle tracks, one per audio track.

Tested Games

  • Arcanum - Steamworks and Magick Obscura
  • Fallout: New Vegas
  • Hitman - Blood Money
  • Urban Chaos
  • Diablo 2
  • C&C: Red Alert 2

Known Limitations

  • DirectDraw fullscreen mode: Does not work properly in some DirectDraw games when running fullscreen (windowed mode works fine)
  • Single-threaded: Assumes per-video playback is single-threaded
  • 32 audio tracks max: Track state array limited to 32 tracks

Development

Architecture

BikMod is structured as a modular C++ DLL with clear separation:

  • bik_internal.hpp/cpp: Core state management (LocalData, FrameBuffer, GlobalConfig)
  • bik_descriptor.hpp/cpp: Function interception registry using decorated names
  • bik_subtitle.hpp/cpp: Subtitle loading and rendering (linked-list based)
  • bik_public.hpp: Bink API structure definitions
  • export.def: DLL export definitions with ordinals

For detailed architecture and development patterns, see Copilot Instructions.

Building

Requirements:

  • Visual Studio (C++ compiler, MSVC calling convention support)
  • CMFramework library (external dependency)
  • GDI+ SDK

Build Targets:

  • Debug|Win32: DLL with debug info
  • Release|Win32: Optimized DLL
  • Test|Win32: Console app for export validation
# Build Release DLL
msbuild bikmod.vcxproj /p:Configuration=Release /p:Platform=Win32

Output goes to D:\Games\Rage\binkw32.dll (configure in .vcxproj if needed).

Debugging

Enable debug options in binkw32.cfg:

[log]
enabled=true
debug=true
call=true

[subtitle]
debug=true   ; Extra subtitle rendering diagnostics

Check binkw32.log for detailed information.

Changelog

Version 0.3e (2011-04-21)

  • Added support for .bik files opened from archive or memory
  • Automatic filename generation from .bik file headers
  • Version checking with online update notification
  • Fixed frame copy crash in some cases
  • Minor bug fixes

Version 0.3c (2011-04-17)

  • Public beta release

License

See LICENSE.txt in the release folder.


Note: BikMod is a legacy project maintained for compatibility with older games. For modern video playback, consider native codec implementations.

About

A Windows DLL interceptor for the Bink video codec that adds subtitle support, enhanced logging, and frame-by-frame playback control.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published