Browse Source

Add color primaries to ffprobe output

MrTimscampi 5 years ago
parent
commit
2e18142bb3

+ 7 - 0
MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs

@@ -285,5 +285,12 @@ namespace MediaBrowser.MediaEncoding.Probing
         /// <value>The color transfer.</value>
         [JsonPropertyName("color_transfer")]
         public string ColorTransfer { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color transfer.
+        /// </summary>
+        /// <value>The color transfer.</value>
+        [JsonPropertyName("color_primaries")]
+        public string ColorPrimaries { get; set; }
     }
 }

+ 5 - 0
MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs

@@ -700,6 +700,11 @@ namespace MediaBrowser.MediaEncoding.Probing
                 {
                     stream.ColorTransfer = streamInfo.ColorTransfer;
                 }
+
+                if (!string.IsNullOrEmpty(streamInfo.ColorPrimaries))
+                {
+                    stream.ColorPrimaries = streamInfo.ColorPrimaries;
+                }
             }
             else
             {