Skip to content

Conversation

@mik9
Copy link

@mik9 mik9 commented Nov 7, 2025

Description

As described in issue #23631:

  • Fixed incorrect colors after transcoding HEVC -> HEVC with no tonemapping by removing out_range=pc. Looks like ffmpeg is able to figure it out automatically and doing it better
  • Fixed preview and thumbnail images for HDR videos transcoded without tonemapping by force adding tonemapping to image generation
  • Fixed transcoding params without scaling

Fixes #23631

How Has This Been Tested?

Tested several transcoding options with several videos

AMD Ryzen 5 5600G

  • Source=h264, Target=HEVC/h264
    • SW decoder
    • HW decoder
  • Source=HEVC, Target=HEVC
    • SW decoder
    • SW decoder + scaling
    • SW decoder + tonemapping
    • SW decoder + scaling + tonemapping
    • HW decoder
    • HW decoder + scaling

HW tonemapping doesn't work on this machine so I can't test it

Intel(R) Core(TM) i5-8265U

  • Source=h264, Target=h264
    • SW decoder
    • SW decoder + scaling
    • HW decoder + scaling
  • Source=HEVC, Target=h264
    • SW decoder + scaling + tonemapping
    • SW decoder + tonemapping
    • HW decoder + tonemapping (works but wrong colors)
    • HW decoder + scaling + tonemapping (works but wrong colors)

Note: "wrong colors" issue also present with hw tonemapping in main branch so there is no regression

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

none

- Drop out_range and format. ffmpeg will figure it out automatically. This should fix slightly wrong color without tonemapping
- Always set tonemapping for preview/thumbnail jobs
- Fix VaapiSwDecodeConfig without scaling
@immich-push-o-matic
Copy link

Label error. Requires exactly 1 of: changelog:.*. Found: 🗄️server. A maintainer will add the required label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VAAPI] [AMD] Slightly wrong HDR colors after transcoding with no tonemapping

2 participants