UniFi Protect Codec Encoding: Standard vs Enhanced (H.264 vs H.265)

Quick Takeaways

  • Standard (H.264) is universally browser‑compatible; Enhanced (H.265/HEVC) is more efficient but less compatible.
  • Auto encoding can choose per client but may misdetect; Custom locks the codec for predictability.
  • For browser share links, choose H.264. For storage savings on Apple devices, H.265 works well.
  • Codec choice interacts with FPS and compression—high FPS on H.265 needs capable clients.

What Codec Encoding Does

Encoding defines which codec compresses your video.

Standard (H.264)

  • Oldest, most compatible option; plays in all major browsers and many third‑party tools.
  • Larger files than H.265 at the same perceived quality.

Enhanced (H.265/HEVC)

  • Newer and more efficient; often 30–50% storage savings.
  • Limited browser support (Safari on Apple devices is fine; Chrome/Firefox often aren’t without OS support).

Auto vs Custom Encoding

Auto

  • Protect chooses the codec per stream based on the client’s capability.
  • Convenient, but misdetections can trigger “codec not supported” errors.

Custom

  • You select H.264 or H.265 for consistent behavior.
  • Ideal when you require guaranteed browser playback or maximum efficiency.

How to set Codec settings

Open the UniFi Protect web app (desktop browser) or the Protect mobile app.
Go to Cameras and select the camera you want to adjust.
Click Settings → Video.
Look for Encoding (sometimes labeled Codec or Encoding Method):
Standard = H.264 (universal browser support, safest for share links).
Enhanced = H.265 (smaller files, better efficiency, but not every browser or device supports it).
Auto (on some firmware) = Protect picks based on the client, but this can cause “codec not supported” errors in certain browsers.
Pick the option you want and click Apply/Save.

Best Codec Settings

  • Browser share / public links: Standard (H.264) to avoid playback errors.
  • Apple‑only environments: Enhanced (H.265) for efficiency—Safari decodes HEVC natively.
  • Long‑term storage optimization: Enhanced (H.265) to extend retention.
  • Third‑party integrations: Standard (H.264) for universal compatibility.

Context & Interactions

  • FPS: High‑FPS H.265 streams demand more client decoding power.
  • Compression: H.265 tolerates more compression before artifacts are obvious.
  • Browser Playback: H.264 is the safe default; H.265 requires specific client support.

Cheat Sheet

  • H.264: Browsers, remote viewing, third‑party apps.
  • H.265: Storage savings, Apple ecosystems, local‑only setups.
  • Auto: Convenient but verify browser links to avoid codec mismatch.
  • Rule of thumb: If in doubt, pick H.264.

Final Tips

  • “Codec not supported”? Switch to H.264.
  • Use H.265 only if all viewers support HEVC.
  • In mixed households, record in H.265 but expose RTSP/Web streams in H.264 when possible.
  • Test shared links in the actual browsers your audience uses.

More Settings: See the Ultimate Guide to UniFi Protect Video Settings

Related Posts: See Compression, Resolution & Profiles, and FPS

Explore More UniFi Protect Video Settings

Optimizing your UniFi Protect cameras is about more than one setting. For the best balance of clarity, smooth playback, and storage efficiency, explore the rest of our series:

Want everything in one place? Start with the Ultimate Guide to UniFi Protect Video Settings

Robert

Automation technologist and problem solver

Follow Us Around the Web