ff-helper

ff-helper

ffmpeg helper by napi-rs binding

Build Status Coverage Status npm version npm downloads npm license

Install rust toolchain

This binding will link against system installed ffmpeg(libavcodec libav*).
It will run cargo build when install, make sure you have rust toolchain installed.

Install ffmpeg lib

macOS

brew install pkg-config ffmpeg nasm

On Debian-based systems

apt install -y clang libavcodec-dev libavformat-dev libavutil-dev pkg-config

more see https://github.com/zmwangx/rust-ffmpeg/wiki/Notes-on-building

Install

$ pnpm add ff-helper

API

see typedoc https://magicdawn.github.io/ff-helper/

get video info

export declare async funciton getVideoInfo(file: string): Promise<VideoInfo>;

export interface VideoInfo {
/** degress, 0-360, counterclockwise */
rotation: number
/** millseconds */
duration: number
width: number
height: number
}

Changelog

CHANGELOG.md

License

the MIT License http://magicdawn.mit-license.org