Hello fellow Level 1 Techies! Roughly a week ago I discovered YouTube is now accepting the x265/HEVC codec for uploads (I’m a little late to the party, I know). Anyway, that’s where I went into full nerd mode. I studied up on x265 through lots of google searches but I never found a good discussion thread talking about x265 for regular content creators. I’ve learned a ton over the last week, but I don’t have my FFmpeg settings perfected like I did using old fashioned x264.
I’m hoping by sharing setting, tips and observations on this thread we all could probably dial in our render settings a little better for the best x265 performance.
The CarryTrainer.Editor Workflow
My videos start in Davinci Resolve. Although Resolve is awesome, I’ve never been happy with the h.264 options and output…. So my finished videos are rendered out of Resolve in 2160p Uncompressed 8-bit YUV422 or Cineform 10-bit 422 with “Best” if HDD space is an issue.
Next, the big un-molested video files are fed into FFmpeg with something like the following settings:
ffmpeg -i input.mov -c:v libx264 -preset slow -tune film -g 12 -bf 2 -crf 17 -pix_fmt yuv420p -c:a aac -b:a 384k -movflags faststart A:\RENDERS_BIN\output.mp4
As a yardstick of comparison my Ryzen 1700X was generally rendering this around 25% of real-time speed… not awesome speed wise, but the video image quality was awesome. I would move the CRF between 16-18 depending on the content and how much time I had for uploading.
Moving over to x265… although the command line is very similar using libx265 is a different animal. The Slow Preset of x265 on my machine is an understatement… 8 cores is not enough for the slow preset. On my machine I was getting around 5-8% speed. Scanning various blog posts and tech articles I got the impression actually MEDIUM lives up to its name as the best balanced choice for rendering time vs. compression.
Anyway, these are my current x265 render settings:
ffmpeg -i input.mov -c:v libx265 -preset medium -g 12 -bf 2 -crf 17 -pix_fmt yuv420p -c:a pcm_s16le -movflags faststart A:\RENDERS_BIN\output.mov
(aside from using x265, I figured out how to copy uncompressed audio from my Davinci Resolve source file in the line above)
Having said all that I have a few questions to through out there.
-
Has anyone gotten a good sense of how speed presets for Fast and Medium compare in terms of speed and compression?
-
According to x265.org a CRF rating of 28 in x265 is equal to CRF 23 in x264 in terms of perceptual quality… Not everyone seems to believe that and I’ve seen SSIM measurements posted that suggest otherwise. I’m frankly not sure what to think yet so CRF 18 feels safe.
-
Got any tips on how I can optimize my x265 render settings for talking heads and action/gun footage?
I look forward to your responses.
Cheers,
-CarryTrainer.Editor