diff --git a/src/application/Shutter.java b/src/application/Shutter.java index 02d14a79..0bf99f4c 100644 --- a/src/application/Shutter.java +++ b/src/application/Shutter.java @@ -222,6 +222,9 @@ public class Shutter { protected static boolean subtitlesBurn = true; public static boolean autoBurn = false; public static boolean autoEmbed = false; + private static boolean cutKeyframesIsDisplayed = false; + private static boolean rewrapKeyframesIsDisplayed = false; + private static boolean conformKeyframesIsDisplayed = false; public static StringBuilder errorList = new StringBuilder(); public static NumberFormat formatter = new DecimalFormat("00"); public static NumberFormat formatterToMs = new DecimalFormat("000"); @@ -1077,12 +1080,23 @@ public void itemStateChanged(ItemEvent e) { changeFunction(true); changeFilters(); - if (Shutter.comboFonctions.getSelectedItem().toString().equals(Shutter.language.getProperty("functionCut")) - || Shutter.comboFonctions.getSelectedItem().toString().equals(Shutter.language.getProperty("functionRewrap")) - || Shutter.comboFonctions.getSelectedItem().toString().equals(Shutter.language.getProperty("functionConform"))) - { - if (Settings.btnDisableVideoPlayer.isSelected() == false) + if (Settings.btnDisableVideoPlayer.isSelected() == false) + { + if (Shutter.comboFonctions.getSelectedItem().toString().equals(Shutter.language.getProperty("functionCut")) && cutKeyframesIsDisplayed == false) + { + JOptionPane.showMessageDialog(frame, language.getProperty("cutOnKeyframesOnly"), comboFonctions.getSelectedItem().toString(), JOptionPane.INFORMATION_MESSAGE); + cutKeyframesIsDisplayed = true; + } + else if (Shutter.comboFonctions.getSelectedItem().toString().equals(Shutter.language.getProperty("functionRewrap")) && rewrapKeyframesIsDisplayed == false) + { JOptionPane.showMessageDialog(frame, language.getProperty("cutOnKeyframesOnly"), comboFonctions.getSelectedItem().toString(), JOptionPane.INFORMATION_MESSAGE); + rewrapKeyframesIsDisplayed = true; + } + else if (Shutter.comboFonctions.getSelectedItem().toString().equals(Shutter.language.getProperty("functionConform")) && conformKeyframesIsDisplayed == false) + { + JOptionPane.showMessageDialog(frame, language.getProperty("cutOnKeyframesOnly"), comboFonctions.getSelectedItem().toString(), JOptionPane.INFORMATION_MESSAGE); + conformKeyframesIsDisplayed = true; + } } if (VideoPlayer.btnPlay.isVisible() && liste.getSize() > 0) @@ -4046,6 +4060,18 @@ public void run() { if (FFMPEG.error == false) graphicsAccel.add("AMD AMF Encoder"); } + else if (System.getProperty("os.name").contains("Mac")) + { + FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_videotoolbox -s 640x360 -f null -"); + do { + try { + Thread.sleep(10); + } catch (InterruptedException e) {} + } while (FFMPEG.runProcess.isAlive()); + + if (FFMPEG.error == false) + graphicsAccel.add("OSX VideoToolbox"); + } if (comboAccel.getModel().getSize() != graphicsAccel.size()) { @@ -6684,12 +6710,7 @@ else if (comboAudioCodec.getSelectedItem().toString().equals("Opus")) if (comboFonctions.getSelectedItem().toString().contains("H.26")) { - if (comboAudioCodec.getSelectedItem().toString().contains("PCM")) - { - comboFilter.setSelectedIndex(1); - lblAudioKbs.setVisible(true); - } - else if (comboAudioCodec.getSelectedItem().toString().contains("FLAC")) + if (comboAudioCodec.getSelectedItem().toString().contains("FLAC")) { comboFilter.setSelectedIndex(2); lblAudioKbs.setVisible(false); @@ -9564,6 +9585,7 @@ public void mouseMoved(MouseEvent e) { text.setSize(grpOverlay.getWidth() - text.getX() - 10, 21); text.setHorizontalAlignment(SwingConstants.LEFT); text.setFont(new Font("SansSerif", Font.PLAIN, 12)); + text.setToolTipText("{codec/function}
{preset}
{resolution/scale}
{width}
{height}
{ratio/aspect}
{framerate/fps}
{bitrate}
{timecode}
{duration/time}
{date}"); grpOverlay.add(text); text.addKeyListener(new KeyListener(){ @@ -9675,7 +9697,9 @@ protected void paintComponent(Graphics g) String str = new File(file).getName().replace(ext, ""); if (caseAddText.isSelected()) - str = text.getText(); + { + str = FunctionUtils.setSuffix(text.getText(), true); + } Rectangle bounds = getStringBounds(g2, str, 0 ,0); @@ -18266,7 +18290,7 @@ public void actionPerformed(ActionEvent arg0) { comboForcePreset.setSelectedIndex(3); } } - else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder") || comboAccel.getSelectedItem().equals("OSX VideoToolbox")) + else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder") || comboAccel.getSelectedItem().equals("OSX VideoToolbox") || comboAccel.getSelectedItem().equals("Vulkan Video")) { caseForcePreset.setSelected(false); caseForcePreset.setEnabled(false); @@ -20659,6 +20683,14 @@ else if ("H.266".equals(comboFonctions.getSelectedItem().toString())) if (FFMPEG.error == false) graphicsAccel.add("AMD AMF Encoder"); + FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_vulkan -s 640x360 -f null -" + '"'); + do { + Thread.sleep(10); + } while (FFMPEG.runProcess.isAlive()); + + if (FFMPEG.error == false) + graphicsAccel.add("Vulkan Video"); + /* if (codec == "hevc") { @@ -20830,7 +20862,7 @@ else if (comboForceProfile.getModel().getSize() != 3 || comboForceProfile.getMod comboForcePreset.setSelectedIndex(3); } } - else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder") || comboAccel.getSelectedItem().equals("OSX VideoToolbox")) + else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder") || comboAccel.getSelectedItem().equals("OSX VideoToolbox") || comboAccel.getSelectedItem().equals("Vulkan Video")) { caseForcePreset.setSelected(false); caseForcePreset.setEnabled(false); @@ -21251,6 +21283,18 @@ else if ("AV1".equals(comboFonctions.getSelectedItem().toString())) if (FFMPEG.error == false) graphicsAccel.add("AMD AMF Encoder"); } + else if (System.getProperty("os.name").contains("Mac")) + { + FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_videotoolbox -s 640x360 -f null -"); + do { + try { + Thread.sleep(10); + } catch (InterruptedException e) {} + } while (FFMPEG.runProcess.isAlive()); + + if (FFMPEG.error == false) + graphicsAccel.add("OSX VideoToolbox"); + } } if (comboAccel.getModel().getSize() != graphicsAccel.size()) @@ -23099,7 +23143,10 @@ else if (tabs == 6) } public static void disableAll() { - + + Utils.disableSleepMode = false; + Utils.disableSleepMode(); + Component[] components = frame.getContentPane().getComponents(); if (scanIsRunning) { @@ -23266,6 +23313,8 @@ public static void disableAll() { public static void enableAll() { + Utils.disableSleepMode = true; + Component[] components = frame.getContentPane().getComponents(); if (scanIsRunning) { @@ -23643,7 +23692,7 @@ public static void enableAll() { case2pass.setEnabled(false); } - if (comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && (comboAccel.getSelectedItem().equals("AMD AMF Encoder") || comboAccel.getSelectedItem().equals("OSX VideoToolbox"))) + if (comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && (comboAccel.getSelectedItem().equals("AMD AMF Encoder") || comboAccel.getSelectedItem().equals("OSX VideoToolbox") || comboAccel.getSelectedItem().equals("Vulkan Video"))) { caseForcePreset.setSelected(false); caseForcePreset.setEnabled(false); diff --git a/src/application/Utils.java b/src/application/Utils.java index a8c03f67..af0a0c52 100644 --- a/src/application/Utils.java +++ b/src/application/Utils.java @@ -25,6 +25,9 @@ import java.awt.Dimension; import java.awt.FileDialog; import java.awt.Insets; +import java.awt.MouseInfo; +import java.awt.Point; +import java.awt.Robot; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -34,6 +37,8 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.Locale; +import java.util.Timer; +import java.util.TimerTask; import javax.swing.BorderFactory; import javax.swing.DefaultComboBoxModel; @@ -88,6 +93,7 @@ public class Utils extends Shutter { public static Color highlightColor = new Color(129, 198, 253); public static boolean yesToAll = false; public static boolean noToAll = false; + public static boolean disableSleepMode = true; public final static String username = "info@shutterencoder.com"; public final static String password = ""; @@ -2193,6 +2199,31 @@ public static void restartApp() { } + public static void disableSleepMode() { + + Timer timer = new Timer(); + + timer.scheduleAtFixedRate(new TimerTask() { + + @Override + public void run() { + try { + // Simulate moving the mouse slightly (1 pixel) + Robot robot = new Robot(); + Point currentMousePosition = MouseInfo.getPointerInfo().getLocation(); + robot.mouseMove(currentMousePosition.x + 1, currentMousePosition.y + 1); + robot.mouseMove(currentMousePosition.x, currentMousePosition.y); + + if (disableSleepMode) + { + timer.cancel(); + } + + } catch (Exception e) {} + } + }, 0, 60000); + } + public static void killProcesses() { try { diff --git a/src/application/VideoPlayer.java b/src/application/VideoPlayer.java index 8d3be7a8..9187669b 100644 --- a/src/application/VideoPlayer.java +++ b/src/application/VideoPlayer.java @@ -5344,8 +5344,9 @@ else if (FFMPEG.qsvAvailable && yadif == "") { filter += "scale_qsv=" + width + ":" + height + ":mode=low_power,hwdownload,format=" + bitDepth; } - else if (FFMPEG.videotoolboxAvailable && yadif == "") + else if (FFMPEG.videotoolboxAvailable) { + filter = filter.replace("yadif", "yadif_videotoolbox"); filter += "scale_vt=" + width + ":" + height + ",hwdownload,format=" + bitDepth; } else diff --git a/src/functions/AudioEncoders.java b/src/functions/AudioEncoders.java index 5787bb77..a1680984 100644 --- a/src/functions/AudioEncoders.java +++ b/src/functions/AudioEncoders.java @@ -109,7 +109,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //DRC diff --git a/src/functions/AudioNormalization.java b/src/functions/AudioNormalization.java index 4cb953a6..3f99f943 100644 --- a/src/functions/AudioNormalization.java +++ b/src/functions/AudioNormalization.java @@ -81,7 +81,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Output name diff --git a/src/functions/Command.java b/src/functions/Command.java index 6c73f583..c8086367 100644 --- a/src/functions/Command.java +++ b/src/functions/Command.java @@ -75,9 +75,16 @@ public void run() { //Output folder String labelOutput = FunctionUtils.setOutputDestination("", file); - //Output name - String fileOutputName = labelOutput + "/" + fileName.replace(extension, comboFilter.getEditor().getItem().toString()) ; + //File output name + String extensionName = ""; + if (btnExtension.isSelected()) + { + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); + } + //Output name + String fileOutputName = labelOutput + "/" + fileName.replace(extension, extensionName + comboFilter.getEditor().getItem().toString()) ; + //File output File fileOut = new File(fileOutputName); if(fileOut.exists()) diff --git a/src/functions/Conform.java b/src/functions/Conform.java index bd5e1de5..41c188ba 100644 --- a/src/functions/Conform.java +++ b/src/functions/Conform.java @@ -87,7 +87,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Output name diff --git a/src/functions/Extract.java b/src/functions/Extract.java index 095838be..e6adda4c 100644 --- a/src/functions/Extract.java +++ b/src/functions/Extract.java @@ -85,7 +85,7 @@ public void run() { if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } } else if (comboFilter.getSelectedItem().toString().equals(language.getProperty("audio"))) @@ -94,7 +94,7 @@ else if (comboFilter.getSelectedItem().toString().equals(language.getProperty("a if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()) + "_" + (audioStream + 1); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false) + "_" + (audioStream + 1); } } else if (comboFilter.getSelectedItem().toString().equals(language.getProperty("subtitles"))) @@ -103,7 +103,7 @@ else if (comboFilter.getSelectedItem().toString().equals(language.getProperty("s if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()) + "_" + (subStream + 1); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false) + "_" + (subStream + 1); } } diff --git a/src/functions/Merge.java b/src/functions/Merge.java index 8e55af6a..5aff4023 100644 --- a/src/functions/Merge.java +++ b/src/functions/Merge.java @@ -33,6 +33,7 @@ import library.FFMPEG; import library.FFPROBE; import settings.FunctionUtils; +import settings.Timecode; public class Merge extends Shutter { @@ -66,7 +67,9 @@ public void run() { int totalLength = 0; frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - PrintWriter writer = new PrintWriter(listeBAB, "UTF-8"); + PrintWriter writer = new PrintWriter(listeBAB, "UTF-8"); + //Timecode + String timecode = ""; for (int i = 0 ; i < liste.getSize() ; i++) { @@ -91,8 +94,12 @@ public void run() { try { Thread.sleep(1); } catch (InterruptedException e1) {} - } while (FFPROBE.isRunning); - + } while (FFPROBE.isRunning); + + if (i == 0) + { + timecode = Timecode.setTimecode(); + } totalLength += FFPROBE.totalLength; FFPROBE.totalLength = 0; @@ -123,7 +130,7 @@ public void run() { openGOP = " -copyinkf"; //Command - String cmd = " -timecode 00:00:00:00" + openGOP + " -video_track_timescale 90000 -c:v copy -c:s copy" + audio + " -map v:0?" + audioMapping + metadatas + " -map s? -y "; + String cmd = timecode + openGOP + " -video_track_timescale 90000 -c:v copy -c:s copy" + audio + " -map v:0?" + audioMapping + metadatas + " -map s? -y "; FFMPEG.run(" -safe 0 -f concat -i " + '"' + listeBAB.toString() + '"' + cmd + '"' + fileOutputName + '"'); do diff --git a/src/functions/Picture.java b/src/functions/Picture.java index 649fd05e..7f96522f 100644 --- a/src/functions/Picture.java +++ b/src/functions/Picture.java @@ -240,7 +240,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Container @@ -467,6 +467,10 @@ else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder")) { encoder = " -c:v av1_amf"; } + else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox")) + { + encoder = " -c:v av1_videotoolbox"; + } } return encoder + " -crf " + Math.round((float) 63 - (float) ((float) ((float) Integer.valueOf(comboImageOption.getSelectedItem().toString().replace("%", "")) * 63) / 100)); diff --git a/src/functions/ReplaceAudio.java b/src/functions/ReplaceAudio.java index 7838670f..11ee4c9b 100644 --- a/src/functions/ReplaceAudio.java +++ b/src/functions/ReplaceAudio.java @@ -57,7 +57,7 @@ private static void main(String audioFiles, String audioExt, File videoFile) thr String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Output name diff --git a/src/functions/Rewrap.java b/src/functions/Rewrap.java index 7d61e94f..417450e0 100644 --- a/src/functions/Rewrap.java +++ b/src/functions/Rewrap.java @@ -122,7 +122,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Function cut without re-encoding diff --git a/src/functions/VideoEncoders.java b/src/functions/VideoEncoders.java index 82aa54a6..ecc15d69 100644 --- a/src/functions/VideoEncoders.java +++ b/src/functions/VideoEncoders.java @@ -173,7 +173,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Container @@ -1264,6 +1264,10 @@ else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder")) { return " -c:v av1_amf"; } + else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox")) + { + return " -c:v av1_videotoolbox"; + } } else return " -c:v libsvtav1"; @@ -1321,6 +1325,8 @@ else if (comboAccel.getSelectedItem().equals("Intel Quick Sync")) return " -c:v h264_qsv"; else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder")) return " -c:v h264_amf"; + else if (comboAccel.getSelectedItem().equals("Vulkan Video")) + return " -c:v h264_vulkan"; else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox")) return " -c:v h264_videotoolbox"; else if (comboAccel.getSelectedItem().equals("VAAPI")) @@ -1345,6 +1351,8 @@ else if (comboAccel.getSelectedItem().equals("Intel Quick Sync")) return " -c:v hevc_qsv"; else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder")) return " -c:v hevc_amf"; + else if (comboAccel.getSelectedItem().equals("Vulkan Video")) + return " -c:v hevc_vulkan"; else if (comboAccel.getSelectedItem().equals("D3D12VA")) return " -c:v hevc_d3d12va"; else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox")) diff --git a/src/functions/VideoInserts.java b/src/functions/VideoInserts.java index 3ae61a3c..570f6dc1 100644 --- a/src/functions/VideoInserts.java +++ b/src/functions/VideoInserts.java @@ -124,7 +124,7 @@ public void run() { String extensionName = ""; if (btnExtension.isSelected()) { - extensionName = FunctionUtils.setSuffix(txtExtension.getText()); + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); } //Output folder diff --git a/src/settings/AdvancedFeatures.java b/src/settings/AdvancedFeatures.java index ede1f774..9e5d83ae 100644 --- a/src/settings/AdvancedFeatures.java +++ b/src/settings/AdvancedFeatures.java @@ -89,6 +89,10 @@ else if (comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLo { return " -quality quality"; } + else if (comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && comboAccel.getSelectedItem().equals("Vulkan Video")) + { + return " -tune hq"; + } else return " -preset veryslow"; } diff --git a/src/settings/FunctionUtils.java b/src/settings/FunctionUtils.java index e47ac9ab..60b49a56 100644 --- a/src/settings/FunctionUtils.java +++ b/src/settings/FunctionUtils.java @@ -707,7 +707,7 @@ else if (caseSubFolder.isSelected() && txtSubFolder.getText().equals("") == fals return output; } - public static String setSuffix(String suffix) { + public static String setSuffix(String suffix, boolean isOverlay) { suffix = suffix.replace("[", "{").replace("]", "}"); @@ -843,7 +843,7 @@ else if (suffix.contains("{function}")) suffix = suffix.replace("{date}", currentDate.toString()); } - + if (suffix.contains("{duration}")) { suffix = suffix.replace("{duration}", Shutter.formatter.format(VideoPlayer.durationH) + "." + Shutter.formatter.format(VideoPlayer.durationM) + "." + Shutter.formatter.format(VideoPlayer.durationS) + "." + Shutter.formatter.format(VideoPlayer.durationF)); diff --git a/src/settings/Image.java b/src/settings/Image.java index 7e7a6bed..9fe33dc9 100644 --- a/src/settings/Image.java +++ b/src/settings/Image.java @@ -386,11 +386,15 @@ else if (autoCUDA || Shutter.comboGPUFilter.getSelectedItem().toString().equals( filterComplex += ",hwdownload,format=" + bitDepth; } } - else if ((autoVIDEOTOOLBOX || Shutter.comboGPUFilter.getSelectedItem().toString().equals("videotoolbox") && FFMPEG.isGPUCompatible) && caseForcerDesentrelacement.isSelected() == false && filterComplex.contains("yadif") == false && filterComplex.contains("force_original_aspect_ratio") == false && lblPad.getText().equals(language.getProperty("lblCrop")) == false) + else if ((autoVIDEOTOOLBOX || Shutter.comboGPUFilter.getSelectedItem().toString().equals("videotoolbox") && FFMPEG.isGPUCompatible) && filterComplex.contains("force_original_aspect_ratio") == false && lblPad.getText().equals(language.getProperty("lblCrop")) == false) { - filterComplex = filterComplex.replace("scale=", "scale_vt="); + if (caseForcerDesentrelacement.isSelected() == false || caseForcerDesentrelacement.isSelected() && filterComplex.contains("yadif")) + { + filterComplex = filterComplex.replace("yadif=", "yadif_videotoolbox="); + filterComplex = filterComplex.replace("scale=", "scale_vt="); - filterComplex += ",hwdownload,format=" + bitDepth; + filterComplex += ",hwdownload,format=" + bitDepth; + } } } diff --git a/src/settings/Overlay.java b/src/settings/Overlay.java index 9b98d2c3..a0020794 100644 --- a/src/settings/Overlay.java +++ b/src/settings/Overlay.java @@ -368,8 +368,10 @@ else if (s[1].equals("auto")) if (Shutter.caseAddText.isSelected()) { + String text = FunctionUtils.setSuffix(Shutter.text.getText(), true); + if (filterComplex != "") filterComplex += ","; - filterComplex += "drawtext=" + overlayFont + ":text='" + Shutter.text.getText() + "':r=" + rate + ":x=" + Math.round(Integer.parseInt(Shutter.textNamePosX.getText()) / imageRatio) + ":y=" + Math.round(Integer.parseInt(Shutter.textNamePosY.getText()) / imageRatio) + ":fontcolor=0x" + Shutter.foregroundHex + Shutter.foregroundNameAlpha + ":fontsize=" + Math.round(Integer.parseInt(Shutter.textNameSize.getText()) / imageRatio) + ":box=1:boxcolor=0x" + Shutter.backgroundHex + Shutter.backgroundNameAlpha; + filterComplex += "drawtext=" + overlayFont + ":text='" + text + "':r=" + rate + ":x=" + Math.round(Integer.parseInt(Shutter.textNamePosX.getText()) / imageRatio) + ":y=" + Math.round(Integer.parseInt(Shutter.textNamePosY.getText()) / imageRatio) + ":fontcolor=0x" + Shutter.foregroundHex + Shutter.foregroundNameAlpha + ":fontsize=" + Math.round(Integer.parseInt(Shutter.textNameSize.getText()) / imageRatio) + ":box=1:boxcolor=0x" + Shutter.backgroundHex + Shutter.backgroundNameAlpha; } if ((Shutter.caseAddTimecode.isSelected() || Shutter.caseShowTimecode.isSelected()))