fixing undefined edges
This commit is contained in:
parent
4552ff5b51
commit
8c345c6e63
|
@ -150,22 +150,21 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
|
||||||
})
|
})
|
||||||
.filter((m) => m !== null);
|
.filter((m) => m !== null);
|
||||||
|
|
||||||
|
console.log(mediaMaps);
|
||||||
|
|
||||||
if (filtergraph.length > 0) {
|
if (filtergraph.length > 0) {
|
||||||
let fg = `"${filtergraph.join(";")}"`;
|
let fg = `"${filtergraph.join(";")}"`;
|
||||||
|
|
||||||
// this crazy thing replaces stuff like [1];[1] with a comma!
|
// this crazy thing replaces stuff like [1];[1] with a comma!
|
||||||
fg = fg.replaceAll(/(\[\d+\]);\1(?!\[)/g, ",");
|
fg = fg.replaceAll(/(\[\d+\]);\1(?!\[)/g, ",");
|
||||||
|
|
||||||
hasVid = fg.includes(":v]");
|
|
||||||
hasAud = fg.includes(":a]");
|
|
||||||
|
|
||||||
finalCommand.push("-filter_complex", fg);
|
finalCommand.push("-filter_complex", fg);
|
||||||
|
|
||||||
if (hasAud) {
|
if (fg.includes("[out_a]")) {
|
||||||
finalCommand.push("-map", '"[out_a]"');
|
finalCommand.push("-map", '"[out_a]"');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasVid) {
|
if (fg.includes("[out_v]")) {
|
||||||
finalCommand.push("-map", '"[out_v]"');
|
finalCommand.push("-map", '"[out_v]"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue