fix audio only filters

This commit is contained in:
Sam Lavigne
2023-08-28 12:13:42 -04:00
parent 692490398f
commit 115c30466b
2 changed files with 36 additions and 5 deletions

View File

@ -109,9 +109,11 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
finalCommand.push("0:a");
}
finalCommand.push("-map");
if (hasVid) {
finalCommand.push("-map");
finalCommand.push('"[vid_out]"');
} else {
finalCommand.push("0:v");
}
}
@ -253,6 +255,12 @@ export function addNode(_data, type) {
});
}
export function resetNodes() {
nodes.set([]);
addNode({ name: "punch.mp4" }, "input");
addNode({ name: "out.mp4" }, "output");
}
export function removeNode(id) {
nodes.update((_nodes) => {
const index = _nodes.findIndex((n) => n.id === id);