Add FFmpeg Args when creating an audio resource
Hey,
I would like to know if it's possible to parse ffmpeg args to the ffmpeg conversion when creating an audio resource.
Like : -af aresample=48000,asetrate=48000*1.25
For example.
Thanks!
12 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!I m using discordjs voice 0.18.0
and node v20.17.0
It's possible
You have to use other packages such as prism-media(I strongly recommend using this), ffmpeg-static, fluent-ffmpeg though
prism-media is already used by discord js module by default right ?
yep
What you suggest is parsing the audio to ffmpeg before sending it to discord js ?
Yes
Will there be two ffmpeg commands ? Or discord js will not convert it again
There's gonna be two of them
ah thanks
I see, Thanks! that's what was bothering me
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Thanks that's how I was using it