Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 572 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 572 Bytes

Get video resolution

Get the dimensions (width and height) of a video. Can be a local video or a video stream.

Requirements

ffprobe

To be able to extract the video dimensions ffmpeg/ffprobe needs to be installed.

MacOS:

brew install ffmpeg

Ubuntu:

sudo apt-get install ffmpeg

Usage

import { getVideoResolution } from "@oscnord/get-video-resolution";

const resolution = await getVideoResolution('https://www.example-stream/manifest.m3u8');
console.log(resolution); // { width: 1920, height: 1080 }