Fix audio with VFR encodes, add WMV to format whitelist, better ascii char warning

This commit is contained in:
N00MKRAD
2020-11-26 23:47:09 +01:00
parent 514e5a8489
commit c1caa7bb77
4 changed files with 14 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ namespace Flowframes.IO
{
class Formats
{
public static string[] supported = { ".mp4", ".m4v", ".gif", ".mkv", ".mpg", ".webm", ".avi", ".ts", ".bik" }; // Supported formats
public static string[] supported = { ".mp4", ".m4v", ".gif", ".mkv", ".mpg", ".webm", ".avi", ".wmv", ".ts", ".bik" }; // Supported formats
public static string[] noEncodeSupport = { ".bik" }; // Files that have no encode support, but decode
public static string[] preprocess = { ".gif" }; // Files that get converted to MP4 first for compat reasons
}

View File

@@ -80,11 +80,12 @@ namespace Flowframes.Main
else
{
await FFmpegCommands.FramesToMp4(framesPath, outPath, h265, crf, fps, "", false, -1, ext); // Create video
await MergeAudio(i.lastInputPath, outPath);
if (looptimes > 0)
await Loop(outPath, looptimes);
}
if (looptimes > 0)
await Loop(outPath, looptimes);
await MergeAudio(i.lastInputPath, outPath);
if (changeFps > 0)
{
string newOutPath = IOUtils.FilenameSuffix(outPath, $"-{changeFps.ToString("0")}fps");

View File

@@ -135,11 +135,16 @@ namespace Flowframes.Main
public static void PathAsciiCheck (string inpath, string outpath)
{
bool shownMsg = false;
if (OSUtils.HasNonAsciiChars(inpath))
Logger.Log("Warning: Input path includes non-ASCII characters. This might cause problems.");
{
ShowMessage("Warning: Input path includes non-ASCII characters. This might cause problems.");
shownMsg = true;
}
if (OSUtils.HasNonAsciiChars(outpath))
Logger.Log("Warning: Output path includes non-ASCII characters. This might cause problems.");
if (!shownMsg && OSUtils.HasNonAsciiChars(outpath))
ShowMessage("Warning: Output path includes non-ASCII characters. This might cause problems.");
}
public static void GifCompatCheck (Interpolate.OutMode outMode, float fpsOut, int targetFrameCount)

View File

@@ -263,7 +263,7 @@ namespace Flowframes
if (!hasShownError && line.ToLower().Contains("modulenotfounderror"))
{
hasShownError = true;
InterpolateUtils.ShowMessage($"A python module is missing. Check {logFilename} for details.\n\n{line}", "Error");
InterpolateUtils.ShowMessage($"A python module is missing. Check {logFilename} for details.\n\n{line}\n\nIf you don't want to install it yourself, use the Python package from the Package Installer.", "Error");
}
if (!hasShownError && line.ToLower().Contains("no longer supports this gpu"))