mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 21:43:33 +01:00
Add ffmpeg-binaries as a possible source of ffmpeg (#975)
* Add ffmpeg-binaries as a possible source of ffmpeg * Add note in faq
This commit is contained in:
@@ -12,6 +12,7 @@ Update to Node.js 6.0.0 or newer.
|
||||
node-opus is greatly preferred, due to it having significantly better performance.
|
||||
|
||||
## How do I install FFMPEG?
|
||||
- **npm:** `npm install --save ffmpeg-binaries`
|
||||
- **Ubuntu 16.04:** `sudo apt install ffmpeg`
|
||||
- **Ubuntu 14.04:** `sudo apt-get install libav-tools`
|
||||
- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).
|
||||
|
||||
@@ -67,7 +67,14 @@ class FfmpegConverterEngine extends ConverterEngine {
|
||||
}
|
||||
|
||||
function chooseCommand() {
|
||||
for (const cmd of ['ffmpeg', 'avconv', './ffmpeg', './avconv']) {
|
||||
for (const cmd of [
|
||||
'ffmpeg',
|
||||
'avconv',
|
||||
'./ffmpeg',
|
||||
'./avconv',
|
||||
'node_modules\\ffmpeg-binaries\\bin\\ffmpeg',
|
||||
'node_modules/ffmpeg-binaries/bin/ffmpeg',
|
||||
]) {
|
||||
if (!ChildProcess.spawnSync(cmd, ['-h']).error) return cmd;
|
||||
}
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user