mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 12:36:44 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
a91e309da5
6 changed files with 8 additions and 2 deletions
|
@ -123,6 +123,7 @@ public void Probe_Success()
|
||||||
Assert.AreEqual(1, info.PrimaryVideoStream.SampleAspectRatio.Width);
|
Assert.AreEqual(1, info.PrimaryVideoStream.SampleAspectRatio.Width);
|
||||||
Assert.AreEqual(1, info.PrimaryVideoStream.SampleAspectRatio.Height);
|
Assert.AreEqual(1, info.PrimaryVideoStream.SampleAspectRatio.Height);
|
||||||
Assert.AreEqual("yuv420p", info.PrimaryVideoStream.PixelFormat);
|
Assert.AreEqual("yuv420p", info.PrimaryVideoStream.PixelFormat);
|
||||||
|
Assert.AreEqual(31, info.PrimaryVideoStream.Level);
|
||||||
Assert.AreEqual(1280, info.PrimaryVideoStream.Width);
|
Assert.AreEqual(1280, info.PrimaryVideoStream.Width);
|
||||||
Assert.AreEqual(720, info.PrimaryVideoStream.Height);
|
Assert.AreEqual(720, info.PrimaryVideoStream.Height);
|
||||||
Assert.AreEqual(25, info.PrimaryVideoStream.AvgFrameRate);
|
Assert.AreEqual(25, info.PrimaryVideoStream.AvgFrameRate);
|
||||||
|
|
|
@ -17,6 +17,7 @@ public static class VideoCodec
|
||||||
public static Codec LibTheora => FFMpeg.GetCodec("libtheora");
|
public static Codec LibTheora => FFMpeg.GetCodec("libtheora");
|
||||||
public static Codec Png => FFMpeg.GetCodec("png");
|
public static Codec Png => FFMpeg.GetCodec("png");
|
||||||
public static Codec MpegTs => FFMpeg.GetCodec("mpegts");
|
public static Codec MpegTs => FFMpeg.GetCodec("mpegts");
|
||||||
|
public static Codec LibaomAv1 => FFMpeg.GetCodec("libaom-av1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class AudioCodec
|
public static class AudioCodec
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using FFMpegCore.Enums;
|
using FFMpegCore.Enums;
|
||||||
using FFMpegCore.Exceptions;
|
using FFMpegCore.Exceptions;
|
||||||
|
@ -263,7 +262,7 @@ private void ErrorData(object sender, string msg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var processed = TimeSpan.Parse(match.Groups[1].Value, CultureInfo.InvariantCulture);
|
var processed = MediaAnalysisUtils.ParseDuration(match.Groups[1].Value);
|
||||||
_onTimeProgress?.Invoke(processed);
|
_onTimeProgress?.Invoke(processed);
|
||||||
|
|
||||||
if (_onPercentageProgress == null || _totalTimespan == null)
|
if (_onPercentageProgress == null || _totalTimespan == null)
|
||||||
|
|
|
@ -83,6 +83,9 @@ public class FFProbeStream : ITagsContainer, IDispositionContainer
|
||||||
[JsonPropertyName("pix_fmt")]
|
[JsonPropertyName("pix_fmt")]
|
||||||
public string PixelFormat { get; set; } = null!;
|
public string PixelFormat { get; set; } = null!;
|
||||||
|
|
||||||
|
[JsonPropertyName("level")]
|
||||||
|
public int Level { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("sample_rate")]
|
[JsonPropertyName("sample_rate")]
|
||||||
public string SampleRate { get; set; } = null!;
|
public string SampleRate { get; set; } = null!;
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ private VideoStream ParseVideoStream(FFProbeStream stream)
|
||||||
Width = stream.Width ?? 0,
|
Width = stream.Width ?? 0,
|
||||||
Profile = stream.Profile,
|
Profile = stream.Profile,
|
||||||
PixelFormat = stream.PixelFormat,
|
PixelFormat = stream.PixelFormat,
|
||||||
|
Level = stream.Level,
|
||||||
ColorRange = stream.ColorRange,
|
ColorRange = stream.ColorRange,
|
||||||
ColorSpace = stream.ColorSpace,
|
ColorSpace = stream.ColorSpace,
|
||||||
ColorTransfer = stream.ColorTransfer,
|
ColorTransfer = stream.ColorTransfer,
|
||||||
|
|
|
@ -13,6 +13,7 @@ public class VideoStream : MediaStream
|
||||||
public int Height { get; set; }
|
public int Height { get; set; }
|
||||||
public double FrameRate { get; set; }
|
public double FrameRate { get; set; }
|
||||||
public string PixelFormat { get; set; } = null!;
|
public string PixelFormat { get; set; } = null!;
|
||||||
|
public int Level { get; set; }
|
||||||
public int Rotation { get; set; }
|
public int Rotation { get; set; }
|
||||||
public double AverageFrameRate { get; set; }
|
public double AverageFrameRate { get; set; }
|
||||||
public string ColorRange { get; set; } = null!;
|
public string ColorRange { get; set; } = null!;
|
||||||
|
|
Loading…
Reference in a new issue