Skip to content

Commit

Permalink
Improved progress display
Browse files Browse the repository at this point in the history
  • Loading branch information
olir committed Mar 15, 2018
1 parent b0fdbaf commit 12bc94a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/main/java/de/screenflow/frankenstein/MovieProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ public boolean process(ProcessingListener l) {
// 2. Process Video without audio ()
System.out.print("Processing video: ");
Mat newFrame = null;

if (l != null)
l.taskUpdate(null, "Processing video");

int i = 0;
while (!stopped
&& (configuration.getSource().getFrames() < 0 || i < configuration.getSource().getFrames())) {
Expand Down Expand Up @@ -193,7 +195,7 @@ public boolean process(ProcessingListener l) {
if (!new Task(this, ffmpeg.getAbsolutePath() + " -y -i " + tempVideoFile.getAbsolutePath() + " -i "
+ tempAudioFile.getAbsolutePath() + " -i " + tempMetadataFile.getAbsolutePath()
+ " -map_metadata 2" + " -c:a aac -c:v libx264 -q 17 \"" + configuration.outputVideo + '"',
new TimeTaskHandler(l, "Processing Output")).run())
new TimeTaskHandler(l, "Assembling Output")).run())
return false;
} else {
if (!new Task(this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,14 @@ public void drawEditCanvas() {
}
} else {
// Cuttings
gc.setFill(Color.CADETBLUE);
gc.fillRect(0, 3, editCanvas.getWidth(), 6);
gc.setFill(Color.LIGHTGRAY);
if (!seeking)
gc.fillRect(0, 3, editCanvas.getWidth(), 6);
}
if (seeking && seekPos > 0) {
// Seek running
int x = (int) ((editCanvas.getWidth() - 1) * (seekPos - 1) / (frames - 1));
gc.setFill(Color.DARKOLIVEGREEN);
gc.setFill(Color.RED);
gc.fillRect(0, 0, x, 2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.BorderPane?>


<BorderPane maxHeight="600.0" maxWidth="512.0" prefHeight="600.0" prefWidth="512.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.screenflow.frankenstein.fxml.FilterSetupController">
</BorderPane>

0 comments on commit 12bc94a

Please sign in to comment.