Better log
This commit is contained in:
parent
f32a396b36
commit
80802d44e3
1 changed files with 14 additions and 12 deletions
|
@ -64,7 +64,7 @@ const ffmpegExec = async (
|
|||
try {
|
||||
ffmpeg.FS("writeFile", inputPath, inputData);
|
||||
|
||||
log.info(`Running FFmpeg (wasm) command ${cmd}`);
|
||||
log.debug(() => `[wasm] ffmpeg ${cmd.join(" ")}`);
|
||||
await ffmpeg.run(...cmd);
|
||||
|
||||
return ffmpeg.FS("readFile", outputPath);
|
||||
|
@ -98,14 +98,16 @@ const substitutePlaceholders = (
|
|||
inputFilePath: string,
|
||||
outputFilePath: string,
|
||||
) =>
|
||||
command.map((segment) => {
|
||||
if (segment == ffmpegPathPlaceholder) {
|
||||
return "";
|
||||
} else if (segment == inputPathPlaceholder) {
|
||||
return inputFilePath;
|
||||
} else if (segment == outputPathPlaceholder) {
|
||||
return outputFilePath;
|
||||
} else {
|
||||
return segment;
|
||||
}
|
||||
});
|
||||
command
|
||||
.map((segment) => {
|
||||
if (segment == ffmpegPathPlaceholder) {
|
||||
return undefined;
|
||||
} else if (segment == inputPathPlaceholder) {
|
||||
return inputFilePath;
|
||||
} else if (segment == outputPathPlaceholder) {
|
||||
return outputFilePath;
|
||||
} else {
|
||||
return segment;
|
||||
}
|
||||
})
|
||||
.filter((c) => !!c);
|
||||
|
|
Loading…
Add table
Reference in a new issue