Introduce config setting for contact sheet timestamp style
This commit is contained in:
parent
7e3ceb29f4
commit
303485a315
|
@ -56,6 +56,7 @@ public class Settings {
|
||||||
public String colorBase = "#FFFFFF";
|
public String colorBase = "#FFFFFF";
|
||||||
public int concurrentRecordings = 0;
|
public int concurrentRecordings = 0;
|
||||||
public boolean confirmationForDangerousActions = false;
|
public boolean confirmationForDangerousActions = false;
|
||||||
|
public String contactsheetTimestampLook = "font=sans-serif:fontcolor=white:fontsize=60:box=1:boxcolor=black@0.5:boxborderw=5";
|
||||||
public boolean determineResolution = false;
|
public boolean determineResolution = false;
|
||||||
public List<String> disabledSites = new ArrayList<>();
|
public List<String> disabledSites = new ArrayList<>();
|
||||||
public String downloadFilename = "${modelSanitizedName}-${localDateTime}";
|
public String downloadFilename = "${modelSanitizedName}-${localDateTime}";
|
||||||
|
|
|
@ -102,6 +102,7 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
|
||||||
int numberOfThumbs = rows * cols;
|
int numberOfThumbs = rows * cols;
|
||||||
long lengthInSeconds = rec.getLength().getSeconds();
|
long lengthInSeconds = rec.getLength().getSeconds();
|
||||||
double thumbnailInterval = lengthInSeconds / (double)numberOfThumbs;
|
double thumbnailInterval = lengthInSeconds / (double)numberOfThumbs;
|
||||||
|
String timestampLook = config.getSettings().contactsheetTimestampLook;
|
||||||
|
|
||||||
NumberFormat nf = new DecimalFormat("000");
|
NumberFormat nf = new DecimalFormat("000");
|
||||||
for (int i = 0; i < numberOfThumbs; i++) {
|
for (int i = 0; i < numberOfThumbs; i++) {
|
||||||
|
@ -114,8 +115,7 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
|
||||||
int minutes = (int) (startTimeInSeconds % 3600 / 60);
|
int minutes = (int) (startTimeInSeconds % 3600 / 60);
|
||||||
int seconds = (int) (startTimeInSeconds % 60);
|
int seconds = (int) (startTimeInSeconds % 60);
|
||||||
String timestamp = String.format("%02d\\:%02d\\:%02d", hours, minutes, seconds);
|
String timestamp = String.format("%02d\\:%02d\\:%02d", hours, minutes, seconds);
|
||||||
videoFilter += ",drawtext='text=" + timestamp
|
videoFilter += ",drawtext='text=" + timestamp + ":" + timestampLook + ":x=(w-text_w-20):y=(h-text_h-20)'";
|
||||||
+ ":fontcolor=white:fontsize=48:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w-20):y=(h-text_h-20)'";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
File input = getInputFile(rec);
|
File input = getInputFile(rec);
|
||||||
|
|
Loading…
Reference in New Issue