Add color primaries to ffprobe output

This commit is contained in:
MrTimscampi 2020-05-14 18:52:42 +02:00
parent 234292453f
commit 2e18142bb3
2 changed files with 12 additions and 0 deletions

View file

@ -285,5 +285,12 @@ namespace MediaBrowser.MediaEncoding.Probing
/// <value>The color transfer.</value> /// <value>The color transfer.</value>
[JsonPropertyName("color_transfer")] [JsonPropertyName("color_transfer")]
public string ColorTransfer { get; set; } 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; }
} }
} }

View file

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