mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #13277] [MERGED] Improve dynamic HDR metadata handling #13523
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/13277
Author: @gnattu
Created: 12/23/2024
Status: ✅ Merged
Merged: 4/3/2025
Merged by: @crobibero
Base:
master← Head:hdr-metadata-handling📝 Commits (10+)
695a2d3Add support for bitstream filter to remove dynamic hdr metadataa43e1e6Add support for ffprobe's only_first_vframe for HDR10+ detection0e6272dAdd BitStreamFilterOptionType for metadata removal check9392232Map HDR10+ metadata to VideoRangeType.csed86c5fAdd more Dolby Vision Range types45e9d63Remove dynamic hdr metadata when necessaryc5bb1abAllow direct playback of HDR10+ videos on HDR10 clientsbdcf8adOnly use dovi codec tag when dovi metadata is not removedb4034a6Handle DV Profile 7 Videos better1f17fbeFix HDR10+ with new bitmask📊 Changes
21 files changed (+2327 additions, -66 deletions)
View changed files
📝
Jellyfin.Api/Controllers/DynamicHlsController.cs(+5 -4)📝
Jellyfin.Api/Helpers/DynamicHlsHelper.cs(+59 -26)📝
Jellyfin.Data/Enums/VideoRangeType.cs(+21 -0)📝
Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs(+3 -1)➕
MediaBrowser.Controller/MediaEncoding/BitStreamFilterOptionType.cs(+32 -0)📝
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs(+191 -20)📝
MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs(+1 -0)📝
MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs(+7 -0)📝
MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs(+46 -0)📝
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs(+20 -0)📝
MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs(+7 -0)➕
MediaBrowser.MediaEncoding/Probing/MediaFrameInfo.cs(+184 -0)➕
MediaBrowser.MediaEncoding/Probing/MediaFrameSideDataInfo.cs(+16 -0)📝
MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs(+13 -2)📝
MediaBrowser.Model/Dlna/ConditionProcessor.cs(+9 -0)📝
MediaBrowser.Model/Dlna/StreamInfo.cs(+1 -0)📝
MediaBrowser.Model/Entities/MediaStream.cs(+24 -13)📝
src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs(+2 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250327171413_AddHdr10PlusFlag.Designer.cs(+1655 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250327171413_AddHdr10PlusFlag.cs(+28 -0)...and 1 more files
📄 Description
Changes
This is a relatively big change to the way advanced HDR formats are handled. Previously, we were only checking HDR10, HLG, and Dolby Vision files, with a naive mapping of fallbacks. While this approach was somewhat effective, we continue to encounter compatibility issues. This PR addresses these issues by:
VideoRangeType.VideoRangeTypevariants to address common compatibility issues, such as Profile 7 videos, videos with invalid or out-of-specification profile values, and Dolby Vision HDR10+ hybrid videos.Metadata rescan on the already indexed problematic files would be necessary.
Current implementation is abusing the EL flag field to avoid changing the database schema. Should add a proper field once #12798 is merged.DoneIssues
Depends on https://github.com/jellyfin/jellyfin-ffmpeg/pull/519
Fixes jellyfin/jellyfin-androidtv#4021
Fixes jellyfin/jellyfin-androidtv#2700
Fixes jellyfin/jellyfin-androidtv#2630
Fixes #11275
Closes feature request: https://features.jellyfin.org/posts/2557/support-for-playing-dv-profile-7-hybrid-dv-hdr-files-on-non-dv-hdr-device
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.