From d9653197c355e7f1d40451b73f1b56fb898da79a Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 16 Sep 2024 09:58:38 -0700 Subject: [PATCH] remove moovatom check --- libs/video/utils.js | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/libs/video/utils.js b/libs/video/utils.js index a749f103..6a98453c 100644 --- a/libs/video/utils.js +++ b/libs/video/utils.js @@ -941,31 +941,31 @@ module.exports = (s,config,lang) => { ext: 'mp4' },chosenVideo); const videoPath = getVideoPath(video); - const moovExists = await hasMoovAtom(videoPath); - if (moovExists) { - s.debugLog('The file already has a moov atom.'); - } else { - return true; - // const { videoCodec, audioCodec } = getVideoCodecsFromMonitorConfig(video); - // const tempPath = path.join(s.getVideoDirectory(video), `TEMP_${s.formattedTime(video.time)}.${video.ext}`); - // await addMoovAtom(videoPath, tempPath, videoCodec, audioCodec); - // await moveFile(tempPath, videoPath) - // const newFileSize = (await fsP.stat(videoPath)).size; - // const updateResponse = await s.knexQueryPromise({ - // action: "update", - // table: "Videos", - // update: { - // size: newFileSize - // }, - // where: [ - // ['ke','=',video.ke], - // ['mid','=',video.mid], - // ['time','=',video.time], - // ['end','=',video.end], - // ['ext','=',video.ext], - // ] - // }); - } + // const moovExists = await hasMoovAtom(videoPath); + // if (moovExists) { + // s.debugLog('The file already has a moov atom.'); + // } else { + // return true; + // // const { videoCodec, audioCodec } = getVideoCodecsFromMonitorConfig(video); + // // const tempPath = path.join(s.getVideoDirectory(video), `TEMP_${s.formattedTime(video.time)}.${video.ext}`); + // // await addMoovAtom(videoPath, tempPath, videoCodec, audioCodec); + // // await moveFile(tempPath, videoPath) + // // const newFileSize = (await fsP.stat(videoPath)).size; + // // const updateResponse = await s.knexQueryPromise({ + // // action: "update", + // // table: "Videos", + // // update: { + // // size: newFileSize + // // }, + // // where: [ + // // ['ke','=',video.ke], + // // ['mid','=',video.mid], + // // ['time','=',video.time], + // // ['end','=',video.end], + // // ['ext','=',video.ext], + // // ] + // // }); + // } // await saveVideoFrameToTimelapse(video, 0) await saveVideoFrameToTimelapse(video, 7) return true;