mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 04:26:44 +00:00
feat: add video-stream level to ffprobe analysis
This commit is contained in:
parent
eb221c3e49
commit
f86d999035
4 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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!;
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ private VideoStream ParseVideoStream(FFProbeStream stream)
|
|||
Width = stream.Width ?? 0,
|
||||
Profile = stream.Profile,
|
||||
PixelFormat = stream.PixelFormat,
|
||||
Level = stream.Level,
|
||||
Rotation = MediaAnalysisUtils.ParseRotation(stream),
|
||||
Language = stream.GetLanguage(),
|
||||
Disposition = MediaAnalysisUtils.FormatDisposition(stream.Disposition),
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue