diff --git a/build/shared/lib/languages/PDE.properties b/build/shared/lib/languages/PDE.properties
index c9d5740b6..89fa2c5f3 100644
--- a/build/shared/lib/languages/PDE.properties
+++ b/build/shared/lib/languages/PDE.properties
@@ -608,7 +608,7 @@ color_chooser.select = Select
movie_maker = Movie Maker
movie_maker.two.title = Movie Maker II: The Revenge
-movie_maker.two.blurb = This tool creates an MPEG movie or Animated GIF from a sequence of images.
To avoid artifacts caused by re-compressing images as video,
use TIFF, TGA, or PNG images as the source.
TIFF and TGA will save more quickly in a sketch, but require more disk:
saveFrame("frames/####.tif");
saveFrame("frames/####.tga");
PNG images are smaller, but your sketch will run more slowly:
saveFrame("frames/####.png");
Formerly QuickTime Movie Maker by Werner Randelshofer,
this was rewritten completely to use FFmpeg for Processing 4.
+movie_maker.two.blurb = Create an MPEG movie or Animated GIF from a sequence of images
To avoid artifacts caused by re-compressing images as video,
use TIFF, TGA, or PNG images as the source.
TIFF and TGA will save more quickly in a sketch, but require more disk:
saveFrame("frames/####.tif");
saveFrame("frames/####.tga");
PNG images are smaller, but your sketch will run more slowly:
saveFrame("frames/####.png");
Formerly QuickTime Movie Maker by Werner Randelshofer,
this was mostly rewritten to use FFmpeg for Processing 4.
movie_maker.image_folder_help_label = Drag a folder with image files into the field below:
movie_maker.choose_button = Choose...
movie_maker.select_image_folder = Select image folder...
@@ -634,7 +634,9 @@ movie_maker.error.no_images_found = No image files found.
movie_maker.error.sorry = Sorry
movie_maker.error.unknown_tga_format = Unknown .tga file format for %s.
-movie_maker.progress.creating_file_name = Creating %s.
+movie_maker.progress.creating_file_name = Combining images into movie file %s.
movie_maker.progress.creating_output_file = Creating output file
movie_maker.progress.initializing = Initializing...
movie_maker.progress.processing = Processing %s.
+
+movie_maker.progress.handling_frame = Converting frame %s of %s...
\ No newline at end of file
diff --git a/build/shared/tools/MovieMaker/src/processing/app/tools/FFmpegEngine.java b/build/shared/tools/MovieMaker/src/processing/app/tools/FFmpegEngine.java
index 537f9c324..9d871fdcf 100644
--- a/build/shared/tools/MovieMaker/src/processing/app/tools/FFmpegEngine.java
+++ b/build/shared/tools/MovieMaker/src/processing/app/tools/FFmpegEngine.java
@@ -6,6 +6,7 @@ import processing.app.Platform;
import javax.swing.*;
import java.awt.Component;
import java.io.*;
+import java.text.NumberFormat;
import java.util.List;
import java.util.ArrayList;
import java.util.function.Consumer;
@@ -161,15 +162,18 @@ class FFmpegEngine {
}
cmd.add(outputPath);
- //final String outputName = new File(outputPath).getName();
+ final String outputName = new File(outputPath).getName();
// pass cmd to Runtime exec
// read the output and set the progress bar
// show a message (success/failure) when complete
+ final String maxCount = nfc(imgFiles.length);
final ProgressMonitor progress = new ProgressMonitor(parent,
- Language.interpolate("movie_maker.progress.creating_file_name", movieFile.getName()),
- Language.text("movie_maker.progress.creating_output_file"),
+ Language.interpolate("movie_maker.progress.creating_file_name", outputName),
+ //Language.text("movie_maker.progress.creating_output_file"),
+ //Language.interpolate("movie_maker.progress.handling_frame", 0, imgFiles.length),
+ Language.interpolate("movie_maker.progress.handling_frame", maxCount, maxCount),
0, imgFiles.length);
// https://stackoverflow.com/a/33386692
@@ -183,6 +187,8 @@ class FFmpegEngine {
int frameCount = Integer.parseInt(m.group(1));
// this was used to show which (input) image file was being handled
//progress.setNote(Language.interpolate("movie_maker.progress.processing", inputName));
+ progress.setNote(Language.interpolate("movie_maker.progress.handling_frame",
+ nfc(frameCount + 1), nfc(imgFiles.length)));
// System.out.println(frameCount + " of " + imgFiles.length);
progress.setProgress(frameCount);
// } else {
@@ -218,4 +224,14 @@ class FFmpegEngine {
new BufferedReader(new InputStreamReader(inputStream)).lines().forEach(consumeInputLine);
}
}
+
+
+ static NumberFormat formatter = NumberFormat.getInstance();
+
+ static String nfc(int num) {
+// if (formatter == null) {
+// formatter = NumberFormat.getInstance();
+// }
+ return formatter.format(num);
+ }
}
\ No newline at end of file