1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 07:41:56 +00:00
musix-oss/node_modules/prism-media
2019-08-14 15:26:33 +03:00
..
src updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
test updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
.eslintrc.json updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
.travis.yml updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
LICENSE updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
output.opus updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
package.json updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00
README.md updated all commands and removed some weird files 2019-08-14 15:26:33 +03:00

prism-media

Build Status dependencies devDependencies

Makes programmatically transcoding media easier

npm install --save hydrabolt/prism-media

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'));