Thanks to visit codestin.com
Credit goes to github.com

Skip to content

blennies/unbikit

Repository files navigation

unbikit
Conventional Commits badge
isomorphic TypeScript PNPM badge

Caution

This package is at a very early development stage. Expect major API changes!

A decoder for .bik video files that can be used to play or transcode videos.

Features

  • Supports Bink 1, revisions c to i inclusive
  • Handles demuxing and decompression of audio and video streams
  • TypeScript/JavaScript only (no WASM or native code)
  • Uses Web Streams API for efficient reading of video files
  • Isomorphic
    • runs on client/server runtimes that support at least ES2022
    • can be run with older runtimes by using the syntax lowering feature of some bundlers

Limitations

  • No support for Bink 2 or for revision b of Bink 1
  • Some image corruption has been observed for a small proportion of videos

Getting started

To install the decoder:

npm install unbikit

To use it:

import { BikDecoder, type BikFrame } from "unbikit";

let stream: ReadableStream;
// ... assign a source to the stream
const decoder = await BikDecoder.open(() => stream);
let frame: BikFrame | null;
while ((frame = await decoder?.getNextFrame())) {
  // ... process frame
}

TODO: Add more installation instructions and more detailed usage instructions/examples

Development

This section is intended for code contributors to this project.

First, ensure that you have pnpm and Node.js installed in your development environment.

To install dependencies:

pnpm install

To run linting/formatting/type-checking:

pnpm check

To build for production:

pnpm build

To build and view the documentation:

pnpm build:docs
pnpm preview:docs

Verification is performed by the CI flow for all pull requests before they can be merged to the main branch. Commit logs are checked for Conventional Commits compliance as part of this flow.

References

Sources of reference material about decoding the .bik format:

License

This software is distributed under Apache License (Version 2.0) or MIT License terms, at your option.

See LICENSE for details.

SPDX-License-Identifier: MIT OR Apache-2.0

Bink Video Licensing

The .bik file format is a proprietary format used by Bink Video, developed by Epic Games Tools (formerly RAD Game Tools). The redistribution of Bink Video files may require an additional license from Epic Games Tools. More information can be found in their Bink FAQ.

About

Decoder for .bik video files that can be used to play or transcode videos.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •