mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Fixed AAC fallback not working, fixed no output if audio merge failed
This commit is contained in:
@@ -222,7 +222,7 @@ namespace Flowframes.IO
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool TryMove(string source, string target, bool deleteIfExists = true)
|
||||
public static bool TryMove(string source, string target, bool deleteIfExists = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Flowframes.Media
|
||||
{
|
||||
containerExt = containerExt.Remove(".");
|
||||
string codec = "aac";
|
||||
string bitrate = $"{Config.GetInt("aacBitrate", 160)}k";
|
||||
string bitrate = $"{Config.GetInt("aacBitrate", 160)}";
|
||||
|
||||
if(containerExt == "webm" || containerExt == "mkv")
|
||||
{
|
||||
|
||||
@@ -155,6 +155,7 @@ namespace Flowframes.Media
|
||||
if ((File.Exists(outPath) && IOUtils.GetFilesize(outPath) < 1024) || lastOutputFfmpeg.Contains("Invalid data") || lastOutputFfmpeg.Contains("Error initializing output stream"))
|
||||
{
|
||||
Logger.Log("Failed to merge audio, even with re-encoding. Output will not have audio.", false, false, "ffmpeg");
|
||||
IOUtils.TryMove(tempPath, inputFile); // Move temp file back
|
||||
IOUtils.TryDeleteIfExists(tempPath);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user