Androz2091 / discord-player

🎧 Complete framework to simplify the implementation of music commands using discord.js v14
https://discord-player.js.org/
MIT License
605 stars 191 forks source link

Custom ffmpeg parameters #1750

Closed ThatGuyJacobee closed 1 year ago

ThatGuyJacobee commented 1 year ago

Describe the feature you would like It would be fantastic if there was support for custom ffmpeg parameters, because I would like to set a specific amount of threads from the CPU to use on the music functions alongside some other parameters that are typically available.

Expected behavior Firstly, allow custom parameters to be set somewhere or passed through to the player instance. Next, when a song begins playing and ffmpeg is invoked, run the custom parameters that have been set.

Screenshots Not applicable.

Additional context In my specific case, I would like to use the -threads [Amount] ffmpeg parameter to limit the amount of CPU threads that ffmpeg can use during processing of the audio stream.

Many thanks for reading this and continually working on this project, much appreciated ❤️

twlite commented 1 year ago

I've included the following method to supply input args for ffmpeg. This will be available in the next version.

queue.filters.ffmpeg.setInputArgs(['-threads', '[Amount]']);
ThatGuyJacobee commented 1 year ago

That is fantastic, thank you very much! ❤️

twlite commented 1 year ago

This feature is now available in discord-player@dev, please report any issues

twlite commented 1 year ago

released