https://github.com/magicdawn/ff-helper
ffmpeg helper by napi-rs binding
https://github.com/magicdawn/ff-helper
ffmpeg ffmpeg-binding node-ffmpeg-api
Last synced: 6 months ago
JSON representation
ffmpeg helper by napi-rs binding
- Host: GitHub
- URL: https://github.com/magicdawn/ff-helper
- Owner: magicdawn
- License: mit
- Created: 2023-04-10T11:48:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-08T09:35:52.000Z (10 months ago)
- Last Synced: 2025-09-08T10:37:19.695Z (10 months ago)
- Topics: ffmpeg, ffmpeg-binding, node-ffmpeg-api
- Language: Rust
- Homepage: https://magicdawn.github.io/ff-helper/
- Size: 13.4 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ff-helper
> ffmpeg helper by napi-rs binding
[](https://github.com/magicdawn/ff-helper/actions/workflows/ci.yml)
[](https://codecov.io/gh/magicdawn/ff-helper)
[](https://www.npmjs.com/package/ff-helper)
[](https://www.npmjs.com/package/ff-helper)
[](http://magicdawn.mit-license.org)
## 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
```sh
brew install pkg-config ffmpeg nasm
```
### On Debian-based systems
```sh
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
```sh
$ pnpm add ff-helper
```
## API
see typedoc https://magicdawn.github.io/ff-helper/
### get video info
```ts
export declare async funciton getVideoInfo(file: string): Promise;
export interface VideoInfo {
/** degress, 0-360, counterclockwise */
rotation: number
/** millseconds */
duration: number
width: number
height: number
}
```
## Changelog
[CHANGELOG.md](CHANGELOG.md)
## License
the MIT License http://magicdawn.mit-license.org