From a35db453eb1b8195fbc16cc2b94e111108042762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20G=C3=B3recki?= Date: Mon, 23 Jul 2018 20:06:44 +0200 Subject: [PATCH] Fixed empty title metadata. Without this fix in case of empty Title {metadata} tag is not replaced in baseCommand. Because of that invalid command is executed and results in FileNotFoundException. Example of bad commend: 'ffmpeg -y -i "O:\input.mp4" -ss 20 -t 5 -c:v libvpx -b:v 4915K -threads 4 {metadata} -quality best -auto-alt-ref 1 -lag-in-frames 16 -slices 8 -an -pass 1 -f webm NUL'. --- formMain.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/formMain.cs b/formMain.cs index e64c54c..7cd1c8a 100644 --- a/formMain.cs +++ b/formMain.cs @@ -245,6 +245,10 @@ private void btnConvert_Click(object sender, EventArgs e) { baseCommand = baseCommand.Replace("{metadata}", string.Format("-metadata title=\"{0}\"", txtTitle.Text.Replace("\"", "\\\""))); } + else + { + baseCommand = baseCommand.Replace("{metadata}", ""); + } // If everything is valid, continue with the conversion if (verified)