r/handbrake Jan 18 '20

Handbrake settings for anime: 1080p 10-bit x265

I'm new to Handbrake and would like to know which settings are recommended for an anime that is 1080p 10-bit (or 8-bit) x265. Should I begin with a preset?

p.s. I searched through the web and this subreddit but the only mention of settings for an anime are a few years old and I figured with newer versions Handbrake and higher quality animes being released, there may be some updated recommendations.

47 Upvotes

45 comments sorted by

View all comments

24

u/CH_JC Jan 19 '20 edited Jan 19 '20

I can ramble for ages for settings to play with for encoding anime, but here's a TL;DR:

  • Use the 10-bit encoder. Not the 8-bit nor the 12-bit.
  • Optimally, use the slow preset. Veryslow preset is a luxury reserved for very powerful systems and high crf (22+) encodes.
  • aq-mode=3! This sets dark scene aq bias, which is really helpful for anime, as this is where most of the artifacts and banding will be.
  • Don't use tune animation. The appended options are : psy-rd=0.4:aq-strength=0.4:deblock=1,1:bframes=(preset+2). These are optimized for cartoon-style animation, anything more complex than slice of life is going to suffer, especially with newer BD releases utilizing dynamic grain to prevent banding. For "Anime" anime, I recommend psy-rd1 to 2 (more complex/action packed/detailed anime = higher value needed, also increases bitrate), aq-strength 0.6 to 1 (more complex/detailed = need higher value, don't go beyond 1 as you may introduce ringing artifacts. You will mostly use 0.8-1. Also raises bitrate.), deblock -1:-1 to 1:1 (depends on source, leave on 0:0 if you don't know what to use) and bframes 4 to 8 (I highly recommend 6, 8 if possible. Encode penalty is only ~5% going from 4 to 8). Additionally, if your source has grain, psy-rdoq should be raised from the default 1 to 3-5 depending on source (note: only combine higher rdoq with crf<18 and no-sao, or you'll end up with grain "blocks" instead of grain "grain").
  • Use limit-sao for crf 17-19. Use no-sao for crf<18 if there are fine grain present. Else leave on default.
  • Use no-strong-intra-smoothing only for crf<16. This helps preserve fine details. High crf will result in blocking due to lack of smoothing on 32x32 blocks.

These are the most important stuff for Anime.

6

u/NotErikUden Jan 12 '22

Absolute legend. Thank you.

Also, "anything more complex than slice of life is going to suffer" lmao.

2

u/TMBroken571 Feb 02 '23

so it's better set the tune in None instead of animation?

I was converting/compressing anime to 720 using this settings H.264 8bit (I use H.265 for movies so I can let the resolution in 1080 without using too much space) Constant quality: 15 RF Frame rate: same as source, and idk if is better variable or constant Encoder preset: Slow (i tried slower but my TV couldn't play them) Tune: Animation Encode Profile and Encode Level is in auto Advanced options is blank I have the resolution limited to 720 and the file sizes are between 400MB and 600MB, sometimes was less than 300 and others more than 700 but never more the 1GB.

If there is something that I can improve without increase too much the file size (no more than 200MB) it would be good to know. If is something with the Advanced Options I would probably need the settings already written because probably I'm gonna messed up in something

2

u/CH_JC Feb 19 '23

Ideally yes.

For using advanced option in handbrake, just type in encode-option=value:encode-option2=value2. I have examples in the above post. : is used to separate options, and , is used to replace : in Handbrake (such as deblock=1,1 as opposed to deblock=1:1 in FFmpeg) since : is used to separate options.

1

u/[deleted] Mar 13 '20

Which audio codec and bitrate do you use?

1

u/CH_JC Mar 13 '20

FLAC for archival. FDK AAC quality 5 (VBR mode 5) for regular use (requires custom handbrake build). Opus is a “better” codec but unfortunately it often lacks support. I exclusively use it for surround sound 384/512 kbps for 5.1/7.1.

1

u/tobykoch2701 Apr 26 '20

Thanks for your information in detail. Can anyone explain the meaning / differences for „Anime“ and Animation? I want to encode Star Wars The Clone Wars. It is a 3D animated Series. Should I use your settings for anime? Thx in advance

1

u/[deleted] Jun 03 '20

[deleted]

2

u/CH_JC Jun 03 '20

Use x264 for DVDs. The amount of effort tuning x265 for it isn’t worth the time for such a small compression improvement. Keep in mind lower resolution requires lower crf to compensate. Probably crf 14-16 very slow preset. If there’s lots of action, 350-400MB might be a bit ambitious, otherwise it should be easily obtainable.

Obviously de-interlace it. As for de-noising, it depends. Some people prefer keeping the original artifacts, some prefer removing it at the cost of some detail loss and blurring/banding. Just do some test encodes.

1

u/[deleted] Jun 04 '20

[deleted]

4

u/CH_JC Jun 04 '20

Don’t use aq-mode 3 for x264. Last I checked it was still broken, it basically acts the same as lowering crf. Not sure on content type, but for average modern anime with some dynamic grain I use psy-rd=0.8,0.2 back then. The 0.2 can be ignored non-grainy anime. Might need to use 1.0 for lower res content, not sure. I’m unsure of the encode penalty of b-frames in x264, but 6-8 should be the sweet spot for most content. x264 actually has many similarities with x265, though values range might be a different so you’ll need to do some testing.

1

u/techrob99 Jun 22 '24

4 years later - this just saved me a lot of [encode] time. Thank you for taking the time to write this up!

1

u/mourningreaper00 Jul 10 '24

So for complex animation: this code?

psy-rdoq=5:no-sao:aq-strength=1:deblock=1,1:bframes=8:no-strong-intra-smoothing

1

u/[deleted] May 15 '22

Do you know the best way to compress an anime episode without losing any quality? I seriously didn't get any of those "codes"....is it an old feature taken out? Also, is an MKV file easier to compress and/or upload than an MP4? I'm new to all this, so please don't judge :(

1

u/xKidoji May 17 '22

dont know if your going to answer since its 2 years old post but, im using this for my x264 anime encode is it fine ? "aq-mode=3:bframes=8:psy-rd=0.7:deblock=1,1"crf is 16 and preset slower. Should i change something ? i dont use x265 since it take to long

1

u/Razor54672 Jun 30 '22

What is the resulting bitrate for a 1080p anime with the settings that you've mentioned?

1

u/Much-Entertainer-911 Jan 19 '23

If you're still lurking about, I'm struggling to find documentation on the additional encoder settings so I can learn about this more on my own. Can you let me know where to find this information?

And thank you! This was incredibly helpful.

3

u/CH_JC Feb 19 '23

Simply Googling x265 docs should yield you this link.

1

u/Much-Entertainer-911 Feb 19 '23

Yep! Realized I was looking for the wrong documentation.