Apart from using hardware encoders and optimizing profiles you can also see this topic for details on how to limit resources used by video encoding:
Apart from using hardware encoders and optimizing profiles you can also see this topic for details on how to limit resources used by video encoding: