With software encoding and changing the quality to highest the time difference was quite a lot. After changing to hardware acceleration with my nVidia 1060 card it now takes the same time. Is that expected? Seems there's no reason going for faster quality if using hardware acceleration.