-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
- Yes
The bug
VAAPI hardware: Radeon Vega integrated into 5600g
I tries to setup video transcoding without tonemapping (since most modern devices support HDR) and observed that in transcoded video colors are slightly off. After some investigation I found the cause: out_range=pc parameter in scale_vaapi filter. When I run transcoding without that parameter colors are fine.
Observed result (left to right Original/Transcoded with out_range=pc/Transcoded without out_range=pc). Had to take a photo because SDR screenshot of HDR content on mac looks absolutely wrong. Green leaf on the middle image are slightly brighter than other 2.
The OS that Immich Server is running on
ubuntu-server 24.04
Version of Immich Server
v2.1.0
Version of Immich Mobile App
v2.1.0
Platform with the issue
- Server
- Web
- Mobile
Device make and model
No response
Your docker-compose.yml content
from documentationYour .env content
from documentationReproduction steps
- Transcoding settings: Video codec = hevc
- Target resolution = original
- CRF = 35
- Preset = fast
- Maximum bitrate = 0
- Tone-mapping = disabled
- Acceleration API = VAAPI
- ======
- Take HDR video on iPhone
- Upload
- Let it transcode
- Download transcoded video
- Compare colors
Relevant log output
Additional information
ffmpeg args from ps aux
ffmpeg command with issue:
/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -hwaccel_device /dev/dri/renderD128 -threads 1 -i /data/library/admin/... -y -c:v hevc_vaapi -c:a copy -movflags faststart -fps_mode passthrough -map 0:0 -map_metadata -1 -map 0:1 -g 256 -tag:v hvc1 -v verbose -vf scale_vaapi=2160:-2:mode=hq:out_range=pc:format=nv12 -compression_level 5 -qp:v 35 -global_quality:v 35 -rc_mode 1 /data/encoded-video/...
ffmpeg command without issue:
/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -hwaccel_device /dev/dri/renderD128 -threads 1 -i /data/library/admin/... -y -c:v hevc_vaapi -c:a copy -movflags faststart -fps_mode passthrough -map 0:0 -map_metadata -1 -map 0:1 -g 256 -tag:v hvc1 -v verbose -vf scale_vaapi=format=nv12 -compression_level 5 -qp:v 35 -global_quality:v 35 -rc_mode 1 /data/encoded-video/...
UPD: out_range=tv also produces correct colors
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
