checkpoint
This commit is contained in:
parent
17d59d4885
commit
684758857e
|
@ -1,5 +1,3 @@
|
||||||
const editly = require("editly");
|
|
||||||
|
|
||||||
const graph_density = 1000;
|
const graph_density = 1000;
|
||||||
|
|
||||||
const threshold_at_point = 1;
|
const threshold_at_point = 1;
|
||||||
|
@ -51,28 +49,17 @@ process.stdin.on("readable", () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const mode_to_image = (mode: string) => {
|
||||||
|
return mode === "silence" ? "pics/cisza.png" : "pics/kuba.png";
|
||||||
|
};
|
||||||
|
|
||||||
process.stdin.on("end", () => {
|
process.stdin.on("end", () => {
|
||||||
console.log(results);
|
results.forEach(([mode, duration_units]) => {
|
||||||
const spec = {
|
console.log("file", `'${mode_to_image(mode)}'`);
|
||||||
outPath: "./out.mp4",
|
console.log("duration", (duration_units / graph_density).toFixed(4));
|
||||||
width: 800,
|
});
|
||||||
height: 600,
|
|
||||||
fps: 30,
|
console.log("file", `'${mode_to_image(results[results.length - 1][0])}'`);
|
||||||
defaults: { transition: { duration: 0 } },
|
|
||||||
audioFilePath: "/home/kuba/Downloads/odcinek1-kuba.wav",
|
// console.log(formatTime(total_speaking), formatTime(position));
|
||||||
clips: results.map((e) => ({
|
|
||||||
duration: s(e[1]),
|
|
||||||
layers: [
|
|
||||||
{
|
|
||||||
type: "title",
|
|
||||||
text: e[0] === "silence" ? " " : "Kuba Mówi",
|
|
||||||
position: "center",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})),
|
|
||||||
fast: true,
|
|
||||||
};
|
|
||||||
console.log(spec);
|
|
||||||
editly(spec).then(() => console.log("done!"));
|
|
||||||
console.log(formatTime(total_speaking));
|
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user