Skip to content

Add HEIC encoding support for Immich builds#8027

Draft
Claude wants to merge 9 commits intodevfrom
claude/check-heic-support-in-immich
Draft

Add HEIC encoding support for Immich builds#8027
Claude wants to merge 9 commits intodevfrom
claude/check-heic-support-in-immich

Conversation

@Claude
Copy link
Copy Markdown

@Claude Claude AI commented Mar 19, 2026

  • Analyze the build failure: "heifsave: Unsupported compression"
  • Identify root cause: libx265-dev missing from build dependencies
  • Add libx265-dev to aDEPS array for libvips build
  • Add libx265-dev to G_AGP cleanup after build
  • Verify dependency chain ensures runtime library (libx265-199) remains after cleanup
  • Investigate why error persists despite libx265-dev
  • Discover libheif uses plugin system requiring runtime plugin
  • Install libheif-plugin-x265 runtime package explicitly
  • Ensure plugin remains after build dependencies are cleaned up
  • Investigate why plugin approach still fails
  • Determine system libheif1 lacks proper x265 encoding support
  • Move libheif-plugin-x265 to aDEPS array
  • Build libheif from source with -DWITH_X265=ON and -DWITH_LIBDE265=ON
  • Add cmake to build dependencies
  • Update G_AGP cleanup to include cmake and libheif-plugin-x265
  • Remove libheif-dev dependency (using custom build instead)

Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Check HEIC file support in Immich software dietpi-software | Immich: Add libheif dependencies for HEIC support Mar 19, 2026
@Claude Claude AI requested a review from Joulinar March 19, 2026 19:48
The previous fix (installing libheif1 and libheif-plugin-libde265) didn't work because Sharp uses prebuilt binaries by default, which don't utilize system libraries. Sharp's prebuilt binaries explicitly disable libde265 HEVC decoder, making them unable to process standard Apple HEIC files.

Solution:
- Install libvips-dev and libheif-dev (build dependencies)
- Set SHARP_FORCE_GLOBAL_LIBVIPS=true to force Sharp to compile against system libvips
- Remove dev packages after build
- Runtime automatically uses libvips42t64 (includes libheif1 and libde265-0)

This matches how Immich's official Docker images handle HEIC support.

Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
@Claude Claude AI changed the title dietpi-software | Immich: Add libheif dependencies for HEIC support Force Sharp to use system libvips for HEIC support in Immich Mar 19, 2026
Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
@Claude Claude AI changed the title Force Sharp to use system libvips for HEIC support in Immich Build libvips from source for HEIC support in Immich Mar 19, 2026
Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
@Claude Claude AI changed the title Build libvips from source for HEIC support in Immich Keep libvips build within immich_src directory Mar 19, 2026
Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
@Claude Claude AI changed the title Keep libvips build within immich_src directory Add libx265-dev for HEIC encoding support in Immich Mar 19, 2026
Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
@Claude Claude AI changed the title Add libx265-dev for HEIC encoding support in Immich Add HEIC encoding support for Immich builds Mar 19, 2026
Co-authored-by: Joulinar <47155374+Joulinar@users.noreply.github.com>
Copilot stopped work on behalf of Joulinar due to an error March 19, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants