As an open-source and computationally efﬁcient High Efﬁciency Video Coding (HEVC) encoder, x265 has been gaining increasing popularity in video applications. x265 provides numerous encoding parameters in view of ﬂexibility. However, proper and efﬁcient setting of parameters often becomes a great challenge in practice. In this paper, we deeply investigate the inﬂuence of x265 parameters based on the Slow preset and pick out important parameters in terms of efﬁciency and complexity. Then a Markov Chain Monte Carlo (MCMC) based algorithm is proposed for efﬁcient parameter adaptation at the target encoding time. This paper shows that carefully selected lowcomplexity encoding conﬁgurations can achieve the coding efﬁciency comparable to that of high-complexity ones. Speciﬁcally, average 26.72% encoding time reduction can be achieved while maintaining similar Rate Distortion (RD) performance to x265 presets using the proposed algorithm.