mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-04-28 07:19:36 -05:00
FF-1361 - parsing video bits
This commit is contained in:
+11
-11
@@ -42,7 +42,7 @@ public class VideoInfo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metadata about a stream in a vidoe file
|
||||
/// Metadata about a stream in a video file
|
||||
/// </summary>
|
||||
public class VideoFileStream
|
||||
{
|
||||
@@ -93,16 +93,6 @@ public class VideoFileStream
|
||||
/// Gets or sets the pixel format that should be used to decode this stream
|
||||
/// </summary>
|
||||
public string PixelFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if this stream is 10 bit
|
||||
/// </summary>
|
||||
public bool Is10Bit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if this stream is 12 bit
|
||||
/// </summary>
|
||||
public bool Is12Bit { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -120,6 +110,16 @@ public class VideoStream : VideoFileStream
|
||||
/// 0 if unknown
|
||||
/// </summary>
|
||||
public int Bits { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if this stream is 10 bit
|
||||
/// </summary>
|
||||
public bool Is10Bit => Bits == 10;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if this stream is 12 bit
|
||||
/// </summary>
|
||||
public bool Is12Bit => Bits == 12;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if this is dolby vision
|
||||
|
||||
@@ -257,8 +257,6 @@ public class VideoInfoHelper
|
||||
|
||||
vs.Codec = line.Substring(line.IndexOf("Video: ") + "Video: ".Length).Replace(",", "").Trim().Split(' ').First().ToLower();
|
||||
vs.PixelFormat = GetDecoderPixelFormat(line);
|
||||
vs.Is10Bit = Regex.IsMatch(line, @"p(0)?10l(b)?e", RegexOptions.IgnoreCase);
|
||||
vs.Is12Bit = Regex.IsMatch(line, @"p(0)?12l(b)?e", RegexOptions.IgnoreCase);
|
||||
|
||||
var dimensions = Regex.Match(line, @"([\d]{3,})x([\d]{3,})");
|
||||
if (int.TryParse(dimensions.Groups[1].Value, out int width))
|
||||
|
||||
Reference in New Issue
Block a user