@oscnord/get-video-resolution
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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 }

Package Sidebar

Install

npm i @oscnord/get-video-resolution

Weekly Downloads

4

Version

0.2.0

License

MIT

Unpacked Size

12.5 kB

Total Files

14

Last publish

Collaborators

  • oscnord