diff --git a/src/application/RenderQueue.java b/src/application/RenderQueue.java index c301845f..24475361 100644 --- a/src/application/RenderQueue.java +++ b/src/application/RenderQueue.java @@ -642,6 +642,7 @@ public boolean isCellEditable(int row, int column) { } }; table.setForeground(new Color(235,235,240)); + table.setBackground(new Color(42,42,47)); table.setDefaultRenderer(String.class, new BoardTableCellRenderer()); table.setShowVerticalLines(false); table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); diff --git a/src/application/Settings.java b/src/application/Settings.java index 1808343e..1fc207c4 100644 --- a/src/application/Settings.java +++ b/src/application/Settings.java @@ -108,7 +108,6 @@ public class Settings { public static JTextField txtImageDuration = new JTextField(); private JLabel lblScaleMode = new JLabel(Shutter.language.getProperty("lblScaleMode")); public static JComboBox comboScale = new JComboBox(new String [] {"fast_bilinear", "bilinear", "bicubic", "neighbor", "area", "gauss", "sinc", "lanczos", "spline"}); - public static JCheckBox btnNoUpscale = new JCheckBox(Shutter.language.getProperty("btnNoUpscale")); public static JCheckBox btnPreviewOutput = new JCheckBox(Shutter.language.getProperty("btnPreviewOutput")); private JLabel lblSyncMode = new JLabel(Shutter.language.getProperty("lblSyncMode")); public static JComboBox comboSync = new JComboBox(new String [] {"auto", "passthrough", "cfr", "vfr", "drop"}); @@ -153,7 +152,6 @@ public Settings() { btnHidePath.setName("btnHidePath"); btnLoadPreset.setName("btnLoadPreset"); comboLoadPreset.setName("comboLoadPreset"); - btnNoUpscale.setName("btnNoUpscale"); btnPreviewOutput.setName("btnPreviewOutput"); btnWaitFileComplete.setName("btnWaitFileComplete"); btnDisableAnimations.setName("btnDisableAnimations"); @@ -174,7 +172,7 @@ public Settings() { txtImageDuration.setName("txtImageDuration"); comboLanguage.setName("comboLanguage"); - frame.setSize(370, 750); + frame.setSize(370, 722); if (Shutter.getLanguage.equals(Locale.of("ru").getDisplayLanguage()) || Shutter.getLanguage.equals(Locale.of("uk").getDisplayLanguage())) { frame.setSize(frame.getWidth() + 30, frame.getHeight()); @@ -465,23 +463,8 @@ public void actionPerformed(ActionEvent arg0) { comboAction.setEnabled(false); frame.getContentPane().add(comboAction); - btnNoUpscale.setFont(new Font(Shutter.freeSansFont, Font.PLAIN, 12)); - btnNoUpscale.setBounds(12, btnEndingAction.getLocation().y + btnEndingAction.getHeight() + 10, btnNoUpscale.getPreferredSize().width, 16); - frame.getContentPane().add(btnNoUpscale); - - btnNoUpscale.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent arg0) { - - VideoPlayer.playerSetTime(VideoPlayer.playerCurrentFrame); //Use VideoPlayer.resizeAll and reload the frame - VideoPlayer.resizeAll(); - } - - }); - btnPreviewOutput.setFont(new Font(Shutter.freeSansFont, Font.PLAIN, 12)); - btnPreviewOutput.setBounds(12, btnNoUpscale.getLocation().y + btnNoUpscale.getHeight() + 10, btnPreviewOutput.getPreferredSize().width, 16); + btnPreviewOutput.setBounds(12, btnEndingAction.getLocation().y + btnEndingAction.getHeight() + 10, btnPreviewOutput.getPreferredSize().width, 16); frame.getContentPane().add(btnPreviewOutput); btnPreviewOutput.addActionListener(new ActionListener() { diff --git a/src/application/Shutter.java b/src/application/Shutter.java index 0c41f0f9..0832429c 100644 --- a/src/application/Shutter.java +++ b/src/application/Shutter.java @@ -144,6 +144,7 @@ import org.eclipse.swt.widgets.Shell; import com.formdev.flatlaf.extras.FlatSVGIcon; +import com.formdev.flatlaf.ui.FlatLineBorder; import functions.AudioEncoders; import functions.AudioNormalization; @@ -152,6 +153,7 @@ import functions.Conform; import functions.DVDRIP; import functions.Extract; +import functions.FrameMD5; import functions.LoudnessTruePeak; import functions.Merge; import functions.OfflineDetection; @@ -302,6 +304,7 @@ public class Shutter { protected static JCheckBox caseRotate; protected static JComboBox comboRotate; protected static JCheckBox caseMiror; + protected static JCheckBox btnNoUpscale; public static JCheckBox caseCreateSequence; protected static JLabel lblInterpretation; protected static JLabel lblIsInterpret; @@ -1997,7 +2000,7 @@ private void grpChooseFiles() { grpChooseFiles.setLayout(null); grpChooseFiles.setBounds(10, 30, 312, frame.getHeight() - 377); grpChooseFiles.setBackground(new Color(30,30,35)); - grpChooseFiles.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpChooseFiles.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpChooseFiles") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); frame.getContentPane().add(grpChooseFiles); @@ -3074,8 +3077,9 @@ private void grpChooseFunction() { grpChooseFunction.setLayout(null); grpChooseFunction.setBounds(10, grpChooseFiles.getY() + grpChooseFiles.getHeight() + 4, 312, 76); grpChooseFunction.setBackground(new Color(30,30,35)); - grpChooseFunction.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpChooseFunction.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpChooseFunction") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + frame.getContentPane().add(grpChooseFunction); btnCancel = new JButton(language.getProperty("btnCancel")); @@ -3554,6 +3558,13 @@ else if (scanIsRunning) else VMAF.main(); + } else if ("FrameMD5".equals(function)) { + + if (inputDeviceIsRunning) + JOptionPane.showMessageDialog(frame, language.getProperty("incompatibleInputDevice"), language.getProperty("menuItemScreenRecord"), JOptionPane.ERROR_MESSAGE); + else + FrameMD5.main(); + } else if ("DNxHD".equals(function) || "DNxHR".equals(function) || "Apple ProRes".equals(function) @@ -3713,7 +3724,7 @@ else if (btnStart.getText().equals(language.getProperty("btnStopRecording"))) language.getProperty("functionSceneDetection"), language.getProperty("functionBlackDetection"), language.getProperty("functionOfflineDetection"), - "VMAF", + "VMAF", "FrameMD5", language.getProperty("itemDownload"), language.getProperty("functionWeb") @@ -3856,6 +3867,7 @@ else if (comboFonctions.getSelectedItem().equals(language.getProperty("itemAnaly newList.add(language.getProperty("functionBlackDetection")); newList.add(language.getProperty("functionOfflineDetection")); newList.add(("VMAF")); + newList.add(("FrameMD5")); } else if (comboFonctions.getSelectedItem().equals(language.getProperty("itemDownload"))) { @@ -4240,7 +4252,7 @@ private void grpDestination() { grpDestination = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT); grpDestination.setBounds(12, grpChooseFunction.getY() + grpChooseFunction.getHeight() + 10, 308, 122); - grpDestination.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true))); + grpDestination.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(1,1,1,1), new Color(55,55,55), 1, 5))); grpDestination.setFont(new Font(montserratFont, Font.PLAIN, 11)); frame.getContentPane().add(grpDestination); @@ -5341,7 +5353,7 @@ private void grpProgress() { grpProgression.setBounds(10, grpDestination.getY() + grpDestination.getHeight() + 6, 312, 94); grpProgression.setBackground(new Color(30,30,35)); grpProgression.setToolTipText(language.getProperty("rightClick")); - grpProgression.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpProgression.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpProgression") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); frame.getContentPane().add(grpProgression); @@ -5486,10 +5498,10 @@ private void grpResolution() { grpResolution = new JPanel(); grpResolution.setLayout(null); grpResolution.setVisible(false); - grpResolution.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpResolution.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpResolution") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpResolution.setBackground(new Color(30,30,35)); - grpResolution.setBounds(frame.getWidth(), 30, 312, 102); + grpResolution.setBounds(frame.getWidth(), 30, 312, 121); frame.getContentPane().add(grpResolution); comboResolution = new JComboBox(); @@ -5601,6 +5613,7 @@ else if (comboFonctions.getSelectedItem().equals(language.getProperty("functionM && comboFonctions.getSelectedItem().equals(language.getProperty("functionBlackDetection")) == false && comboFonctions.getSelectedItem().equals(language.getProperty("functionOfflineDetection")) == false && comboFonctions.getSelectedItem().equals("VMAF") == false + && comboFonctions.getSelectedItem().equals("FrameMD5") == false && comboFonctions.getSelectedItem().equals(language.getProperty("functionWeb")) == false && comboFonctions.getSelectedItem().equals(language.getProperty("itemMyFunctions")) == false && (RenderQueue.frame == null || RenderQueue.frame != null && RenderQueue.frame.isVisible() == false) @@ -5712,6 +5725,66 @@ public void actionPerformed(ActionEvent arg0) { }); + caseForcerDAR = new JCheckBox(language.getProperty("caseForcerDAR")); + caseForcerDAR.setName("caseForcerDAR"); + caseForcerDAR.setFont(new Font(freeSansFont, Font.PLAIN, 12)); + caseForcerDAR.setSize(caseForcerDAR.getPreferredSize().width, 23); + caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); + grpResolution.add(caseForcerDAR); + + caseForcerDAR.addMouseListener(new MouseAdapter() { + + @Override + public void mouseClicked(MouseEvent arg0) { + + if (caseForcerDAR.isSelected()) + comboDAR.setEnabled(true); + else + comboDAR.setEnabled(false); + + VideoPlayer.btnStop.doClick(); //Use VideoPlayer.resizeAll and reload the frame + } + + }); + + comboDAR = new JComboBox(); + comboDAR.setName("comboDAR"); + comboDAR.setMaximumRowCount(20); + comboDAR.setModel(new DefaultComboBoxModel(new String[] { "1:1", "4:3", "9:16", "16:9", "21:9", "1.85", "2.35", "2.39"})); + comboDAR.setSelectedIndex(3); + comboDAR.setFont(new Font(freeSansFont, Font.PLAIN, 11)); + comboDAR.setEditable(true); + comboDAR.setSize(54, 16); + comboDAR.setLocation(caseForcerDAR.getLocation().x + caseForcerDAR.getWidth() + 4, caseForcerDAR.getLocation().y + 3); + grpResolution.add(comboDAR); + + comboDAR.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent arg0) { + + VideoPlayer.btnStop.doClick(); //Use VideoPlayer.resizeAll and reload the frame + } + + }); + + btnNoUpscale = new JCheckBox(Shutter.language.getProperty("btnNoUpscale")); + btnNoUpscale.setName("btnNoUpscale"); + btnNoUpscale.setFont(new Font(Shutter.freeSansFont, Font.PLAIN, 12)); + btnNoUpscale.setBounds(12, caseRotate.getLocation().y + caseRotate.getHeight(), btnNoUpscale.getPreferredSize().width, 16); + grpResolution.add(btnNoUpscale); + + btnNoUpscale.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent arg0) { + + VideoPlayer.playerSetTime(VideoPlayer.playerCurrentFrame); //Use VideoPlayer.resizeAll and reload the frame + VideoPlayer.resizeAll(); + } + + }); + caseCreateSequence = new JCheckBox(language.getProperty("caseCreateSequence")); caseCreateSequence.setName("caseCreateSequence"); caseCreateSequence.setFont(new Font(freeSansFont, Font.PLAIN, 12)); @@ -5922,7 +5995,7 @@ private void grpImageFilter() { grpImageFilter = new JPanel(); grpImageFilter.setLayout(null); grpImageFilter.setVisible(false); - grpImageFilter.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpImageFilter.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpFiltreImage") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpImageFilter.setBackground(new Color(30,30,35)); grpImageFilter.setBounds(frame.getWidth(), 199, 312, 17); @@ -6172,7 +6245,7 @@ private void grpSetTimecode() { grpSetTimecode = new JPanel(); grpSetTimecode.setLayout(null); grpSetTimecode.setVisible(false); - grpSetTimecode.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), language.getProperty("grpTimecode") + " ", + grpSetTimecode.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpTimecode") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpSetTimecode.setBackground(new Color(30,30,35)); grpSetTimecode.setBounds(frame.getWidth(), 258, 312, 17); @@ -6405,7 +6478,7 @@ private void grpSetAudio() { grpSetAudio = new JPanel(); grpSetAudio.setLayout(null); grpSetAudio.setVisible(false); - grpSetAudio.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpSetAudio.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpAudio") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpSetAudio.setBackground(new Color(30,30,35)); grpSetAudio.setBounds(frame.getWidth(), 343, 312, 47); @@ -7150,7 +7223,7 @@ private void grpAudio() { grpAudio = new JPanel(); grpAudio.setLayout(null); grpAudio.setVisible(false); - grpAudio.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpAudio.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpAudio") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpAudio.setBackground(new Color(30,30,35)); grpAudio.setBounds(frame.getWidth(), 343, 312, 139); @@ -7190,6 +7263,7 @@ else if (lblMix.getText().equals("5.1")) lblMix = new JLabel(language.getProperty("stereo")); lblMix.setName("lblMix"); + lblMix.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblMix.setBackground(new Color(42,42,47)); lblMix.setHorizontalAlignment(SwingConstants.CENTER); lblMix.setOpaque(true); @@ -7269,6 +7343,7 @@ public void actionPerformed(ActionEvent e) { lblSplit = new JLabel(language.getProperty("mono")); lblSplit.setName("lblSplit"); + lblSplit.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblSplit.setBackground(new Color(42,42,47)); lblSplit.setHorizontalAlignment(SwingConstants.CENTER); lblSplit.setOpaque(true); @@ -7427,7 +7502,7 @@ private void grpCrop() { grpCrop = new JPanel(); grpCrop.setLayout(null); grpCrop.setVisible(false); - grpCrop.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("frameCropImage") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpCrop.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("frameCropImage") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpCrop.setBackground(new Color(30,30,35)); grpCrop.setSize(312, 17); grpCrop.setLocation(frame.getWidth(), grpImageAdjustement.getY()); @@ -8460,7 +8535,7 @@ private void grpOverlay() { grpOverlay = new JPanel(); grpOverlay.setLayout(null); - grpOverlay.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("caseAddOverlay") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpOverlay.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("caseAddOverlay") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpOverlay.setBackground(new Color(30,30,35)); grpOverlay.setSize(312, 17); grpOverlay.setLocation(frame.getWidth(), grpCrop.getY() + grpCrop.getHeight() + 6); @@ -8622,6 +8697,7 @@ public void mouseExited(MouseEvent e) { lblTcBackground = new JLabel(Shutter.language.getProperty("lblBackgroundOn")); lblTcBackground.setName("lblTcBackground"); + lblTcBackground.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblTcBackground.setBackground(new Color(42,42,47)); lblTcBackground.setHorizontalAlignment(SwingConstants.CENTER); lblTcBackground.setOpaque(true); @@ -8979,6 +9055,7 @@ public void mouseMoved(MouseEvent arg0) { lblTimecode = new JLabel(Shutter.language.getProperty("lblTimecode")); lblTimecode.setName("lblTimecode"); + lblTimecode.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblTimecode.setBackground(new Color(42,42,47)); lblTimecode.setHorizontalAlignment(SwingConstants.CENTER); lblTimecode.setOpaque(true); @@ -10575,7 +10652,7 @@ private void grpSubtitles() { grpSubtitles = new JPanel(); grpSubtitles.setLayout(null); - grpSubtitles.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("caseSubtitles") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpSubtitles.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("caseSubtitles") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpSubtitles.setBackground(new Color(30,30,35)); grpSubtitles.setSize(312, 17); grpSubtitles.setLocation(frame.getWidth(), grpOverlay.getY() + grpOverlay.getHeight() + 6); @@ -11504,6 +11581,7 @@ public void mouseMoved(MouseEvent e) { lblSubsBackground = new JLabel(Shutter.language.getProperty("lblBackgroundOff")); lblSubsBackground.setName("lblSubsBackground"); + lblSubsBackground.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblSubsBackground.setBackground(new Color(42,42,47)); lblSubsBackground.setHorizontalAlignment(SwingConstants.CENTER); lblSubsBackground.setOpaque(true); @@ -11734,7 +11812,7 @@ private void grpWatermark() { grpWatermark = new JPanel(); grpWatermark.setLayout(null); - grpWatermark.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("caseLogo") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpWatermark.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("caseLogo") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpWatermark.setBackground(new Color(30,30,35)); grpWatermark.setSize(312, 17); grpWatermark.setLocation(frame.getWidth(), grpSubtitles.getY() + grpSubtitles.getHeight() + 6); @@ -12646,7 +12724,7 @@ private void grpColorimetry() { grpColorimetry = new JPanel(); grpColorimetry.setLayout(null); grpColorimetry.setVisible(false); - grpColorimetry.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpColorimetry.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpColorimetry") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpColorimetry.setBackground(new Color(30,30,35)); grpColorimetry.setBounds(frame.getWidth(), 199, 312, 17); @@ -13251,7 +13329,7 @@ private void grpImageAdjustement() { grpImageAdjustement = new JPanel(); grpImageAdjustement.setName("grpImageAdjustement"); grpImageAdjustement.setLayout(null); - grpImageAdjustement.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("frameColorImage") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpImageAdjustement.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("frameColorImage") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpImageAdjustement.setBackground(new Color(30,30,35)); grpImageAdjustement.setBounds(frame.getWidth(), 258, 312, 17); grpImageAdjustement.setVisible(false); @@ -14480,7 +14558,7 @@ private void grpCorrections() { grpCorrections = new JPanel(); grpCorrections.setLayout(null); grpCorrections.setVisible(false); - grpCorrections.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("grpCorrections") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpCorrections.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("grpCorrections") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpCorrections.setBackground(new Color(30,30,35)); grpCorrections.setBounds(frame.getWidth(), grpImageAdjustement.getY() + grpImageAdjustement.getHeight() + 6, 312, 17); frame.getContentPane().add(grpCorrections); @@ -14848,7 +14926,7 @@ private void grpTransitions() { grpTransitions = new JPanel(); grpTransitions.setLayout(null); grpTransitions.setVisible(false); - grpTransitions.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("grpTransitions") + " ", 0, + grpTransitions.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("grpTransitions") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpTransitions.setBackground(new Color(30,30,35)); grpTransitions.setBounds(frame.getWidth(), grpCorrections.getY() + grpCorrections.getHeight() + 6, 312, 17); @@ -14951,6 +15029,7 @@ public void keyTyped(KeyEvent e) { lblFadeInColor = new JLabel(Shutter.language.getProperty("black")); lblFadeInColor.setName("lblFadeInColor"); + lblFadeInColor.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblFadeInColor.setBackground(new Color(42,42,47)); lblFadeInColor.setHorizontalAlignment(SwingConstants.CENTER); lblFadeInColor.setOpaque(true); @@ -15158,6 +15237,7 @@ public void keyTyped(KeyEvent e) { lblFadeOutColor = new JLabel(Shutter.language.getProperty("black")); lblFadeOutColor.setName("lblFadeOutColor"); + lblFadeOutColor.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblFadeOutColor.setBackground(new Color(42,42,47)); lblFadeOutColor.setHorizontalAlignment(SwingConstants.CENTER); lblFadeOutColor.setOpaque(true); @@ -15329,7 +15409,7 @@ private void grpImageSequence() { grpImageSequence = new JPanel(); grpImageSequence.setLayout(null); grpImageSequence.setVisible(false); - grpImageSequence.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpImageSequence.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpSequenceImage") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpImageSequence.setBackground(new Color(30,30,35)); grpImageSequence.setBounds(frame.getWidth(), 199, 312, 17); @@ -15501,7 +15581,7 @@ private void grpAdvanced() { grpAdvanced = new JPanel(); grpAdvanced.setLayout(null); grpAdvanced.setVisible(false); - grpAdvanced.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), language.getProperty("grpAdvanced") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpAdvanced.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpAdvanced") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpAdvanced.setBackground(new Color(30,30,35)); grpAdvanced.setBounds(frame.getWidth(), 396, 312, 17); frame.getContentPane().add(grpAdvanced); @@ -15620,6 +15700,7 @@ public void actionPerformed(ActionEvent arg0) { lblTFF = new JLabel("TFF"); lblTFF.setName("lblTFF"); + lblTFF.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblTFF.setBackground(new Color(42,42,47)); lblTFF.setHorizontalAlignment(SwingConstants.CENTER); lblTFF.setOpaque(true); @@ -15671,49 +15752,6 @@ public void mouseExited(MouseEvent e) { }); - caseForcerDAR = new JCheckBox(language.getProperty("caseForcerDAR")); - caseForcerDAR.setName("caseForcerDAR"); - caseForcerDAR.setFont(new Font(freeSansFont, Font.PLAIN, 12)); - caseForcerDAR.setSize(caseForcerDAR.getPreferredSize().width, 23); - caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); - grpResolution.add(caseForcerDAR); - - caseForcerDAR.addMouseListener(new MouseAdapter() { - - @Override - public void mouseClicked(MouseEvent arg0) { - - if (caseForcerDAR.isSelected()) - comboDAR.setEnabled(true); - else - comboDAR.setEnabled(false); - - VideoPlayer.btnStop.doClick(); //Use VideoPlayer.resizeAll and reload the frame - } - - }); - - comboDAR = new JComboBox(); - comboDAR.setName("comboDAR"); - comboDAR.setMaximumRowCount(20); - comboDAR.setModel(new DefaultComboBoxModel(new String[] { "1:1", "4:3", "9:16", "16:9", "21:9", "1.85", "2.35", "2.39"})); - comboDAR.setSelectedIndex(3); - comboDAR.setFont(new Font(freeSansFont, Font.PLAIN, 11)); - comboDAR.setEditable(true); - comboDAR.setSize(54, 16); - comboDAR.setLocation(caseForcerDAR.getLocation().x + caseForcerDAR.getWidth() + 4, caseForcerDAR.getLocation().y + 3); - grpResolution.add(comboDAR); - - comboDAR.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent arg0) { - - VideoPlayer.btnStop.doClick(); //Use VideoPlayer.resizeAll and reload the frame - } - - }); - caseCreateTree = new JCheckBox(language.getProperty("caseCreateTree")); caseCreateTree.setName("caseCreateTree"); caseCreateTree.setFont(new Font(freeSansFont, Font.PLAIN, 12)); @@ -15847,6 +15885,7 @@ public void actionPerformed(ActionEvent arg0) { lblOPATOM = new JLabel("OP-Atom"); lblOPATOM.setName("lblOPATOM"); + lblOPATOM.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblOPATOM.setBackground(new Color(42,42,47)); lblOPATOM.setHorizontalAlignment(SwingConstants.CENTER); lblOPATOM.setOpaque(true); @@ -16068,6 +16107,7 @@ public void actionPerformed(ActionEvent e) { lblNiveaux = new JLabel("0-255"); lblNiveaux.setName("lblNiveaux"); + lblNiveaux.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblNiveaux.setBackground(new Color(42,42,47)); lblNiveaux.setHorizontalAlignment(SwingConstants.CENTER); lblNiveaux.setOpaque(true); @@ -16609,7 +16649,7 @@ private void grpBitrate() { grpBitrate = new JPanel(); grpBitrate.setLayout(null); grpBitrate.setVisible(false); - grpBitrate.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), + grpBitrate.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), language.getProperty("grpBitrate") + " ", 0, 0, new Font(montserratFont, Font.PLAIN, 12), new Color(235,235,240))); grpBitrate.setBackground(new Color(30,30,35)); grpBitrate.setBounds(658, 30, 312, 208); @@ -17226,9 +17266,9 @@ public void componentHidden(ComponentEvent e) lblVBR = new JLabel("VBR"); lblVBR.setName("lblVBR"); + lblVBR.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(30,30,35), 1, 10)); lblVBR.setBackground(new Color(42,42,47)); lblVBR.setHorizontalAlignment(SwingConstants.CENTER); - lblVBR.setOpaque(true); lblVBR.setFont(new Font(montserratFont, Font.PLAIN, 11)); lblVBR.setBounds(h264lines.getX() + h264lines.getWidth(), debitVideo.getY() + 3, 32, 16); grpBitrate.add(lblVBR); @@ -17354,6 +17394,7 @@ public void mouseReleased(MouseEvent arg0) { comboRotate.setSelectedIndex(3); comboRotate.setEnabled(false); caseMiror.setSelected(false); + btnNoUpscale.setSelected(false); // SetTimecode TCset1.setEnabled(false); @@ -18639,7 +18680,7 @@ public static void changeFunction(final boolean anim) { || "WAV".equals(function) || "AIFF".equals(function) || "FLAC".equals(function) || "ALAC".equals(function) || "MP3".equals(function) || "AAC".equals(function) || "AC3".equals(function) || "Opus".equals(function) || "Vorbis".equals(function) || "Dolby Digital Plus".equals(function) || "Dolby TrueHD".equals(function) || "Loudness & True Peak".equals(function) - || language.getProperty("functionBlackDetection").equals(function) || language.getProperty("functionOfflineDetection").equals(function) || "VMAF".equals(function) + || language.getProperty("functionBlackDetection").equals(function) || language.getProperty("functionOfflineDetection").equals(function) || "VMAF".equals(function) || "FrameMD5".equals(function) || "DNxHD".equals(function) || "DNxHR".equals(function) || "Apple ProRes".equals(function) || "QT Animation".equals(function) || ("GoPro CineForm").equals(function) || "Uncompressed".equals(function) || "H.264".equals(function) || "H.265".equals(function) || "H.266".equals(function) || "DV PAL".equals(function) || "WMV".equals(function) || "MPEG-1".equals(function) || "MPEG-2".equals(function) || "VP8".equals(function) || "VP9".equals(function) || "AV1".equals(function) || "Theora".equals(function) @@ -18695,6 +18736,7 @@ else if (language.getProperty("itemMyFunctions").equals(function)) && comboFonctions.getSelectedItem().equals(language.getProperty("functionBlackDetection")) == false && comboFonctions.getSelectedItem().equals(language.getProperty("functionOfflineDetection")) == false && comboFonctions.getSelectedItem().equals("VMAF") == false + && comboFonctions.getSelectedItem().equals("FrameMD5") == false && comboFonctions.getSelectedItem().equals(language.getProperty("functionWeb")) == false && comboFonctions.getSelectedItem().equals(language.getProperty("itemMyFunctions")) == false && (RenderQueue.frame == null || RenderQueue.frame != null && RenderQueue.frame.isVisible() == false) @@ -18818,7 +18860,8 @@ else if (language.getProperty("itemMyFunctions").equals(function)) } else { - if (comboFonctions.getSelectedItem().equals("Loudness & True Peak") || comboFonctions.getSelectedItem().equals("VMAF")) + if (comboFonctions.getSelectedItem().equals("Loudness & True Peak") + || comboFonctions.getSelectedItem().equals("VMAF")) { setDestinationTabs(2); } @@ -18896,7 +18939,8 @@ else if (RenderQueue.frame != null) && comboFonctions.getSelectedItem().equals(language.getProperty("functionSceneDetection")) == false && comboFonctions.getSelectedItem().equals(language.getProperty("functionBlackDetection")) == false && comboFonctions.getSelectedItem().equals(language.getProperty("functionOfflineDetection")) == false - && comboFonctions.getSelectedItem().equals("VMAF") == false) + && comboFonctions.getSelectedItem().equals("VMAF") == false + && comboFonctions.getSelectedItem().equals("FrameMD5") == false) { btnStart.setText(language.getProperty("btnAddToRender")); } @@ -19458,8 +19502,8 @@ private static void setGPUOptions() { String function = comboFonctions.getSelectedItem().toString(); if ("Apple ProRes".equals(function) && System.getProperty("os.name").contains("Mac") && arch.equals("arm64") - || "H.264".equals(function) || "H.265".equals(function) || "H.266".equals(function) - || System.getProperty("os.name").contains("Windows") && ("VP9".equals(function) || "AV1".equals(function)) + || "H.264".equals(function) || "H.265".equals(function) || "H.266".equals(function) || "AV1".equals(function) + || System.getProperty("os.name").contains("Windows") && "VP9".equals(function) || System.getProperty("os.name").contains("Windows") && language.getProperty("functionPicture").equals(function) && comboFilter.getSelectedItem().toString().equals(".avif")) { lblHWaccel.setVisible(true); @@ -19931,6 +19975,31 @@ else if (language.getProperty("functionMerge").equals(function)) btnReset.setLocation(btnReset.getX(), grpSetAudio.getSize().height + grpSetAudio.getLocation().y + 6); } + } else if ("FrameMD5".equals(function)) { + + addToList.setText(language.getProperty("filesVideo")); + + caseDisplay.setEnabled(false); + caseDisplay.setSelected(false); + grpResolution.setVisible(false); + grpBitrate.setVisible(false); + grpSetAudio.setVisible(false); + grpAudio.setVisible(false); + grpCrop.setVisible(false); + grpOverlay.setVisible(false); + grpSubtitles.setVisible(false); + grpWatermark.setVisible(false); + grpColorimetry.setVisible(false); + grpImageAdjustement.setVisible(false); + grpCorrections.setVisible(false); + grpTransitions.setVisible(false); + grpImageSequence.setVisible(true); + grpImageSequence.setLocation(grpImageSequence.getX(), 30);; + grpImageFilter.setVisible(false); + grpSetTimecode.setVisible(false); + grpAdvanced.setVisible(false); + btnReset.setLocation(btnReset.getX(), grpImageSequence.getSize().height + grpImageSequence.getLocation().y + 6); + } else if ("WAV".equals(function) || "AIFF".equals(function) || "FLAC".equals(function) || "ALAC".equals(function) || "MP3".equals(function) || "AAC".equals(function) || "AC3".equals(function) || "Opus".equals(function) || "Vorbis".equals(function) || "Dolby Digital Plus".equals(function) || "Dolby TrueHD".equals(function)) { if (action) @@ -19996,10 +20065,14 @@ else if (comboFonctions.getSelectedItem().toString().equals("Opus")) || language.getProperty("functionBlackDetection").equals(function) || language.getProperty("functionOfflineDetection").equals(function) || "VMAF".equals(function) + || "FrameMD5".equals(function) || language.getProperty("functionInsert").equals(function)) { - if (language.getProperty("functionBlackDetection").equals(function) || language.getProperty("functionOfflineDetection").equals(function) || "VMAF".equals(function)) + if (language.getProperty("functionBlackDetection").equals(function) + || language.getProperty("functionOfflineDetection").equals(function) + || "VMAF".equals(function) + || "FrameMD5".equals(function)) { addToList.setText(language.getProperty("filesVideo")); } @@ -20147,18 +20220,19 @@ else if (comboAudio1.getSelectedIndex() == 0 // Ajout partie résolution grpResolution.removeAll(); - grpResolution.setVisible(true); - grpResolution.setBounds(grpResolution.getX(), 30, 312, 102); - + grpResolution.setVisible(true); grpResolution.add(lblImageSize); grpResolution.add(comboResolution); grpResolution.add(lblPad); grpResolution.add(lblScreenshot); + grpResolution.add(btnNoUpscale); + btnNoUpscale.setLocation(7, 47); grpResolution.add(caseRotate); - caseRotate.setLocation(7, 47); + caseRotate.setLocation(7, btnNoUpscale.getLocation().y + btnNoUpscale.getHeight() + 3); grpResolution.add(comboRotate); comboRotate.setLocation(caseRotate.getWidth() + caseRotate.getLocation().x + 4, caseRotate.getLocation().y + 3); grpResolution.add(caseMiror); + caseMiror.setLocation(caseMiror.getX(), caseRotate.getY()); grpResolution.add(caseForcerDAR); caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); grpResolution.add(comboDAR); @@ -20420,17 +20494,18 @@ public void run() { grpResolution.removeAll(); grpResolution.setVisible(true); - grpResolution.setBounds(grpResolution.getX(), 30, 312, 102); - grpResolution.add(lblImageSize); grpResolution.add(comboResolution); grpResolution.add(lblPad); grpResolution.add(lblScreenshot); + grpResolution.add(btnNoUpscale); + btnNoUpscale.setLocation(7, 47); grpResolution.add(caseRotate); - caseRotate.setLocation(7, 47); + caseRotate.setLocation(7, btnNoUpscale.getLocation().y + btnNoUpscale.getHeight() + 3); grpResolution.add(comboRotate); comboRotate.setLocation(caseRotate.getWidth() + caseRotate.getLocation().x + 4, caseRotate.getLocation().y + 3); grpResolution.add(caseMiror); + caseMiror.setLocation(caseMiror.getX(), caseRotate.getY()); grpResolution.add(caseForcerDAR); caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); grpResolution.add(comboDAR); @@ -20927,17 +21002,18 @@ else if ("H.266".equals(function) && comboForcePreset.getModel().getSize() != 5) grpResolution.removeAll(); grpResolution.setVisible(true); - grpResolution.setBounds(grpResolution.getX(), 30, 312, 102); - grpResolution.add(lblImageSize); grpResolution.add(comboResolution); grpResolution.add(lblPad); grpResolution.add(lblScreenshot); + grpResolution.add(btnNoUpscale); + btnNoUpscale.setLocation(7, 47); grpResolution.add(caseRotate); - caseRotate.setLocation(7, 47); + caseRotate.setLocation(7, btnNoUpscale.getLocation().y + btnNoUpscale.getHeight() + 3); grpResolution.add(comboRotate); comboRotate.setLocation(caseRotate.getWidth() + caseRotate.getLocation().x + 4, caseRotate.getLocation().y + 3); grpResolution.add(caseMiror); + caseMiror.setLocation(caseMiror.getX(), caseRotate.getY()); grpResolution.add(caseForcerDAR); caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); grpResolution.add(comboDAR); @@ -21384,17 +21460,18 @@ else if (System.getProperty("os.name").contains("Mac")) grpResolution.removeAll(); grpResolution.setVisible(true); - grpResolution.setBounds(grpResolution.getX(), 30, 312, 102); - grpResolution.add(lblImageSize); grpResolution.add(comboResolution); grpResolution.add(lblPad); grpResolution.add(lblScreenshot); + grpResolution.add(btnNoUpscale); + btnNoUpscale.setLocation(7, 47); grpResolution.add(caseRotate); - caseRotate.setLocation(7, 47); + caseRotate.setLocation(7, btnNoUpscale.getLocation().y + btnNoUpscale.getHeight() + 3); grpResolution.add(comboRotate); comboRotate.setLocation(caseRotate.getWidth() + caseRotate.getLocation().x + 4, caseRotate.getLocation().y + 3); grpResolution.add(caseMiror); + caseMiror.setLocation(caseMiror.getX(), caseRotate.getY()); grpResolution.add(caseForcerDAR); caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); grpResolution.add(comboDAR); @@ -21897,23 +21974,24 @@ else if ("MPEG-1".equals(function) || "MPEG-2".equals(function)) // Ajout partie résolution grpResolution.removeAll(); - grpResolution.setVisible(true); - grpResolution.setBounds(grpResolution.getX(), 30, 312, 102); - + grpResolution.setVisible(true); grpResolution.add(lblImageSize); grpResolution.add(comboResolution); grpResolution.add(lblPad); grpResolution.add(lblScreenshot); + grpResolution.add(btnNoUpscale); + btnNoUpscale.setLocation(7, 47); grpResolution.add(caseRotate); - caseRotate.setLocation(7, 47); + caseRotate.setLocation(7, btnNoUpscale.getLocation().y + btnNoUpscale.getHeight() + 3); grpResolution.add(comboRotate); comboRotate.setLocation(caseRotate.getWidth() + caseRotate.getLocation().x + 4, caseRotate.getLocation().y + 3); grpResolution.add(caseMiror); + caseMiror.setLocation(caseMiror.getX(), caseRotate.getY()); grpResolution.add(caseForcerDAR); caseForcerDAR.setLocation(7, caseRotate.getLocation().y + caseRotate.getHeight()); grpResolution.add(comboDAR); comboDAR.setLocation(caseForcerDAR.getLocation().x + caseForcerDAR.getWidth() + 4, caseForcerDAR.getLocation().y + 3); - + if (comboResolution.getItemCount() != 24) { comboResolution.setModel(new DefaultComboBoxModel(new String[] { language.getProperty("source"), "AI real-life 4x", "AI real-life 2x", "AI animation 4x", "AI animation 2x", "4096x2160", "3840x2160", "2560x1440", "1920x1080", @@ -22119,9 +22197,7 @@ else if ("MPEG-1".equals(function) || "MPEG-2".equals(function)) // Ajout partie résolution grpResolution.removeAll(); - grpResolution.setVisible(true); - grpResolution.setBounds(grpResolution.getX(), 30, 312, 121); - + grpResolution.setVisible(true); grpResolution.add(lblImageSize); grpResolution.add(comboResolution); grpResolution.add(caseRotate); @@ -22129,6 +22205,7 @@ else if ("MPEG-1".equals(function) || "MPEG-2".equals(function)) grpResolution.add(comboRotate); comboRotate.setLocation(caseRotate.getWidth() + caseRotate.getLocation().x + 4, caseRotate.getLocation().y + 3); grpResolution.add(caseMiror); + caseMiror.setLocation(caseMiror.getX(), caseRotate.getY()); grpResolution.add(iconTVInterpret); grpResolution.add(lblScreenshot); lblScreenshot.setLocation(comboResolution.getX() + comboResolution.getWidth() + 9, 21); diff --git a/src/application/SubtitlesEdit.java b/src/application/SubtitlesEdit.java index 37dc793c..e88a8188 100644 --- a/src/application/SubtitlesEdit.java +++ b/src/application/SubtitlesEdit.java @@ -24,6 +24,7 @@ import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; +import java.awt.Insets; import java.awt.MouseInfo; import java.awt.Toolkit; import java.awt.event.AdjustmentEvent; @@ -55,6 +56,8 @@ import javax.swing.JTextPane; import javax.swing.SwingConstants; +import com.formdev.flatlaf.ui.FlatLineBorder; + public class SubtitlesEdit { public static JFrame frame; @@ -409,7 +412,7 @@ private static JTextField addInPoint(String subIn) { JTextField in = new JTextField(); in.setText(subIn); - in.setBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true)); + in.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5)); in.setForeground(Utils.themeColor); in.setFont(new Font(Shutter.montserratFont, Font.PLAIN, 12)); in.setBounds(77, textPosition - 2, 94, 25); @@ -475,7 +478,7 @@ private static JTextField addOutPoint(String subOut) { JTextField out = new JTextField(); out.setText(subOut); - out.setBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true)); + out.setBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5)); out.setForeground(Utils.themeColor); out.setFont(new Font(Shutter.montserratFont, Font.PLAIN, 12)); out.setBounds(77, textPosition + 24, 94, 25); diff --git a/src/application/Update.java b/src/application/Update.java index aec841dc..4e2aea9d 100644 --- a/src/application/Update.java +++ b/src/application/Update.java @@ -432,7 +432,12 @@ public void run() { File appPath = new File(userFolder + "/Downloads/" + newVersion); if (new File(userFolder + "/Downloads").exists() == false) { - appPath = new File(userFolder + "/Desktop/" + newVersion); + if (new File(userFolder + "/Desktop").exists() == false) + { + appPath = new File(Shutter.dirTemp + newVersion); + } + else + appPath = new File(userFolder + "/Desktop/" + newVersion); } //Download diff --git a/src/application/Utils.java b/src/application/Utils.java index af0a0c52..f0594843 100644 --- a/src/application/Utils.java +++ b/src/application/Utils.java @@ -2002,7 +2002,8 @@ public static void loadThemes() { UIManager.put("TextComponent.arc", 10); UIManager.put("Component.arc", 10); UIManager.put("PopupMenu.arc", 15); - + UIManager.put("ScrollPane.arc", 5); + UIManager.put("Component.borderColor", new Color(30,30,35)); UIManager.put("Component.disabledBorderColor", new Color(30,30,35)); @@ -2028,10 +2029,12 @@ public static void loadThemes() { UIManager.put("ComboBox.popupBackground", new Color(42,42,47)); UIManager.put("ComboBox.buttonSeparatorColor", new Color(30,30,35)); UIManager.put("ComboBox.buttonDisabledSeparatorColor", new Color(30,30,35)); - UIManager.put("ComboBox.buttonArrowColor", themeColor); + UIManager.put("ComboBox.buttonArrowColor", themeColor); + UIManager.put("ComboBox.selectionArc", 15); UIManager.put("MenuItem.background", new Color(42,42,47)); UIManager.put("MenuItem.foreground", new Color(235,235,240)); + UIManager.put("MenuItem.selectionArc", 15); UIManager.put("MenuItem.selectionBackground", themeColor); UIManager.put("CheckBoxMenuItem.background", new Color(42,42,47)); @@ -2199,7 +2202,7 @@ public static void restartApp() { } - public static void disableSleepMode() { + public static void disableSleepMode() { Timer timer = new Timer(); diff --git a/src/application/VideoPlayer.java b/src/application/VideoPlayer.java index 9187669b..719af7c4 100644 --- a/src/application/VideoPlayer.java +++ b/src/application/VideoPlayer.java @@ -86,7 +86,6 @@ import javax.swing.event.ChangeListener; import com.formdev.flatlaf.extras.FlatSVGIcon; - import functions.VideoEncoders; import library.DCRAW; import library.FFMPEG; @@ -169,6 +168,7 @@ public class VideoPlayer { public static JButton btnMarkOut; public static JButton btnGoToIn; public static JButton btnGoToOut; + private static JPanel panelForButtons; public static JSlider slider; public static JCheckBox caseShowWaveform = new JCheckBox(Shutter.language.getProperty("caseShowWaveform")); public static JCheckBox caseVuMeter = new JCheckBox(Shutter.language.getProperty("caseVuMeter"));; @@ -1643,6 +1643,7 @@ public static void setPlayerButtons(boolean enable) { btnStop.setVisible(true); btnMarkOut.setVisible(false); btnGoToOut.setVisible(false); + panelForButtons.setVisible(true); caseInternalTc.setVisible(false); caseShowWaveform.setVisible(false); caseVuMeter.setVisible(true); @@ -1701,6 +1702,7 @@ else if (FFPROBE.totalLength <= 40 || Shutter.caseEnableSequence.isSelected() || btnMarkOut.setVisible(false); btnGoToOut.setVisible(false); + panelForButtons.setVisible(false); caseInternalTc.setVisible(false); caseShowWaveform.setVisible(false); caseVuMeter.setVisible(false); @@ -1782,6 +1784,7 @@ else if (comboMode.getSelectedItem().equals(Shutter.language.getProperty("splitM btnStop.setVisible(true); btnMarkOut.setVisible(true); btnGoToOut.setVisible(true); + panelForButtons.setVisible(true); waveformContainer.setVisible(true); cursorHead.setVisible(true); @@ -2271,10 +2274,13 @@ public void run() { } } + @SuppressWarnings("serial") private void buttons() { btnPrevious = new JButton("<"); btnPrevious.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnPrevious.setBackground(new Color(30,30,35, 0)); + btnPrevious.setBorder(null); Shutter.frame.getContentPane().add(btnPrevious); btnPrevious.addActionListener(new ActionListener(){ @@ -2360,7 +2366,9 @@ else if (bufferedFrames.size() > 0) }); btnNext = new JButton(">"); - btnNext.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnNext.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnNext.setBackground(new Color(30,30,35, 0)); + btnNext.setBorder(null); Shutter.frame.getContentPane().add(btnNext); btnNext.addActionListener(new ActionListener(){ @@ -2417,8 +2425,10 @@ public void actionPerformed(ActionEvent e) { }); - btnPlay = new JButton(new FlatSVGIcon("contents/play.svg", 15, 15)); - btnPlay.setMargin(new Insets(0,0,0,0)); + btnPlay = new JButton(new FlatSVGIcon("contents/play.svg", 15, 15)); + btnPlay.setMargin(new Insets(0,0,0,0)); + btnPlay.setBackground(new Color(30,30,35, 0)); + btnPlay.setBorder(null); Shutter.frame.getContentPane().add(btnPlay); btnPlay.addActionListener(new ActionListener() { @@ -2496,6 +2506,8 @@ else if (btnPlay.getName().equals("play")) btnStop = new JButton(new FlatSVGIcon("contents/stop.svg", 15, 15)); btnStop.setMargin(new Insets(0,0,0,0)); + btnStop.setBackground(new Color(30,30,35, 0)); + btnStop.setBorder(null); Shutter.frame.getContentPane().add(btnStop); btnStop.addActionListener(new ActionListener(){ @@ -2545,7 +2557,9 @@ else if (FFPROBE.totalLength <= 40 || Shutter.caseEnableSequence.isSelected()) / }); btnMarkIn = new JButton("["); - btnMarkIn.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnMarkIn.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnMarkIn.setBackground(new Color(30,30,35, 0)); + btnMarkIn.setBorder(null); Shutter.frame.getContentPane().add(btnMarkIn); btnMarkIn.addActionListener(new ActionListener() { @@ -2566,7 +2580,9 @@ public void actionPerformed(ActionEvent arg0) { btnGoToIn = new JButton("[<"); btnGoToIn.setMargin(new Insets(0,0,0,0)); - btnGoToIn.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnGoToIn.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnGoToIn.setBackground(new Color(30,30,35, 0)); + btnGoToIn.setBorder(null); Shutter.frame.getContentPane().add(btnGoToIn); btnGoToIn.addActionListener(new ActionListener() { @@ -2588,6 +2604,8 @@ public void actionPerformed(ActionEvent arg0) { btnMarkOut = new JButton("]"); btnMarkOut.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnMarkOut.setBackground(new Color(30,30,35, 0)); + btnMarkOut.setBorder(null); Shutter.frame.getContentPane().add(btnMarkOut); btnMarkOut.addActionListener(new ActionListener() { @@ -2607,7 +2625,9 @@ public void actionPerformed(ActionEvent arg0) { btnGoToOut = new JButton(">]"); btnGoToOut.setMargin(new Insets(0,0,0,0)); - btnGoToOut.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnGoToOut.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); + btnGoToOut.setBackground(new Color(30,30,35, 0)); + btnGoToOut.setBorder(null); Shutter.frame.getContentPane().add(btnGoToOut); btnGoToOut.addActionListener(new ActionListener() { @@ -2625,6 +2645,25 @@ public void actionPerformed(ActionEvent arg0) { }); + panelForButtons = new JPanel() { + + @Override + public void paintComponent(Graphics g) { + + Graphics2D g2d = (Graphics2D) g; + + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + + g2d.setColor(new Color(42,42,47)); + g2d.fillRoundRect(0, 0, (btnGoToOut.getX() + btnGoToOut.getWidth()) - btnGoToIn.getX() - 4, 21, 15, 15); + + g2d.setColor(new Color(25,25,25)); + g2d.drawLine(this.getWidth() / 2, 5, this.getWidth() / 2, this.getHeight() - 6); + } + + }; + Shutter.frame.getContentPane().add(panelForButtons); + showFPS = new JLabel("25 fps"); showFPS.setVisible(false); showFPS.setFont(new Font(Shutter.freeSansFont, Font.BOLD, 12)); @@ -5334,7 +5373,7 @@ else if (FFMPEG.isGPUCompatible && FFPROBE.isRotated == false bitDepth = "p010"; } - //Auto GPU Shutter.selection + //Auto GPU if (FFMPEG.cudaAvailable) { filter = filter.replace("yadif", "yadif_cuda"); @@ -5344,9 +5383,8 @@ else if (FFMPEG.qsvAvailable && yadif == "") { filter += "scale_qsv=" + width + ":" + height + ":mode=low_power,hwdownload,format=" + bitDepth; } - else if (FFMPEG.videotoolboxAvailable) + else if (FFMPEG.videotoolboxAvailable && yadif == "") { - filter = filter.replace("yadif", "yadif_videotoolbox"); filter += "scale_vt=" + width + ":" + height + ",hwdownload,format=" + bitDepth; } else @@ -5666,7 +5704,7 @@ public static void resizeAll() { else ratio = Float.parseFloat(Shutter.comboDAR.getSelectedItem().toString()); } - else if (Shutter.comboResolution.getSelectedItem().toString().equals(Shutter.language.getProperty("source")) == false && Settings.btnNoUpscale.isSelected() == false + else if (Shutter.comboResolution.getSelectedItem().toString().equals(Shutter.language.getProperty("source")) == false && Shutter.btnNoUpscale.isSelected() == false && Shutter.comboResolution.getSelectedItem().toString().contains("x") && Shutter.comboResolution.getSelectedItem().toString().contains("AI") == false) { @@ -5887,6 +5925,14 @@ else if (fullscreenPlayer) btnGoToIn.setBounds(btnMarkIn.getLocation().x - 40 - 4, btnMarkIn.getLocation().y, 40, 21); btnMarkOut.setBounds(btnStop.getLocation().x + btnStop.getSize().width + 4, btnStop.getLocation().y, 22, 21); btnGoToOut.setBounds(btnMarkOut.getLocation().x + btnMarkOut.getSize().width + 4, btnMarkOut.getLocation().y, 40, 21); + + if (Shutter.comboFonctions.getSelectedItem().equals(Shutter.language.getProperty("functionSubtitles"))) + { + panelForButtons.setBounds(btnPlay.getX() + 2, btnPlay.getY(), (btnStop.getX() + btnStop.getWidth()) - btnPlay.getX() - 4, 21); + } + else + panelForButtons.setBounds(btnGoToIn.getX() + 2, btnPlay.getY(), (btnGoToOut.getX() + btnGoToOut.getWidth()) - btnGoToIn.getX() - 4, 21); + showFPS.setBounds(player.getX() + player.getWidth() / 2, player.getY() - 18, player.getWidth() / 2, showFPS.getPreferredSize().height); showScale.setBounds(player.getX(), showFPS.getY(), player.getWidth() / 2, showScale.getPreferredSize().height); comboAudioTrack.setBounds(waveformContainer.getX() + 7, waveformContainer.getY() + (waveformContainer.getHeight() / 2) - 8, 40, 16); diff --git a/src/application/VideoWeb.java b/src/application/VideoWeb.java index c1497f02..39ae6186 100644 --- a/src/application/VideoWeb.java +++ b/src/application/VideoWeb.java @@ -27,6 +27,7 @@ import java.awt.Desktop; import java.awt.Dimension; import java.awt.Font; +import java.awt.Insets; import java.awt.MouseInfo; import java.awt.Rectangle; import java.awt.Toolkit; @@ -63,6 +64,7 @@ import javax.swing.event.PopupMenuListener; import com.formdev.flatlaf.extras.FlatSVGIcon; +import com.formdev.flatlaf.ui.FlatLineBorder; import library.FFMPEG; import library.YOUTUBEDL; @@ -365,7 +367,7 @@ private void grpURL() { grpURL.setLocation(6, 28); grpURL.setSize(408, frame.getHeight() - 34); grpURL.setBackground(new Color(30,30,35)); - grpURL.setBorder(BorderFactory.createTitledBorder(new RoundedLineBorder(new Color(55,55,55), 1, 5, true), Shutter.language.getProperty("videoUrl") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); + grpURL.setBorder(BorderFactory.createTitledBorder(new FlatLineBorder(new Insets(0,0,0,0), new Color(55,55,55), 1, 5), Shutter.language.getProperty("videoUrl") + " ", 0, 0, new Font(Shutter.montserratFont, Font.PLAIN, 12), new Color(235,235,240))); lblURL = new JLabel(Shutter.language.getProperty("lblURL")); lblURL.setHorizontalAlignment(SwingConstants.RIGHT); diff --git a/src/functions/FrameMD5.java b/src/functions/FrameMD5.java new file mode 100644 index 00000000..cd15c1d5 --- /dev/null +++ b/src/functions/FrameMD5.java @@ -0,0 +1,157 @@ +/******************************************************************************************* +* Copyright (C) 2024 PACIFICO PAUL +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* +********************************************************************************************/ + +package functions; + +import java.io.File; + +import application.Ftp; +import application.Shutter; +import application.Utils; +import application.VideoPlayer; +import library.FFMPEG; +import settings.FunctionUtils; +import settings.InputAndOutput; + +public class FrameMD5 extends Shutter { + + public static Thread thread; + + public static void main() { + + thread = new Thread(new Runnable() { + + @Override + public void run() { + + if (scanIsRunning == false) + FunctionUtils.completed = 0; + + lblFilesEnded.setText(FunctionUtils.completedFiles(FunctionUtils.completed)); + + for (int i = 0 ; i < liste.getSize() ; i++) + { + File file = FunctionUtils.setInputFile(new File(liste.getElementAt(i))); + + if (file == null) + break; + + try { + + String fileName = file.getName(); + String extension = fileName.substring(fileName.lastIndexOf(".")); + String container = ".framemd5"; + + lblCurrentEncoding.setText(fileName); + + //Data analyze + if (FunctionUtils.analyze(file, false) == false) + continue; + + //InOut + VideoPlayer.getFileList(file.toString()); + InputAndOutput.getInputAndOutput(); + + //Output folder + String labelOutput = FunctionUtils.setOutputDestination("", file); + + //File output name + String extensionName = ""; + if (btnExtension.isSelected()) + { + extensionName = FunctionUtils.setSuffix(txtExtension.getText(), false); + } + + //Output name + String fileOutputName = labelOutput.replace("\\", "/") + "/" + fileName.replace(extension, extensionName + container); + + //File output + File fileOut = new File(fileOutputName); + if (fileOut.exists()) + { + fileOut = FunctionUtils.fileReplacement(labelOutput, fileName, extension, extensionName + "_", container); + + if (fileOut == null) + { + cancelled = true; + break; + } + } + + //Concat mode or Image sequence + String concat = FunctionUtils.setConcat(file, labelOutput); + if ((grpImageSequence.isVisible() && caseEnableSequence.isSelected())) + { + file = new File(labelOutput.replace("\\", "/") + "/" + fileName.replace(extension, ".txt")); + } + + //Command + FFMPEG.run(InputAndOutput.inPoint + concat + " -i " + '"' + file.toString() + '"' + InputAndOutput.outPoint + " -f framemd5 -y " + '"' + fileOut + '"'); + + do { + Thread.sleep(100); + } while(FFMPEG.runProcess.isAlive()); + + if (FFMPEG.saveCode == false && btnStart.getText().equals(Shutter.language.getProperty("btnAddToRender")) == false + || FFMPEG.saveCode == false && caseEnableSequence.isSelected()) + { + if (lastActions(file, fileName, fileOut, labelOutput)) + break; + } + + } catch (InterruptedException e) { + FFMPEG.error = true; + } + } + + if (btnStart.getText().equals(Shutter.language.getProperty("btnAddToRender")) == false) + enfOfFunction(); + } + + }); + thread.start(); + + } + + private static boolean lastActions(File file, String fileName, File fileOut, String output) { + + if (FunctionUtils.cleanFunction(fileName, fileOut, output)) + return true; + + //Sending processes + FunctionUtils.addFileForMail(fileName); + Ftp.sendToFtp(fileOut); + Utils.copyFile(fileOut); + + //Image sequence and merge + if (caseEnableSequence.isSelected()) + return true; + + //Watch folder + if (Shutter.scanIsRunning) + { + FunctionUtils.moveScannedFiles(file); + FrameMD5.main(); + return true; + } + + return false; + } + +} \ No newline at end of file diff --git a/src/functions/Picture.java b/src/functions/Picture.java index 7f96522f..2322f618 100644 --- a/src/functions/Picture.java +++ b/src/functions/Picture.java @@ -407,7 +407,14 @@ else if (comboResolution.getSelectedItem().toString().contains("AI")) private static String setFramerate() { if (caseCreateSequence.isSelected()) - return " -r " + (float) FFPROBE.currentFPS / Float.parseFloat(comboInterpret.getSelectedItem().toString().replace(",", ".")); + { + Float f = (float) FFPROBE.currentFPS / Float.parseFloat(comboInterpret.getSelectedItem().toString().replace(",", ".")); + + if (f != 1.0f) + { + return " -r " + f; + } + } return ""; } @@ -506,7 +513,7 @@ private static String setFrame() { if (caseCreateSequence.isSelected()) { - return " -r 1"; + return ""; } else if (comboFilter.getSelectedItem().toString().equals(".gif")) { diff --git a/src/settings/FunctionUtils.java b/src/settings/FunctionUtils.java index 15d1e1c6..11dcc20d 100644 --- a/src/settings/FunctionUtils.java +++ b/src/settings/FunctionUtils.java @@ -523,7 +523,7 @@ else if (Settings.btnSetBab.isSelected() || (grpImageSequence.isVisible() && cas public static void setMerge(String fileName, String extension, String output) { File concatFile = new File(output.replace("\\", "/") + "/" + fileName.replace(extension, ".txt")); - + try { mergeDuration = 0; frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1696,7 +1696,7 @@ public static boolean cleanFunction(String fileName, File fileOut, String output if (Settings.btnSetBab.isSelected() || (grpImageSequence.isVisible() && caseEnableSequence.isSelected()) || VideoPlayer.comboMode.getSelectedItem().toString().equals(language.getProperty("removeMode"))) { File concatList = new File(output.replace("\\", "/") + "/" + fileName.replace(extension, ".txt")); - + if (RenderQueue.frame == null || RenderQueue.frame.isVisible() == false) concatList.delete(); } diff --git a/src/settings/Image.java b/src/settings/Image.java index 9fe33dc9..5d66553f 100644 --- a/src/settings/Image.java +++ b/src/settings/Image.java @@ -21,7 +21,6 @@ import java.io.File; -import application.Settings; import application.Shutter; import application.VideoPlayer; import functions.VideoEncoders; @@ -228,7 +227,7 @@ else if (!(o[0].toString().contains("-") || o[1].toString().contains("-"))) float or = (float) ow / oh; boolean upscale = true; - if (Settings.btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) + if (btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) { if (iw < ow || ih < oh) { @@ -313,7 +312,7 @@ else if (limitToFHD) float or = (float) ow / oh; boolean upscale = true; - if (Settings.btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) + if (btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) { if (iw < ow || ih < oh) { @@ -386,15 +385,11 @@ else if (autoCUDA || Shutter.comboGPUFilter.getSelectedItem().toString().equals( filterComplex += ",hwdownload,format=" + bitDepth; } } - 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) + 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) { - if (caseForcerDesentrelacement.isSelected() == false || caseForcerDesentrelacement.isSelected() && filterComplex.contains("yadif")) - { - filterComplex = filterComplex.replace("yadif=", "yadif_videotoolbox="); - filterComplex = filterComplex.replace("scale=", "scale_vt="); + filterComplex = filterComplex.replace("scale=", "scale_vt="); - filterComplex += ",hwdownload,format=" + bitDepth; - } + filterComplex += ",hwdownload,format=" + bitDepth; } } @@ -461,7 +456,7 @@ else if (comboResolution.getSelectedItem().toString().contains(":")) float or = (float) ow / oh; boolean upscale = true; - if (Settings.btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) + if (btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) { if (iw < ow || ih < oh) { @@ -513,7 +508,7 @@ else if (limitToFHD) float or = (float) ow / oh; boolean upscale = true; - if (Settings.btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) + if (btnNoUpscale.isSelected() && comboResolution.getSelectedItem().toString().contains("AI") == false && comboResolution.getSelectedItem().toString().contains("%") == false) { if (iw < ow || ih < oh) {