Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/transitive-bullshit/ffmpeg-probe
Wrapper around ffprobe for getting info about media files.
https://github.com/transitive-bullshit/ffmpeg-probe
ffmpeg ffprobe fluent-ffmpeg
Last synced: about 2 months ago
JSON representation
Wrapper around ffprobe for getting info about media files.
- Host: GitHub
- URL: https://github.com/transitive-bullshit/ffmpeg-probe
- Owner: transitive-bullshit
- Created: 2018-03-28T08:31:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T07:24:12.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T00:53:44.805Z (7 months ago)
- Topics: ffmpeg, ffprobe, fluent-ffmpeg
- Language: JavaScript
- Size: 1.39 MB
- Stars: 13
- Watchers: 3
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-ffmpeg - ffmpeg-probe - Wrapper around ffprobe for getting info about media files. (JavaScript)
README
# ffmpeg-probe
> Wrapper around [ffprobe](https://www.ffmpeg.org/ffprobe.html) for getting info about media files such as width, height, and duration.
[![NPM](https://img.shields.io/npm/v/ffmpeg-probe.svg)](https://www.npmjs.com/package/ffmpeg-probe) [![Build Status](https://travis-ci.com/transitive-bullshit/ffmpeg-probe.svg?branch=master)](https://travis-ci.com/transitive-bullshit/ffmpeg-probe) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Install
```bash
npm install --save ffmpeg-probe
# or
yarn add ffmpeg-probe
```## Usage
```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: { ... }
// }
```## API
### probe(input)
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.
#### input
Type: `String`
Path or URL to a media file.
## Related
- [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.## License
MIT © [Travis Fischer](https://github.com/transitive-bullshit)
Support my OSS work by following me on twitter