Ani-x264: Complete Guide to Encoding Anime with x264

Best Ani-x264 Presets for 1080p and 720p Anime

Recommended base preset and tune

  • Preset: slower (good balance) or veryslow if you want best quality and longer encode time.
  • Tune: animation

Key x264 settings (starter profile)

Code

–preset slower –tune animation –crf 16-20 –profile high –level 4.1 –ref 8 –bframes 8 –aq-mode 2 –aq-strength 1.0 –rc-lookahead 40 –qcomp 0.60 –psy-rd 0.8:0 –vbv-maxrate 0 –vbv-bufsize 0
  • Use CRF 16–18 for 1080p (archive/collection quality).
  • Use CRF 18–20 for 720p (good tradeoff filesize/quality).

Options to tweak for anime

  • Lines/clean art: increase psy-rd slightly (0.8–1.0) and keep aq-strength ~1.0.
  • Flat, low-motion scenes: enable mbtree and raise rc-lookahead to 250 for extra savings.
  • Noisy/grainy sources: avoid mbtree and lower psy-rd to prevent ringing.
  • Decoding compatibility / faster devices: use lower ref/B-frame values (e.g., ref 4, bframes 4) and preset medium.

Two-pass / bitrate targets

  • For fixed filesize or streaming, use 2-pass with a target bitrate. For typical anime 1080p targets: 3500–7000 kbps depending on complexity; 720p: 1500–3500 kbps.

Container & audio

  • Wrap in MKV. Use AAC (VBR) or Opus for modern players; keep audio separate tracks if subtitles are needed.

Quick example ffmpeg command (CRF encode)

Code

ffmpeg -i input.mkv -c:v libx264 -preset slower -tune animation -crf 17 -profile:v high -level 4.1 -refs 8 -bf 8 -aq-mode 2 -aq-strength 1.0 -rc-lookahead 40 -qcomp 0.6 -psy-rd 0.8:0 -c:a copy output.mkv

If you want a ready-made preset tuned for Ani-x264 (smaller/fast/archival), tell me which target (archive vs web), and I’ll output a ready command.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *