mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add script to generate storyboards
This commit is contained in:
parent
d8f39b126d
commit
9c5cc50133
7 changed files with 247 additions and 2 deletions
|
@ -43,6 +43,11 @@ async function processGenerateStoryboard (job: Job): Promise<void> {
|
|||
const destination = join(CONFIG.STORAGE.STORYBOARDS_DIR, filename)
|
||||
|
||||
const totalSprites = buildTotalSprites(video)
|
||||
if (totalSprites === 0) {
|
||||
logger.info('Do not generate a storyboard of %s because the video is not long enough', payload.videoUUID, lTags)
|
||||
return
|
||||
}
|
||||
|
||||
const spriteDuration = Math.round(video.duration / totalSprites)
|
||||
|
||||
const spritesCount = findGridSize({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue