[CHANGE] Implementing video fetching and deciphering

This commit is contained in:
max
2025-10-20 13:57:55 +02:00
parent 1555ae9f3d
commit 2b5e93ff8a
10 changed files with 230 additions and 8 deletions

View File

@@ -0,0 +1,8 @@
namespace Manager.YouTube.Models.Innertube;
public class ColorInfo
{
public string Primaries { get; set; } = "";
public string TransferCharacteristics { get; set; } = "";
public string MatrixCoefficients { get; set; } = "";
}

View File

@@ -0,0 +1,7 @@
namespace Manager.YouTube.Models.Innertube;
public class Range
{
public uint Start { get; set; }
public uint End { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace Manager.YouTube.Models.Innertube;
public class StoryBoard
{
public string Spec { get; set; } = "";
public int RecommendedLevel { get; set; }
public int HighResolutionRecommendedLevel { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace Manager.YouTube.Models.Innertube;
public class StreamingData
{
public DateTime FetchedUtc { get; set; } = DateTime.UtcNow;
public int ExpiresInSeconds { get; set; }
public string ServerAbrStreamingUrl { get; set; } = "";
public List<StreamingFormat> Formats { get; set; } = [];
public List<StreamingFormat> AdaptiveFormats { get; set; } = [];
}

View File

@@ -0,0 +1,30 @@
namespace Manager.YouTube.Models.Innertube;
public class StreamingFormat
{
public int Itag { get; set; }
public string Url { get; set; } = "";
public string MimeType { get; set; } = "";
public uint Bitrate { get; set; }
public uint? Width { get; set; }
public uint? Height { get; set; }
public Range? InitRange { get; set; }
public Range? IndexRange { get; set; }
public long LastModified { get; set; }
public long ContentLength { get; set; }
public string Quality { get; set; } = "";
public string? Xtags { get; set; }
public uint Fps { get; set; }
public string QualityLabel { get; set; } = "";
public string ProjectionType { get; set; } = "";
public uint? AverageBitrate { get; set; }
public bool? HighReplication { get; set; }
public ColorInfo? ColorInfo { get; set; }
public string? AudioQuality { get; set; } = "";
public long ApproxDurationMs { get; set; }
public int? AudioSampleRate { get; set; }
public int? AudioChannels { get; set; }
public double? LoudnessDb { get; set; }
public bool? IsDrc { get; set; }
public string QualityOrdinal { get; set; } = "";
}