mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
web/queue: add support for video muting
Some checks failed
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Some checks failed
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
also added a temporary stub for audio and gif processing
This commit is contained in:
parent
180bda5d49
commit
235f6c0a3e
@ -1,4 +1,7 @@
|
||||
import { get } from "svelte/store";
|
||||
import { t } from "$lib/i18n/translations";
|
||||
import { addItem } from "$lib/state/queen-bee/queue";
|
||||
import { createDialog } from "$lib/state/dialogs";
|
||||
import { openQueuePopover } from "$lib/state/queue-visibility";
|
||||
import { ffmpegMetadataArgs } from "$lib/util";
|
||||
|
||||
@ -74,22 +77,48 @@ export const createSavePipeline = (info: CobaltLocalProcessingResponse, request:
|
||||
});
|
||||
}
|
||||
|
||||
pipeline.push({
|
||||
worker: "remux",
|
||||
workerId: crypto.randomUUID(),
|
||||
parentId,
|
||||
workerArgs: {
|
||||
ffargs: [
|
||||
"-c:v", "copy",
|
||||
"-c:a", "copy",
|
||||
...(info.output.metadata ? ffmpegMetadataArgs(info.output.metadata) : [])
|
||||
],
|
||||
output: {
|
||||
type: info.output.type,
|
||||
format: info.output.filename.split(".").pop(),
|
||||
if (["merge", "mute"].includes(info.type)) {
|
||||
const ffargs = ["-c:v", "copy"];
|
||||
|
||||
if (info.type === "merge") {
|
||||
ffargs.push("-c:a", "copy");
|
||||
} else if (info.type === "mute") {
|
||||
ffargs.push("-an");
|
||||
}
|
||||
|
||||
ffargs.push(
|
||||
...(info.output.metadata ? ffmpegMetadataArgs(info.output.metadata) : [])
|
||||
);
|
||||
|
||||
pipeline.push({
|
||||
worker: "remux",
|
||||
workerId: crypto.randomUUID(),
|
||||
parentId,
|
||||
workerArgs: {
|
||||
ffargs,
|
||||
output: {
|
||||
type: info.output.type,
|
||||
format: info.output.filename.split(".").pop(),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (["audio", "gif"].includes(info.type)) {
|
||||
return createDialog({
|
||||
id: "save-error",
|
||||
type: "small",
|
||||
meowbalt: "error",
|
||||
buttons: [
|
||||
{
|
||||
text: get(t)("button.gotit"),
|
||||
main: true,
|
||||
action: () => { },
|
||||
},
|
||||
],
|
||||
bodyText: "audio and gif processing isn't implemented yet!",
|
||||
});
|
||||
}
|
||||
|
||||
addItem({
|
||||
id: parentId,
|
||||
|
Loading…
Reference in New Issue
Block a user