install cpulimit sudo apt install cpulimit say python calls ffmpeg, can monitor it or slow down the usage Usage: cpulimit TARGET [OPTIONS...] [-- PROGRAM] TARGET must be exactly one of these: -p, --pid=N pid of the process -e, --exe=FILE name of the executable program file The -e option only works when cpulimit is run with admin rights. -P, --path=PATH absolute path name of the executable program file $ cpulimit -e ffmpeg -l 50 Process 28527 detected Process 28527 dead! Warning: no target process found. Waiting for it... Process 28778 detected