Use threads while encoding.