ff-helper
TypeScript icon, indicating that this package has built-in type declarations

0.6.1 • Public • Published

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

Package Sidebar

Install

npm i ff-helper

Weekly Downloads

3

Version

0.6.1

License

MIT

Unpacked Size

4.03 MB

Total Files

18

Last publish

Collaborators

  • magicdawn