diff --git a/FFMpegCore.Test/FFProbeTests.cs b/FFMpegCore.Test/FFProbeTests.cs index fc2f2ef..2458c1b 100644 --- a/FFMpegCore.Test/FFProbeTests.cs +++ b/FFMpegCore.Test/FFProbeTests.cs @@ -123,6 +123,7 @@ public void Probe_Success() Assert.AreEqual(1, info.PrimaryVideoStream.SampleAspectRatio.Width); Assert.AreEqual(1, info.PrimaryVideoStream.SampleAspectRatio.Height); Assert.AreEqual("yuv420p", info.PrimaryVideoStream.PixelFormat); + Assert.AreEqual(31, info.PrimaryVideoStream.Level); Assert.AreEqual(1280, info.PrimaryVideoStream.Width); Assert.AreEqual(720, info.PrimaryVideoStream.Height); Assert.AreEqual(25, info.PrimaryVideoStream.AvgFrameRate); diff --git a/FFMpegCore/FFProbe/FFProbeAnalysis.cs b/FFMpegCore/FFProbe/FFProbeAnalysis.cs index 0904db6..9f8e880 100644 --- a/FFMpegCore/FFProbe/FFProbeAnalysis.cs +++ b/FFMpegCore/FFProbe/FFProbeAnalysis.cs @@ -83,6 +83,9 @@ public class FFProbeStream : ITagsContainer, IDispositionContainer [JsonPropertyName("pix_fmt")] public string PixelFormat { get; set; } = null!; + [JsonPropertyName("level")] + public int Level { get; set; } + [JsonPropertyName("sample_rate")] public string SampleRate { get; set; } = null!; diff --git a/FFMpegCore/FFProbe/MediaAnalysis.cs b/FFMpegCore/FFProbe/MediaAnalysis.cs index c8f4887..9976c05 100644 --- a/FFMpegCore/FFProbe/MediaAnalysis.cs +++ b/FFMpegCore/FFProbe/MediaAnalysis.cs @@ -87,6 +87,7 @@ private VideoStream ParseVideoStream(FFProbeStream stream) Width = stream.Width ?? 0, Profile = stream.Profile, PixelFormat = stream.PixelFormat, + Level = stream.Level, ColorRange = stream.ColorRange, ColorSpace = stream.ColorSpace, ColorTransfer = stream.ColorTransfer, diff --git a/FFMpegCore/FFProbe/VideoStream.cs b/FFMpegCore/FFProbe/VideoStream.cs index b647489..377b2d0 100644 --- a/FFMpegCore/FFProbe/VideoStream.cs +++ b/FFMpegCore/FFProbe/VideoStream.cs @@ -13,6 +13,7 @@ public class VideoStream : MediaStream public int Height { get; set; } public double FrameRate { get; set; } public string PixelFormat { get; set; } = null!; + public int Level { get; set; } public int Rotation { get; set; } public double AverageFrameRate { get; set; } public string ColorRange { get; set; } = null!;