Skip to content

Function: parseMp4Meta() ​

ts
function parseMp4Meta(bytes): VideoMeta;

Reads a video's duration and pixel dimensions from an MP4's moov metadata, without decoding the stream. Best-effort and dependency-free. Throws when the boxes are not found so the caller can supply the values instead.

Parameters ​

ParameterType
bytesUint8Array

Returns ​

VideoMeta

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.