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