mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Fixed end of video getting trimmed when it shouldn't
This commit is contained in:
@@ -525,4 +525,4 @@ namespace Flowframes
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,12 @@ namespace Flowframes.Media
|
||||
if (!QuickSettingsTab.trimEnabled)
|
||||
return "";
|
||||
|
||||
return $"-ss {QuickSettingsTab.trimStart} -to {QuickSettingsTab.trimEnd}";
|
||||
string arg = $"-ss {QuickSettingsTab.trimStart}";
|
||||
|
||||
if(QuickSettingsTab.doTrimEnd)
|
||||
arg += $" -to {QuickSettingsTab.trimEnd}";
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
public static async Task ImportSingleImage(string inputFile, string outPath, Size size)
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Flowframes.UI
|
||||
class QuickSettingsTab
|
||||
{
|
||||
public static bool trimEnabled;
|
||||
public static bool doTrimEnd;
|
||||
public static string trimStart;
|
||||
public static string trimEnd;
|
||||
|
||||
@@ -32,6 +33,8 @@ namespace Flowframes.UI
|
||||
|
||||
long dur = FormatUtils.TimestampToMs(trimEnd, false) - FormatUtils.TimestampToMs(trimStart, false);
|
||||
Program.mainForm.currInDurationCut = dur;
|
||||
|
||||
doTrimEnd = FormatUtils.TimestampToMs(trimEnd, false) != FormatUtils.TimestampToMs(FormatUtils.MsToTimestamp(Program.mainForm.currInDuration), false);
|
||||
}
|
||||
|
||||
public static string GetTrimEndMinusOne ()
|
||||
|
||||
Reference in New Issue
Block a user