1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 11:20:19 +00:00
musix-oss/node_modules/prism-media/README.md

29 lines
871 B
Markdown
Raw Normal View History

2019-10-10 13:43:04 +00:00
# prism-media
[![Build Status](https://travis-ci.org/hydrabolt/prism-media.svg?branch=master)](https://travis-ci.org/hydrabolt/prism-media)
[![dependencies](https://david-dm.org/hydrabolt/prism-media/status.svg)](https://david-dm.org/hydrabolt/prism-media)
[![devDependencies](https://david-dm.org/hydrabolt/prism-media/dev-status.svg)](https://david-dm.org/hydrabolt/prism-media?type=dev)
Makes programmatically transcoding media easier
`npm install --save hydrabolt/prism-media`
```js
const Prism = require('prism-media');
const fs = require('fs');
const prism = new Prism();
const transcoder = prism.transcode({
type: 'ffmpeg',
media: './test/test.mp3',
ffmpegArguments: [
'-analyzeduration', '0',
'-loglevel', '0',
'-f', 's16le',
'-ar', '48000',
'-ac', '2',
],
});
transcoder.output.pipe(fs.createWriteStream('./test/test.pcm'));
```