FF-1534: webvtt fix

This commit is contained in:
John Andrews
2024-05-08 16:56:01 +12:00
parent f31c2b66c2
commit 6dfa6c24d0
3 changed files with 4 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -127,6 +127,7 @@ public class VideoInfoHelper
int videoIndex = 0;
int audioIndex = 0;
int attachmentIndex = 0;
bool webvtt = output.Contains("Unknown/unsupported AVCodecID S_TEXT/WEBVTT");
foreach (Match sm in streamMatches)
{
if (sm.Value.Contains(" Video: "))
@@ -167,6 +168,9 @@ public class VideoInfoHelper
var match = Regex.Match(sm.Value, @"(?<=(Stream #))[\d]+:[\d]+");
if (match.Success)
sub.IndexString = match.Value;
if ((string.IsNullOrEmpty(sub.Codec) || sub.Codec.ToLowerInvariant() == "none") && webvtt)
sub.Codec = "webvtt";
vi.SubtitleStreams.Add(sub);
}
++subtitleIndex;