python-ffmpeg icon indicating copy to clipboard operation
python-ffmpeg copied to clipboard

Add a `niceness` option to the FFmpeg class initializer

Open MaT-PT opened this issue 1 year ago • 1 comments

Niceness allows a process to have a lower or higher priority on Unix-like systems, this is useful to prevent ffmpeg from hogging all CPU resources in case of multiple concurrent conversions.

This PR adds a niceness parameter to the FFmpeg class constructor, which sets the niceness of the ffmpeg process that will be spawned. It also works on Windows, through creationflags and process priority.

MaT-PT avatar Jul 15 '24 12:07 MaT-PT

This looks good! There are other useful commands, such as "ionice" or "taskset". I think we could generalize this, by adding "modifier options" which would be appended at the start of FFMPeg.arguments. What do you think?

ecodina avatar Nov 08 '24 08:11 ecodina