Fixed video export, still sequence selection
This commit is contained in:
parent
a2af605d37
commit
8a6bc0b4f5
|
@ -122,8 +122,7 @@ class FFMPEG {
|
|||
return video;
|
||||
}
|
||||
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}`);
|
||||
try {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -240,12 +240,19 @@ class FilmOut {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
console.dir(info);
|
||||
this.state.frame = 0;
|
||||
this.state.path = arg.path;
|
||||
this.state.fileName = arg.fileName;
|
||||
this.state.frames = frames;
|
||||
this.state.info = info;
|
||||
this.state.hash = this.hash(arg.path);
|
||||
if (info.fps) {
|
||||
this.state.fps = info.fps;
|
||||
}
|
||||
else {
|
||||
this.state.fps = 24; //default
|
||||
}
|
||||
if (info.seconds) {
|
||||
this.state.seconds = info.seconds;
|
||||
}
|
||||
|
@ -370,7 +377,6 @@ class FilmOut {
|
|||
const state = JSON.parse(JSON.stringify(this.state));
|
||||
let path;
|
||||
state.frame = arg.frame;
|
||||
console.dir(state);
|
||||
try {
|
||||
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();
|
||||
}
|
||||
}
|
||||
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.`);
|
||||
return false;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ class FilmOut {
|
|||
if (proceed) {
|
||||
gui.overlay(true);
|
||||
gui.spinner(true, `Getting info about ${fileName}`);
|
||||
ipcRenderer.send('filmout', obj);
|
||||
ipcRenderer.send(this.id, obj);
|
||||
}
|
||||
else {
|
||||
$('#projector_type_digital').prop('checked', 'checked');
|
||||
|
@ -310,7 +310,7 @@ class FilmOut {
|
|||
const frameStr = $('#filmout_position').val();
|
||||
const frame = parseInt(frameStr, 10);
|
||||
this.state.frame = frame;
|
||||
ipcRenderer.send('preview_frame', { state: this.state });
|
||||
ipcRenderer.send('preview_frame', { frame });
|
||||
}
|
||||
onFrame(evt, args) {
|
||||
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.`);
|
||||
return false;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ class FilmOut {
|
|||
if (proceed) {
|
||||
gui.overlay(true);
|
||||
gui.spinner(true, `Getting info about ${fileName}`);
|
||||
ipcRenderer.send('filmout', obj);
|
||||
ipcRenderer.send(this.id, obj);
|
||||
} else {
|
||||
$('#projector_type_digital').prop('checked', 'checked');
|
||||
$('#digital').removeClass('active');
|
||||
|
@ -305,6 +305,7 @@ class FilmOut {
|
|||
this.reset();
|
||||
gui.updateState();
|
||||
this.previewFrame();
|
||||
|
||||
if (!this.state.directory) {
|
||||
this.preExport();
|
||||
}
|
||||
|
@ -317,7 +318,7 @@ class FilmOut {
|
|||
const frameStr : string = $('#filmout_position').val() as string;
|
||||
const frame : number = parseInt(frameStr, 10);
|
||||
this.state.frame = frame;
|
||||
ipcRenderer.send('preview_frame', { state : this.state });
|
||||
ipcRenderer.send('preview_frame', { frame });
|
||||
}
|
||||
onFrame (evt : any, args : any) {
|
||||
const elem : any = $('#filmout');
|
||||
|
|
|
@ -159,7 +159,7 @@ class FFMPEG {
|
|||
}
|
||||
|
||||
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}`);
|
||||
|
|
|
@ -244,6 +244,8 @@ class FilmOut {
|
|||
}
|
||||
}
|
||||
|
||||
console.dir(info);
|
||||
|
||||
this.state.frame = 0;
|
||||
this.state.path = arg.path;
|
||||
this.state.fileName = arg.fileName;
|
||||
|
@ -251,6 +253,12 @@ class FilmOut {
|
|||
this.state.info = info;
|
||||
this.state.hash = this.hash(arg.path);
|
||||
|
||||
if (info.fps) {
|
||||
this.state.fps = info.fps;
|
||||
} else {
|
||||
this.state.fps = 24; //default
|
||||
}
|
||||
|
||||
if (info.seconds) {
|
||||
this.state.seconds = info.seconds;
|
||||
} else if (info.fps && frames) {
|
||||
|
@ -385,7 +393,6 @@ class FilmOut {
|
|||
let path : string;
|
||||
|
||||
state.frame = arg.frame;
|
||||
console.dir(state);
|
||||
|
||||
try {
|
||||
path = await this.ffmpeg.frame(state, { color : [255, 255, 255] });
|
||||
|
|
Loading…
Reference in New Issue