Open HunterAP23 opened 2 weeks ago
I think this is a good idea. I would, however, instead of replacing subprocess.Popen
with psutil.Popen
, make psutil
an optional dependency, and, if it is installed, use psutil.Popen
instead of subprocess.Popen
. This way we'd keep backwards compatibility, and keep the package dependency-free by default.
This is more so to gauge interest in this feature. The
psutil
library is used for finding process information (such as CPU / memory usage) and overall system information. It also provides a wrapper tosubprocess.Popen
in their ownpsutil.Popen
that makes tracking this information much easier.I created my own Python class that inherits from
ffmpy.FFmpeg
where I replaced the process opening method so I can track resource usage, but I was curious if this is something others would want added to this library.