Allow for longer videos by using longer padded numbers for sequences

This commit is contained in:
sixteenmillimeter 2020-02-21 01:58:56 -05:00
parent 549cd3cc04
commit 32fe873707
10 changed files with 20 additions and 20 deletions

View File

@ -11,7 +11,7 @@ const { BrowserWindow } = require('electron');
function padded_frame(i) {
let len = (i + '').length;
let str = i + '';
for (let x = 0; x < 5 - len; x++) {
for (let x = 0; x < 8 - len; x++) {
str = '0' + str;
}
return str;

File diff suppressed because one or more lines are too long

View File

@ -36,7 +36,7 @@ class FFMPEG {
padded_frame(i) {
let len = (i + '').length;
let str = i + '';
for (let x = 0; x < 5 - len; x++) {
for (let x = 0; x < 8 - len; x++) {
str = '0' + str;
}
return str;
@ -118,7 +118,7 @@ class FFMPEG {
//if (system.platform !== 'nix') {
ext = 'png';
//}
tmpoutput = path_1.join(tmppath, `export-%05d.${ext}`);
tmpoutput = path_1.join(tmppath, `export-%08d.${ext}`);
try {
await fs_extra_1.mkdir(tmppath);
}
@ -163,7 +163,7 @@ class FFMPEG {
return true;
}
/**
* Delete all frames in temp directory.
* Deletes all frames in temp directory.
*
**/
async clearAll() {
@ -188,7 +188,7 @@ class FFMPEG {
}
/**
* Checks if mcopy temp directory exists. If it doesn't,
* create it.
* creates it.
**/
async checkDir() {
let fileExists;

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@ const { BrowserWindow } = require('electron');
function padded_frame(i) {
let len = (i + '').length;
let str = i + '';
for (let x = 0; x < 5 - len; x++) {
for (let x = 0; x < 8 - len; x++) {
str = '0' + str;
}
return str;

File diff suppressed because one or more lines are too long

View File

@ -36,7 +36,7 @@ class FFMPEG {
padded_frame(i) {
let len = (i + '').length;
let str = i + '';
for (let x = 0; x < 5 - len; x++) {
for (let x = 0; x < 8 - len; x++) {
str = '0' + str;
}
return str;
@ -118,7 +118,7 @@ class FFMPEG {
//if (system.platform !== 'nix') {
ext = 'png';
//}
tmpoutput = path_1.join(tmppath, `export-%05d.${ext}`);
tmpoutput = path_1.join(tmppath, `export-%08d.${ext}`);
try {
await fs_extra_1.mkdir(tmppath);
}
@ -163,7 +163,7 @@ class FFMPEG {
return true;
}
/**
* Delete all frames in temp directory.
* Deletes all frames in temp directory.
*
**/
async clearAll() {
@ -188,7 +188,7 @@ class FFMPEG {
}
/**
* Checks if mcopy temp directory exists. If it doesn't,
* create it.
* creates it.
**/
async checkDir() {
let fileExists;

File diff suppressed because one or more lines are too long

View File

@ -8,14 +8,13 @@
import spawn = require('spawn');
import { join as pathJoin } from 'path';
import { delay } from 'delay';
import { exec } from 'exec';
const { BrowserWindow } = require('electron');
function padded_frame (i : number) {
let len = (i + '').length;
let str = i + '';
for (let x = 0; x < 5 - len; x++) {
for (let x = 0; x < 8 - len; x++) {
str = '0' + str;
}
return str;

View File

@ -49,7 +49,7 @@ class FFMPEG {
private padded_frame (i : number) {
let len = (i + '').length;
let str = i + '';
for (let x = 0; x < 5 - len; x++) {
for (let x = 0; x < 8 - len; x++) {
str = '0' + str;
}
return str;
@ -140,7 +140,8 @@ class FFMPEG {
ext = 'png';
//}
tmpoutput = join(tmppath, `export-%05d.${ext}`);
tmpoutput = join(tmppath, `export-%08d.${ext}`);
try {
await mkdir(tmppath);
} catch (err) {
@ -190,7 +191,7 @@ class FFMPEG {
}
/**
* Delete all frames in temp directory.
* Deletes all frames in temp directory.
*
**/
public async clearAll () {
@ -214,7 +215,7 @@ class FFMPEG {
/**
* Checks if mcopy temp directory exists. If it doesn't,
* create it.
* creates it.
**/
private async checkDir () {
let fileExists : boolean;