Skip to content

node-av / lib / stringToFourCC

Function: stringToFourCC()

stringToFourCC(str): number

Defined in: src/lib/utilities.ts:1349

Convert string to FourCC.

Converts a 4-character string to a packed FourCC integer.

Parameters

str

string

4-character string

Returns

number

Packed FourCC as unsigned 32-bit integer

Example

typescript
const fourcc = stringToFourCC("avc1"); // Returns 828601953 / 0x31637661