Fixed subtitle compat check not running when muxing directly from input

This commit is contained in:
N00MKRAD
2021-03-13 14:11:06 +01:00
parent 992594cceb
commit 545f1a50b4
2 changed files with 9 additions and 4 deletions

View File

@@ -200,8 +200,10 @@ namespace Flowframes.Media
containerExt = containerExt.Remove(".");
bool supported = (containerExt == "mp4" || containerExt == "mkv" || containerExt == "webm" || containerExt == "mov");
Logger.Log($"Subtitles {(supported ? "are supported" : "not supported")} by {containerExt.ToUpper()}", true);
if (Config.GetBool("keepSubs") && !supported)
Logger.Log($"Warning: Subtitles are enabled, but {containerExt.ToUpper()} does not support them. MKV is recommended instead.");
if (showWarningIfNotSupported && Config.GetBool("keepSubs") && !supported)
Logger.Log($"Warning: Subtitle transfer is enabled, but {containerExt.ToUpper()} does not support subtitles properly. MKV is recommended instead.");
return supported;
}
}

View File

@@ -191,10 +191,13 @@ namespace Flowframes.Media
bool audioCompat = Utils.ContainerSupportsAllAudioFormats(I.current.outMode, GetAudioCodecs(interpVideo));
string audioArgs = audioCompat ? "" : Utils.GetAudioFallbackArgs(I.current.outMode);
if (!Config.GetBool("keepAudio"))
bool enableAudio = Config.GetBool("keepAudio");
bool enableSubs = Config.GetBool("keepSubs");
if (!enableAudio)
audioArgs = "-an";
if (!Config.GetBool("keepSubs"))
if (!enableSubs || (enableSubs && Utils.ContainerSupportsSubs(containerExt)))
subArgs = "-sn";
string mkvFix = I.current.outMode == I.OutMode.VidMkv ? "-max_interleave_delta 0" : ""; // https://www.reddit.com/r/ffmpeg/comments/efddfs/starting_new_cluster_due_to_timestamp/