const transcoder = new FFmpeg({
args: [
'-i', 'pipe:0',
'-ac', '2',
'-ar', '48000',
'-f', 'ogg',
'-acodec', 'libopus',
'-b:a', '128k',
'pipe:1',
'-loglevel', 'debug'
],
shell: false,
path: ffmpegStatic
});
const outputStream = audioStream.pipe(transcoder);
const resource = createAudioResource(outputStream, { inputType: 'ogg/opus' });
player.play(resource);
connection.subscribe(player);
const transcoder = new FFmpeg({
args: [
'-i', 'pipe:0',
'-ac', '2',
'-ar', '48000',
'-f', 'ogg',
'-acodec', 'libopus',
'-b:a', '128k',
'pipe:1',
'-loglevel', 'debug'
],
shell: false,
path: ffmpegStatic
});
const outputStream = audioStream.pipe(transcoder);
const resource = createAudioResource(outputStream, { inputType: 'ogg/opus' });
player.play(resource);
connection.subscribe(player);