You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
AssertionError [ERR_ASSERTION]: cutFrom must be lower than cutTo
at pMap.concurrency (file:///C:/inetpub/wwwroot/tiktok-autocontent/src/node_modules/editly/parseConfig.js:150:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///C:/inetpub/wwwroot/tiktok-autocontent/src/node_modules/p-map/index.js:141:20 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
I guess the main problem is
AssertionError [ERR_ASSERTION]: cutFrom must be lower than cutTo
I think it's important to note that I'm iterating over the below described rendering process multiple times, and this problem doesn't always occur. It's also not related to the input videos im using, because, as said, the error comes up at seamingly random times.
All sorts of help are highly appreciated!
Thanks in advance :)
Code (snippet)
exportasyncfunctionrender(selectedFiller,contentVideoFile,editSpec,dirs,index,inFiles){awaitgetVideoDurationInSeconds(String(dirs.media.in.content)+"/"+contentVideoFile).then(async(durationContent)=>{awaitgetVideoDurationInSeconds(String(dirs.media.in.fillers)+"/"+selectedFiller).then(async(durationFiller)=>{editSpec.clips[0].layers[0].cutFrom=Math.floor(Math.random()*(durationFiller-durationContent));editSpec.outPath=dirs.media.out+"/"+Math.floor(Math.random()*(9999-1000)+1000)+"-out-"+index+"-"+Date.now()+"-"+contentVideoFile.replace(//g,'');editSpec.clips[0].duration=durationContent;editSpec.clips[0].layers[1].path=String(dirs.media.in.content)+"/"+contentVideoFile;editSpec.clips[0].layers[0].path=String(dirs.media.in.fillers)+"/"+inFiles.fillers[Math.floor(Math.random()*(inFiles.fillers.length-1))];editSpec.clips[0].layers[0].cutTo=Math.round(editSpec.clips[0].layers[0].cutFrom+durationContent);log("Content length is: "+durationContent+"s","info",true);log("Background length is: "+durationFiller+"s","info",true);log("Using filler time frame (cutFrom) "+editSpec.clips[0].layers[0].cutFrom+" - (cutTo) "+editSpec.clips[0].layers[0].cutTo,"info",true);// DEBUGGING sanity checkif(editSpec.clips[0].layers[0].cutFrom<editSpec.clips[0].layers[0].cutTo){log("Cut check success","success");}else{log("Cut check failed","error");}// Renderawaiteditly(editSpec);});});returntrue;}
In order to ensure that cutTo is in fact larger than cutFrom, I've implented a simple sanity check, as you can see in the code sample above. Also, I'm logging both cutTo and cutFrom. This is the result (example):
[ 21:31:10 | inf ] > Working on content video #9: *******.mp4
[ 21:31:10 | inf ] > Randomly selected filler background video: *******.mp4
[ 21:31:10 | inf ] > Content length is: 21.554867s
[ 21:31:10 | inf ] > Background length is: 3626.533s
[ 21:31:10 | inf ] > Using filler time frame (cutFrom) 3586 - (cutTo) 3608
[ 21:31:10 | suc ] > Cut check success
As you can see, cutFromdefinetly is smaller than cutTo. Im clueless.
Description
I'm getting the following error message:
I guess the main problem is
AssertionError [ERR_ASSERTION]: cutFrom must be lower than cutTo
I think it's important to note that I'm iterating over the below described rendering process multiple times, and this problem doesn't always occur. It's also not related to the input videos im using, because, as said, the error comes up at seamingly random times.
All sorts of help are highly appreciated!
Thanks in advance :)
Code (snippet)
Note: 'getVideoDurationInSeconds()' comes from caffco/get-video-duration
EditSpec
Troubleshooting
In order to ensure that
cutTo
is in fact larger thancutFrom
, I've implented a simple sanity check, as you can see in the code sample above. Also, I'm logging bothcutTo
andcutFrom
. This is the result (example):As you can see,
cutFrom
definetly is smaller thancutTo
. Im clueless.Versions
Editly 0.14.2, 0.13.0, 0.12.0
Node v18.18.2
ffmpeg 6.1
ffprobe 6.1
The text was updated successfully, but these errors were encountered: