Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpacifico authored Dec 29, 2024
1 parent 54db7ab commit f59acee
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 79 deletions.
6 changes: 3 additions & 3 deletions src/application/Donate.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ public void mouseClicked(MouseEvent e) {
@Override
public void mousePressed(MouseEvent e) {

quit.setIcon(new FlatSVGIcon("contents/quit_pressed.svg", 15, 15));

quit.setIcon(new FlatSVGIcon("contents/quit_pressed.svg", 15, 15));
accept = true;
}

Expand Down Expand Up @@ -185,6 +184,8 @@ public void mouseClicked(MouseEvent arg0) {
try {
Desktop.getDesktop().browse(new URI("https://donate.stripe.com/28o29m0QwfRZ4U0cMM"));
} catch (IOException | URISyntaxException e) {}

System.exit(0);
}

@Override
Expand All @@ -197,7 +198,6 @@ public void mouseExited(MouseEvent arg0) {
frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}


@Override
public void mousePressed(MouseEvent arg0) {
}
Expand Down
24 changes: 5 additions & 19 deletions src/application/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
Expand Down Expand Up @@ -177,7 +178,7 @@ public Settings() {
txtImageDuration.setName("txtImageDuration");
comboLanguage.setName("comboLanguage");

frame.setSize(370, 750);
frame.setSize(370,750);
if (Shutter.getLanguage.equals(Locale.of("ru").getDisplayLanguage()) || Shutter.getLanguage.equals(Locale.of("uk").getDisplayLanguage()))
{
frame.setSize(frame.getWidth() + 50, frame.getHeight());
Expand Down Expand Up @@ -676,10 +677,11 @@ else if (txtImageDuration.getText().length() >= 4)
accentColor.setBounds(lblTheme.getLocation().x + lblTheme.getWidth() + 6, lblTheme.getLocation().y - 4, 41, 22);
frame.getContentPane().add(accentColor);

accentColor.addMouseListener(new MouseListener(){
accentColor.addMouseListener(new MouseAdapter(){

@Override
public void mouseClicked(MouseEvent e) {
public void mouseClicked(MouseEvent e)
{
Utils.themeColor = JColorChooser.showDialog(frame, Shutter.language.getProperty("chooseColor"), new Color(71, 163, 236));

if (Utils.themeColor != null)
Expand All @@ -703,22 +705,6 @@ public void mouseClicked(MouseEvent e) {
}

}

@Override
public void mousePressed(MouseEvent e) {
}

@Override
public void mouseReleased(MouseEvent e) {
}

@Override
public void mouseEntered(MouseEvent e) {
}

@Override
public void mouseExited(MouseEvent e) {
}

});

Expand Down
117 changes: 70 additions & 47 deletions src/application/Shutter.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@
import library.FFMPEG;
import library.FFPROBE;
import library.MEDIAINFO;
import library.NCNN;
import library.SEVENZIP;
import library.TSMUXER;
import library.NCNN;
import library.YOUTUBEDL;
import settings.Colorimetry;
import settings.Corrections;
Expand All @@ -186,7 +186,7 @@ public class Shutter {
/*
* Initialisation
*/
public static String actualVersion = "18.6";
public static String actualVersion = "18.7";
public static String getLanguage = "";
public static String arch = "x86_64";
public static long availableMemory;
Expand Down Expand Up @@ -721,7 +721,7 @@ public static class MouseLogoPosition {
}

public static void main(String[] args) {

//Splashscreen
new Splash();

Expand Down Expand Up @@ -772,8 +772,10 @@ else if (System.getProperty("os.name").contains("Linux"))
} catch (Exception e) {}

//Drop files
if (args.length != 0) {
for (int i = 0; i < args.length; i++) {
if (args.length != 0)
{
for (int i = 0; i < args.length; i++)
{
droppedFiles.add(i, args[i]);
}
}
Expand Down Expand Up @@ -13046,7 +13048,7 @@ public void actionPerformed(ActionEvent arg0) {
comboColorspace.setEnabled(false);

if (comboFonctions.getSelectedItem().toString().equals("VP9")
|| System.getProperty("os.name").contains("Mac") && comboFonctions.getSelectedItem().toString().equals("H.265") && comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
|| System.getProperty("os.name").contains("Mac") && comboFonctions.getSelectedItem().toString().equals("H.265") && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
{
caseAlpha.setEnabled(true);
}
Expand Down Expand Up @@ -13196,7 +13198,7 @@ public void actionPerformed(ActionEvent arg0) {
caseAlpha.setEnabled(false);
}
else if (comboFonctions.getSelectedItem().toString().equals("VP9")
|| System.getProperty("os.name").contains("Mac") && comboFonctions.getSelectedItem().toString().equals("H.265") && comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
|| System.getProperty("os.name").contains("Mac") && comboFonctions.getSelectedItem().toString().equals("H.265") && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
{
caseAlpha.setEnabled(true);
}
Expand Down Expand Up @@ -20875,34 +20877,45 @@ else if ("H.266".equals(comboFonctions.getSelectedItem().toString()))
//Accélération graphique Windows
if (System.getProperty("os.name").contains("Windows"))
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_nvenc -b_ref_mode 0 -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Nvidia NVENC");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_qsv -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Intel Quick Sync");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_amf -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("AMD AMF Encoder");

FFMPEG.hwaccel("-init_hw_device vulkan -f lavfi -i nullsrc -t 1 -c:v " + codec + "_vulkan -vf format=nv12,hwupload -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Vulkan Video");

/*
if (codec == "hevc")
if (arch.equals("arm64"))
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_d3d12va -s 640x360 -f null -" + '"');
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_mf -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Media Foundation");
}
else
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_nvenc -b_ref_mode 0 -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Nvidia NVENC");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_qsv -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Intel Quick Sync");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_amf -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("AMD AMF Encoder");

FFMPEG.hwaccel("-init_hw_device vulkan -f lavfi -i nullsrc -t 1 -c:v " + codec + "_vulkan -vf format=nv12,hwupload -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("D3D12VA");
}*/
graphicsAccel.add("Vulkan Video");

/*
if (codec == "hevc")
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v " + codec + "_d3d12va -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("D3D12VA");
}*/
}
}
else if (System.getProperty("os.name").contains("Linux"))
{
Expand Down Expand Up @@ -21364,7 +21377,7 @@ else if ("H.266".equals(function))
caseAlpha.setLocation(7, caseForceTune.getY() + 17);
grpAdvanced.add(caseAlpha);

if (comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
if (comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
{
caseAlpha.setEnabled(true);
}
Expand Down Expand Up @@ -21457,20 +21470,30 @@ else if ("AV1".equals(comboFonctions.getSelectedItem().toString()))
{
if (System.getProperty("os.name").contains("Windows"))
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_nvenc -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Nvidia NVENC");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_qsv -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Intel Quick Sync");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_amf -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("AMD AMF Encoder");
if (arch.equals("arm64"))
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_mf -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Media Foundation");
}
else
{
FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_nvenc -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Nvidia NVENC");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_qsv -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("Intel Quick Sync");

FFMPEG.hwaccel("-f lavfi -i nullsrc -t 1 -c:v av1_amf -s 640x360 -f null -" + '"');

if (FFMPEG.error == false)
graphicsAccel.add("AMD AMF Encoder");
}
}
else if (System.getProperty("os.name").contains("Mac"))
{
Expand Down Expand Up @@ -23930,7 +23953,7 @@ public static void enableAll() {
caseAlpha.setEnabled(false);
}
else if (comboFonctions.getSelectedItem().toString().equals("VP9")
|| System.getProperty("os.name").contains("Mac") && comboFonctions.getSelectedItem().toString().equals("H.265") && comboAccel.getSelectedItem().equals(language.getProperty("aucune").toLowerCase()) == false && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
|| System.getProperty("os.name").contains("Mac") && comboFonctions.getSelectedItem().toString().equals("H.265") && comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
{
caseAlpha.setEnabled(true);
}
Expand Down
2 changes: 1 addition & 1 deletion src/functions/Merge.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void run() {
lblCurrentEncoding.setText(Shutter.language.getProperty("babEncoding"));

//Metadatas
String metadatas = FunctionUtils.setMetadatas();
String metadatas = FunctionUtils.setMetadata();

//Output Name
File fileOut = new File(fileOutputName);
Expand Down
2 changes: 1 addition & 1 deletion src/functions/Rewrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void run() {
String rotate = setRotate();

//Metadatas
String metadatas = FunctionUtils.setMetadatas();
String metadatas = FunctionUtils.setMetadata();

String flags = "";
if (FFPROBE.videoCodec != null)
Expand Down
15 changes: 13 additions & 2 deletions src/functions/VideoEncoders.java
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ else if (FunctionUtils.autoBitrateMode == true)
break;
}
}

//Scaling
if (setScalingFirst()) //Set scaling before or after depending on using a pad or stretch mode
{
Expand Down Expand Up @@ -531,6 +531,9 @@ else if (FunctionUtils.autoBitrateMode == true)

//Colormatrix
filterComplex = Colorimetry.setColormatrix(filterComplex);

//Colorspace metadata
filterComplex = Colorimetry.setMetadata(filterComplex);

//Rotate
filterComplex = Image.setRotate(filterComplex);
Expand Down Expand Up @@ -731,7 +734,7 @@ else if (comboFonctions.getSelectedItem().toString().equals("DVD"))
String flags = AdvancedFeatures.setFlags(fileName);

//Metadatas
String metadatas = FunctionUtils.setMetadatas();
String metadatas = FunctionUtils.setMetadata();

//OPATOM
String opatom = AdvancedFeatures.setOPATOM(audio);
Expand Down Expand Up @@ -1273,6 +1276,10 @@ else if (comboAccel.getSelectedItem().equals("AMD AMF Encoder"))
{
return " -c:v av1_amf";
}
else if (comboAccel.getSelectedItem().equals("Media Foundation"))
{
return " -c:v av1_mf";
}
else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
{
return " -c:v av1_videotoolbox";
Expand Down Expand Up @@ -1336,6 +1343,8 @@ 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("Media Foundation"))
return " -c:v h264_mf";
else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
return " -c:v h264_videotoolbox";
else if (comboAccel.getSelectedItem().equals("VAAPI"))
Expand All @@ -1362,6 +1371,8 @@ 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("Media Foundation"))
return " -c:v hevc_mf";
else if (comboAccel.getSelectedItem().equals("D3D12VA"))
return " -c:v hevc_d3d12va";
else if (comboAccel.getSelectedItem().equals("OSX VideoToolbox"))
Expand Down
13 changes: 10 additions & 3 deletions src/library/FFMPEG.java
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,16 @@ public static void checkForErrors(String line) {
|| line.contains("Could not find tag for codec")
|| line.contains("Input/output error")
|| line.contains("Operation not permitted")
|| line.contains("Permission denied"))
{
errorLog.append(line + System.lineSeparator());
|| line.contains("Permission denied")
|| line.contains("width not divisible by 2")
|| line.contains("integer multiple of the specified")
|| line.contains("is not multiple of 4")
|| line.contains("cannot be smaller than input dimensions"))
{
if (line.contains("error code") == false && line.contains("return code") == false)
{
errorLog.append(line + System.lineSeparator());
}
error = true;
}
}
Expand Down
12 changes: 10 additions & 2 deletions src/settings/AdvancedFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ else if (profile.equals("main422"))
else
profile = "main422-10";
}
else if ( profile.equals("main444"))
else if (profile.equals("main444"))
{
if (caseColorspace.isSelected() && comboColorspace.getSelectedItem().toString().contains("12bits"))
{
Expand Down Expand Up @@ -913,7 +913,15 @@ else if (lblVBR.getText().equals("CBR"))
options += "interlace=1";

}


/*Alpha
if (caseAlpha.isSelected())
{
if (options != "") options += ":";
options += "alpha=1";
}*/

//GOP
if (caseGOP.isSelected())
{
Expand Down
Loading

0 comments on commit f59acee

Please sign in to comment.