video-encoder/index.js
2023-10-14 22:41:00 +02:00

21 lines
571 B
JavaScript

const fs = require("fs");
const path = require("path");
const video = require("./functions/video");
// File is used for for testing
async function performTest(){
video.getVideoInfo("./uploads/test.mp4").then(video => {
console.log("Video Size:", video.size, "- duration:", video.durationInSeconds);
});
video.scaleVideo({
inputPath: "./uploads/test.mp4",
outputPath: "./proccessed/test-480.mp4",
bitrate: "800k",
width: 640,
height: 480
})
}
performTest();
// TODO: do the nightmare of class directions..