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 Sep 9, 2024
1 parent 2c170f1 commit 83e32b9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 27 deletions.
33 changes: 9 additions & 24 deletions src/library/FFPROBE.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,20 +299,11 @@ else if (line.contains("bottom first") || line.contains("bottom coded first"))
}

// Détection YUVJ
if ((line.contains("Video:") || line.contains("Stream group")) && line.contains("attached pic") == false)
if (line.contains("Video:") && line.contains("attached pic") == false)
{
//Codec vidéo
String[] splitVideo = null;

if (line.contains("Video:") && extension.equals(".heic") == false)
{
splitVideo = line.substring(line.indexOf("Video:")).split(" ");
}
else if (line.contains("Stream group")) //HEIC format
{
splitVideo = line.substring(line.indexOf("Grid:")).split(" ");
}

String[] splitVideo = line.substring(line.indexOf("Video:")).split(" ");

videoCodec = splitVideo[1].replace(",", "");

if (videoCodec.equals("dnxhd") && line.toLowerCase().contains("dnxhr"))
Expand All @@ -335,16 +326,8 @@ else if (line.contains("(pc)"))
lumaLevel = "0-255";

// Lecture
String data = line;

if (line.contains("Video:") && extension.equals(".heic") == false)
{
data = line.substring(data.indexOf("Video:"));
}
else if (line.contains("Stream group")) //HEIC format
{
data = line.substring(data.indexOf("Grid:"));
}
String data = line;
data = line.substring(data.indexOf("Video:"));

// Timecode Size
String split[] = data.split(",");
Expand Down Expand Up @@ -573,8 +556,10 @@ else if (line.contains("7.1"))
subtitleStreams ++;

String s[] = line.substring(line.lastIndexOf(":") + 1).split(" ");
subtitlesCodec = s[1].replace(",", ""); }
subtitlesCodec = s[1].replace(",", "");
}

/*
//Timecode from XML
if (line.contains("StartTimecode"))
{
Expand All @@ -586,7 +571,7 @@ else if (line.contains("7.1"))
timecode2 = str[1].replace(" ", "");
timecode3 = str[2].replace(" ", "");
timecode4 = str[3].replace(" ", "");
}
}*/

//Timecode
if (line.contains("timecode") && line.contains("timecode is invalid") == false && line.contains("Input") == false) //Avoid "timecode" in the filename
Expand Down
24 changes: 21 additions & 3 deletions src/settings/FunctionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,26 @@ public static String setOutputDestination(String output, File file) {
if (caseCreateTree.isSelected())
{
File pathToFile = null;
String folderLevel = "";

if (System.getProperty("os.name").contains("Mac") || System.getProperty("os.name").contains("Linux"))
{
String s[] = file.getParent().toString().split("/");
pathToFile = new File(lblDestination1.getText() + file.getParent().toString().replace("/Volumes", "").replace(s[2], ""));
String s[] = file.getParent().toString().replace("/Volumes", "").split("/");
for (int i = comboCreateTree.getSelectedIndex() + 1 ; i < s.length ; i++)
{
folderLevel += ("/" + s[i]);
}
}
else
pathToFile = new File (lblDestination1.getText() + file.getParent().toString().substring(2));
{
String s[] = file.getParent().toString().substring(2).split("\\\\");
for (int i = comboCreateTree.getSelectedIndex() + 1 ; i < s.length ; i++)
{
folderLevel += ("\\" + s[i]);
}
}

pathToFile = new File(lblDestination1.getText() + folderLevel);

if (pathToFile.exists() == false)
pathToFile.mkdirs();
Expand Down Expand Up @@ -864,6 +877,11 @@ else if (suffix.contains("{fps}"))
suffix = suffix.replace("{preset}", Utils.currentPreset.replace(".enc", ""));
}

if (suffix.contains("{timecode}"))
{
suffix = suffix.replace("{timecode}", FFPROBE.timecode1 + FFPROBE.timecode2 + FFPROBE.timecode3 + FFPROBE.timecode4);
}

if (suffix.contains("{bitrate}"))
{
if (Shutter.grpBitrate.isVisible())
Expand Down

0 comments on commit 83e32b9

Please sign in to comment.