I’m running some 1-pass vs. 2-pass comparison testing with x265. Unlike with x264 (see tests here), there’s a substantial performance penalty for running 2-pass with minimal quality benefit.
I tried the no-slow-firstpass=1 setting, which only accelerated two-pass by about 14%. Here are the results from a single test file. I don’t want to process them all if there’s a magic switch that accelerates two-pass x265.
As you can see in the table above, turbo mode reduced encoding time from 4:52 to 4:12, with just a slight decrease in quality. Single-pass encoding was about 45% faster than the two-pass turbo, and at least for this file, produced slightly higher quality; a man bites dog results.
The command strings were pretty generic.
Contents
One Pass
ffmpeg -y -i football.mp4 -c:v libx265 -preset medium -threads 8 -b:v 3500k -maxrate 7000k -bufsize 7000k -g 60 -x265-params open-gop=0 football_1pass.mp4
Two Pass – Baseline
ffmpeg -y -i football.mp4 -c:v libx265 -preset medium -threads 8 -b:v 3500k -maxrate 7000k -bufsize 7000k -g 60 -x265-params open-gop=0:pass=1:no-slow-firstpass=1 -f mp4 NUL
ffmpeg -y -i football.mp4 -c:v libx265 -preset medium -threads 8 -b:v 3500k -maxrate 7000k -bufsize 7000k -g 60 -x265-params open-gop=0:pass=2 -an football_2pass.mp4
Two Pass – Turbo
ffmpeg -y -i "football.mp4" -c:v libx265 -preset medium -threads 8 -b:v 3500k -maxrate 7000k -bufsize 7000k -g 60 -x265-params open-gop=0:pass=1:no-slow-firstpass=1 -f mp4 NUL
ffmpeg -y -i "football.mp4" -c:v libx265 -preset medium -threads 8 -b:v 3500k -maxrate 7000k -bufsize 7000k -g 60 -x265-params open-gop=0:pass=2 -an football_2pass_turbo.mp4
If anyone knows a better alternative for accelerating the first pass of x265, please LMK at janozer@gmail.com.
Thanks!
Encoding cost & efficiency review
Impressed with this analysis? Your encoding ladder deserves the same scrutiny.
Our encoding cost and efficiency review tests your ladders and codec configurations on your own content, cutting bandwidth spend without sacrificing quality. You get lower delivery bills and better viewer QoE.
See how it works →
Streaming Learning Center Where Streaming Professionals Learn to Excel
