diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-05-18 00:06:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-18 00:06:07 +0900 |
| commit | 4b4b50f3eedc5be92786cc9d4e0d244999107426 (patch) | |
| tree | 3163a2632c4c32c5620447acfeb5284f4c4d4786 /MediaBrowser.MediaEncoding/Probing | |
| parent | e75b2cd33568b3cae2a344190226b1d83a12230f (diff) | |
| parent | 9314434bbf79250f1e545b459c545f57d5acc67c (diff) | |
Merge pull request #3115 from MrTimscampi/ffprobe
Parse color transfer and color primaries from ffprobe, and fix video range
Diffstat (limited to 'MediaBrowser.MediaEncoding/Probing')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs b/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs index 0b2f1d231..a2ea0766a 100644 --- a/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs +++ b/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs @@ -278,5 +278,19 @@ namespace MediaBrowser.MediaEncoding.Probing /// <value>The disposition.</value> [JsonPropertyName("disposition")] public IReadOnlyDictionary<string, int> Disposition { get; set; } + + /// <summary> + /// Gets or sets the color transfer. + /// </summary> + /// <value>The color transfer.</value> + [JsonPropertyName("color_transfer")] + public string ColorTransfer { get; set; } + + /// <summary> + /// Gets or sets the color primaries. + /// </summary> + /// <value>The color primaries.</value> + [JsonPropertyName("color_primaries")] + public string ColorPrimaries { get; set; } } } diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index b24d97f4e..d3f8094b9 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -695,6 +695,16 @@ namespace MediaBrowser.MediaEncoding.Probing { stream.RefFrames = streamInfo.Refs; } + + if (!string.IsNullOrEmpty(streamInfo.ColorTransfer)) + { + stream.ColorTransfer = streamInfo.ColorTransfer; + } + + if (!string.IsNullOrEmpty(streamInfo.ColorPrimaries)) + { + stream.ColorPrimaries = streamInfo.ColorPrimaries; + } } else { |
