1
0
Fork 0
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:
Chocobozzz 2023-06-02 15:18:39 +02:00
parent d8f39b126d
commit 9c5cc50133
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 247 additions and 2 deletions

View file

@ -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({