ffmpeg-probe
Version:
Wrapper around ffprobe for getting info about media files.
53 lines (34 loc) • 1.44 kB
Markdown
> Wrapper around [ffprobe](https://www.ffmpeg.org/ffprobe.html) for getting info about media files such as width, height, and duration.
[](https://www.npmjs.com/package/ffmpeg-probe) [](https://travis-ci.com/transitive-bullshit/ffmpeg-probe) [](https://standardjs.com)
```bash
npm install --save ffmpeg-probe
yarn add ffmpeg-probe
```
```js
const ffmpeg = require('fluent-ffmpeg')
const probe = require('ffmpeg-probe')
const info = await probe('input.mp4')
// info = {
// width: 640,
// height: 360,
// duration: 4000,
// fps: 25,
// streams: [ ... ],
// format: { ... }
// }
```
Returns a `Promise` for the [probe](https://www.ffmpeg.org/ffprobe.html) information augmented with the first stream's `width`, `height`, and `duration` in milliseconds.
Type: `String`
Path or URL to a media file.
- [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg)
- [awesome-ffmpeg](https://github.com/transitive-bullshit/awesome-ffmpeg) - A curated list of awesome ffmpeg resources with a focus on JavaScript.
MIT © [Travis Fischer](https://github.com/transitive-bullshit)