mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
Disable ffmpeg logging and ignore stderr
This commit is contained in:
@@ -67,7 +67,7 @@ var AudioEncoder = (function () {
|
|||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var enc = _child_process2["default"].spawn(self.getCommand(), ['-i', "-", '-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1']);
|
var enc = _child_process2["default"].spawn(self.getCommand(), ['-loglevel', '0', '-i', '-', '-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1'], { stdio: ['pipe', 'pipe', 'ignore'] });
|
||||||
|
|
||||||
stream.pipe(enc.stdin);
|
stream.pipe(enc.stdin);
|
||||||
|
|
||||||
|
|||||||
@@ -45,12 +45,13 @@ export default class AudioEncoder {
|
|||||||
var self = this;
|
var self = this;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
var enc = cpoc.spawn(self.getCommand(), [
|
var enc = cpoc.spawn(self.getCommand(), [
|
||||||
'-i', "-",
|
'-loglevel', '0',
|
||||||
|
'-i', '-',
|
||||||
'-f', 's16le',
|
'-f', 's16le',
|
||||||
'-ar', '48000',
|
'-ar', '48000',
|
||||||
'-ac', 2,
|
'-ac', 2,
|
||||||
'pipe:1'
|
'pipe:1'
|
||||||
]);
|
], {stdio: ['pipe', 'pipe', 'ignore']});
|
||||||
|
|
||||||
stream.pipe(enc.stdin);
|
stream.pipe(enc.stdin);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user