Fixed video export, still sequence selection
This commit is contained in:
parent
a2af605d37
commit
8a6bc0b4f5
|
@ -122,8 +122,7 @@ class FFMPEG {
|
||||||
return video;
|
return video;
|
||||||
}
|
}
|
||||||
if (w && h) {
|
if (w && h) {
|
||||||
scale = `,scale=${w}:${h}`;
|
scale = `,scale=trunc(ih*dar):${h}`; //:force_original_aspect_ratio=decrease,pad=${w}:${h}:(ow-iw)/2:(oh-ih)/2
|
||||||
[];
|
|
||||||
}
|
}
|
||||||
tmpoutput = path_1.join(this.TMPDIR, `${state.hash}-export-${padded}.${ext}`);
|
tmpoutput = path_1.join(this.TMPDIR, `${state.hash}-export-${padded}.${ext}`);
|
||||||
try {
|
try {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -240,12 +240,19 @@ class FilmOut {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.dir(info);
|
||||||
this.state.frame = 0;
|
this.state.frame = 0;
|
||||||
this.state.path = arg.path;
|
this.state.path = arg.path;
|
||||||
this.state.fileName = arg.fileName;
|
this.state.fileName = arg.fileName;
|
||||||
this.state.frames = frames;
|
this.state.frames = frames;
|
||||||
this.state.info = info;
|
this.state.info = info;
|
||||||
this.state.hash = this.hash(arg.path);
|
this.state.hash = this.hash(arg.path);
|
||||||
|
if (info.fps) {
|
||||||
|
this.state.fps = info.fps;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.state.fps = 24; //default
|
||||||
|
}
|
||||||
if (info.seconds) {
|
if (info.seconds) {
|
||||||
this.state.seconds = info.seconds;
|
this.state.seconds = info.seconds;
|
||||||
}
|
}
|
||||||
|
@ -370,7 +377,6 @@ class FilmOut {
|
||||||
const state = JSON.parse(JSON.stringify(this.state));
|
const state = JSON.parse(JSON.stringify(this.state));
|
||||||
let path;
|
let path;
|
||||||
state.frame = arg.frame;
|
state.frame = arg.frame;
|
||||||
console.dir(state);
|
|
||||||
try {
|
try {
|
||||||
path = await this.ffmpeg.frame(state, { color: [255, 255, 255] });
|
path = await this.ffmpeg.frame(state, { color: [255, 255, 255] });
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -181,7 +181,7 @@ class FilmOut {
|
||||||
this.useFile();
|
this.useFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!valid) {
|
if (!valid && typeof files.cancelled !== 'undefined') {
|
||||||
gui.warn('Invalid selection', `The selection "${displayName}" is not an accepted video, image or folder containing an image sequence.`);
|
gui.warn('Invalid selection', `The selection "${displayName}" is not an accepted video, image or folder containing an image sequence.`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ class FilmOut {
|
||||||
if (proceed) {
|
if (proceed) {
|
||||||
gui.overlay(true);
|
gui.overlay(true);
|
||||||
gui.spinner(true, `Getting info about ${fileName}`);
|
gui.spinner(true, `Getting info about ${fileName}`);
|
||||||
ipcRenderer.send('filmout', obj);
|
ipcRenderer.send(this.id, obj);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#projector_type_digital').prop('checked', 'checked');
|
$('#projector_type_digital').prop('checked', 'checked');
|
||||||
|
@ -310,7 +310,7 @@ class FilmOut {
|
||||||
const frameStr = $('#filmout_position').val();
|
const frameStr = $('#filmout_position').val();
|
||||||
const frame = parseInt(frameStr, 10);
|
const frame = parseInt(frameStr, 10);
|
||||||
this.state.frame = frame;
|
this.state.frame = frame;
|
||||||
ipcRenderer.send('preview_frame', { state: this.state });
|
ipcRenderer.send('preview_frame', { frame });
|
||||||
}
|
}
|
||||||
onFrame(evt, args) {
|
onFrame(evt, args) {
|
||||||
const elem = $('#filmout');
|
const elem = $('#filmout');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -185,7 +185,7 @@ class FilmOut {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid && typeof files.cancelled !== 'undefined') {
|
||||||
gui.warn('Invalid selection', `The selection "${displayName}" is not an accepted video, image or folder containing an image sequence.`);
|
gui.warn('Invalid selection', `The selection "${displayName}" is not an accepted video, image or folder containing an image sequence.`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ class FilmOut {
|
||||||
if (proceed) {
|
if (proceed) {
|
||||||
gui.overlay(true);
|
gui.overlay(true);
|
||||||
gui.spinner(true, `Getting info about ${fileName}`);
|
gui.spinner(true, `Getting info about ${fileName}`);
|
||||||
ipcRenderer.send('filmout', obj);
|
ipcRenderer.send(this.id, obj);
|
||||||
} else {
|
} else {
|
||||||
$('#projector_type_digital').prop('checked', 'checked');
|
$('#projector_type_digital').prop('checked', 'checked');
|
||||||
$('#digital').removeClass('active');
|
$('#digital').removeClass('active');
|
||||||
|
@ -305,6 +305,7 @@ class FilmOut {
|
||||||
this.reset();
|
this.reset();
|
||||||
gui.updateState();
|
gui.updateState();
|
||||||
this.previewFrame();
|
this.previewFrame();
|
||||||
|
|
||||||
if (!this.state.directory) {
|
if (!this.state.directory) {
|
||||||
this.preExport();
|
this.preExport();
|
||||||
}
|
}
|
||||||
|
@ -317,7 +318,7 @@ class FilmOut {
|
||||||
const frameStr : string = $('#filmout_position').val() as string;
|
const frameStr : string = $('#filmout_position').val() as string;
|
||||||
const frame : number = parseInt(frameStr, 10);
|
const frame : number = parseInt(frameStr, 10);
|
||||||
this.state.frame = frame;
|
this.state.frame = frame;
|
||||||
ipcRenderer.send('preview_frame', { state : this.state });
|
ipcRenderer.send('preview_frame', { frame });
|
||||||
}
|
}
|
||||||
onFrame (evt : any, args : any) {
|
onFrame (evt : any, args : any) {
|
||||||
const elem : any = $('#filmout');
|
const elem : any = $('#filmout');
|
||||||
|
|
|
@ -159,7 +159,7 @@ class FFMPEG {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w && h) {
|
if (w && h) {
|
||||||
scale = `,scale=${w}:${h}`;[]
|
scale = `,scale=trunc(ih*dar):${h}`;//:force_original_aspect_ratio=decrease,pad=${w}:${h}:(ow-iw)/2:(oh-ih)/2
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpoutput = join(this.TMPDIR, `${state.hash}-export-${padded}.${ext}`);
|
tmpoutput = join(this.TMPDIR, `${state.hash}-export-${padded}.${ext}`);
|
||||||
|
|
|
@ -244,6 +244,8 @@ class FilmOut {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.dir(info);
|
||||||
|
|
||||||
this.state.frame = 0;
|
this.state.frame = 0;
|
||||||
this.state.path = arg.path;
|
this.state.path = arg.path;
|
||||||
this.state.fileName = arg.fileName;
|
this.state.fileName = arg.fileName;
|
||||||
|
@ -251,6 +253,12 @@ class FilmOut {
|
||||||
this.state.info = info;
|
this.state.info = info;
|
||||||
this.state.hash = this.hash(arg.path);
|
this.state.hash = this.hash(arg.path);
|
||||||
|
|
||||||
|
if (info.fps) {
|
||||||
|
this.state.fps = info.fps;
|
||||||
|
} else {
|
||||||
|
this.state.fps = 24; //default
|
||||||
|
}
|
||||||
|
|
||||||
if (info.seconds) {
|
if (info.seconds) {
|
||||||
this.state.seconds = info.seconds;
|
this.state.seconds = info.seconds;
|
||||||
} else if (info.fps && frames) {
|
} else if (info.fps && frames) {
|
||||||
|
@ -385,7 +393,6 @@ class FilmOut {
|
||||||
let path : string;
|
let path : string;
|
||||||
|
|
||||||
state.frame = arg.frame;
|
state.frame = arg.frame;
|
||||||
console.dir(state);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
path = await this.ffmpeg.frame(state, { color : [255, 255, 255] });
|
path = await this.ffmpeg.frame(state, { color : [255, 255, 255] });
|
||||||
|
|
Loading…
Reference in New Issue