ff-helper
v0.6.1
Published
ffmpeg helper by napi-rs binding
Downloads
9
Maintainers
Readme
ff-helper
ffmpeg helper by napi-rs binding
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
License
the MIT License http://magicdawn.mit-license.org