|
|
||
|---|---|---|
| .. | ||
| dist | ||
| LICENSE | ||
| README.md | ||
| package.json | ||
README.md
@discord-player/ffmpeg
FFmpeg stream abstraction for Discord Player.
Installation
$ yarn add @discord-player/ffmpeg
Supported FFmpeg Locations
process.env.FFMPEG_PATH- command
ffmpeg - command
avconv - command
./ffmpeg(./ffmpeg.exeon windows) - command
./avconv(./avconv.exeon windows) - npm package @ffmpeg-installer/ffmpeg
- npm package ffmpeg-static
- npm package @node-ffmpeg/node-ffmpeg-installer
- npm package ffmpeg-binaries
Example
import { FFmpeg } from '@discord-player/ffmpeg';
const transcoder = new FFmpeg({
args: [
'-analyzeduration', '0',
'-loglevel', '0',
'-f', 's16le',
'-ar', '48000',
'-ac', '2',
'-af', 'bass=g=15,acompressor'
]
});
const stream = getAudioStreamSomehow();
const transcoded = stream.pipe(transcoder);