Sonarr Prefer X265

If Custom Formats feel overwhelming, Sonarr offers a simpler, albeit less elegant, solution: Release Profiles.

Here is the final, battle-tested recommendation for 99% of users:

By implementing this "Prefer but not Mandatory" strategy, your Sonarr instance will slowly, intelligently, and automatically upgrade your library to x265. Your hard drives will thank you, your electricity bill will drop (less spinning rust), and your users will never notice the difference—unless they try to watch on a 2014 Smart TV, in which case, tell them to buy a Fire Stick.

Now go reclaim your storage space.


This article was originally published for the /r/sonarr and /r/DataHoarder communities. Always verify your local copyright laws before automating downloads.


If you want, I can:

To make Sonarr prefer x265 (HEVC) releases while still allowing it to fall back to other formats, you should use Custom Formats with a positive scoring system. This allows Sonarr to rank releases and automatically upgrade an existing file if a better-scored x265 version appears. Core Implementation Steps

Create Custom FormatsIn Sonarr, go to Settings > Custom Formats. Create a new format for x265 using a regular expression to match common naming conventions. Authoritative guides like TRaSH Guides recommend including terms like x265, h265, and HEVC to ensure maximum coverage.

Assign Scores in Quality ProfilesNavigate to Settings > Profiles and select the profile you want to edit (e.g., 1080p).

Custom Format Score: Assign a positive value (e.g., +100) to your x265 format. sonarr prefer x265

Upgrade Until: Ensure "Allow Upgrades" is checked and set an "Upgrade Until Custom Format Score" if you want it to stop at a specific threshold.

Adjust Quality DefinitionsSince x265 files are typically smaller than x264 files at the same quality, you may need to lower your Size Limits in Settings > Quality. If your limits are too high, Sonarr might reject valid, high-quality x265 releases because they are "too small". Key Considerations Collection of Custom Formats for Sonarr - TRaSH Guides

Sonarr is a powerful tool for automating your media library, but its default settings often prioritize file size or release speed over modern efficiency. If you want to save disk space without sacrificing quality, configuring Sonarr to prefer x265 (HEVC) is a game-changer.

This guide will walk you through setting up custom formats and quality profiles to ensure your library shifts toward the x265 standard. Why Prefer x265?

Before diving into the settings, it is important to understand why this shift matters for your home server.

Storage Efficiency: x265 files are typically 30-50% smaller than x264 files at the same perceived quality.

4K Standard: HEVC is the industry standard for 4K and HDR content.

Future Proofing: As hardware decoding becomes universal, x265 provides the best balance of fidelity and footprint. Step 1: Create a Custom Format for x265

The most effective way to tell Sonarr what you want is through Custom Formats. This allows you to "score" specific terms found in release titles. Navigate to Settings > Custom Formats. Click the + icon to create a new format. Name: Call it "x265 HEVC". Specifications: Add a new specification. Select Release Title as the type. In the Regular Expression field, enter: (?i)x265|HEVC. Save the format. Step 2: Configure Your Quality Profile If Custom Formats feel overwhelming, Sonarr offers a

Now that Sonarr knows how to identify x265, you need to tell it that these files are more desirable than others. Go to Settings > Profiles. Select the profile you use (e.g., HD-1080p). Find the Custom Formats section at the bottom.

You will see your "x265 HEVC" format listed. Set the Score to something positive, like 100.

Ensure your Upgrade Until Custom Format Score is set to at least 100. Step 3: Handling Potential Pitfalls

While x265 is superior for storage, there are two things to keep in mind to avoid a "bad" automated experience. Watch Out for "Trash Guides"

For the best results, many users follow the Trash Guides methodology. This involves adding negative scores to "bloat" terms or low-quality encoders. If you prefer x265, you might also want to give a negative score to x264 or AVC to ensure they are only picked as a last resort. Transcoding Constraints

Ensure your playback devices (Plex clients, smart TVs, or tablets) support HEVC hardware decoding. If they don't, your media server will have to transcode the x265 files back to x264 on the fly, which can heavily tax your CPU. Step 4: Applying the Changes

Once your profiles are updated, Sonarr won't immediately replace your entire library. To trigger the shift:

For New Content: Sonarr will automatically pick the x265 version if available during the next search.

For Existing Content: Go to the Series tab, select the shows you want to upgrade, and click Interactive Search or Search Monitored to let Sonarr find the more efficient versions. By implementing this "Prefer but not Mandatory" strategy,

Key TakeawayBy assigning a positive score to the x265/HEVC regex in your Custom Formats, you automate a leaner, higher-quality media library.


Click the + button to add a new Custom Format.

Configuration:

Now, we need to add the conditions. Click the + Add Condition button.

For power users, here is the ultimate JSON block for an x265 "prefer" format. Save this as a .json file and import it into Sonarr via SettingsCustom FormatsImport.


  "name": "✅ x265 / HEVC (Prefer)",
  "includeCustomFormatWhenRenaming": false,
  "specifications": [
"name": "x265 or HEVC",
      "implementation": "ReleaseTitleSpecification",
      "negate": false,
      "required": false,
      "fields": \\bhevc\\b"
,
"name": "Not x264",
      "implementation": "ReleaseTitleSpecification",
      "negate": true,
      "required": false,
      "fields": h)\\.?264\\b
]

Prefer x265 if:

Avoid preferring x265 if:

The Golden Rule of Sonarr: Never let a codec preference override your minimum quality standard. A bad x265 is worse than a good x264. Use Custom Formats to prefer, not demand, and you'll build a library that's both lean and reliable.


Basic tagging fails because uploaders are inconsistent. Some release groups tag HEVC, others tag x265, and some use H.265. Worse, fake uploaders tag x265 on low-bitrate garbage.

To truly prefer x265, you need a Negative Indexing Regex that punishes x264.