Commit ceb45dac by ramdayalmunda

ffmpeg video filter added sothat videos could run on firefox

parent 8107f789
......@@ -44,8 +44,8 @@ module.exports.generateVideo = async function (req, res) {
videoPath = path.join(TEMP_VIDEO_DIR, `${tutorShotData._id}.mp4`)
thumbnailPath = path.join(TEMP_IMAGE_DIR, `${tutorShotData._id}_thumbnail`)
fileName = tutorShotData._id
thumbnailName = `${tutorShotData._id}_thumbnail`
fileName = `${tutorShotData._id}.mp4`
thumbnailName = `${tutorShotData._id}_thumbnail.png`
// // this is to generate each individual images and get their buffers
let frameNumber = 1;
......
......@@ -78,6 +78,7 @@ module.exports.createVideoFromImages = async function (imageArr, options) {
console.error('Error creating video:', err);
rej(undefined, err)
})
.videoFilters('format=yuv420p')
.input(imagePathString)
.output(outputFilePath)
.outputFPS(frameRate) // Set frames per second as needed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment