mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
feat: configure timemark for video thumbnails
This commit is contained in:
parent
2952765513
commit
32efacd411
@ -594,7 +594,10 @@ module.exports = {
|
||||
video: true,
|
||||
// Placeholder defaults to 'public/images/unavailable.png'.
|
||||
placeholder: null,
|
||||
size: 200
|
||||
size: 200,
|
||||
// https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/tree/v2.1.2#screenshotsoptions-dirname-generate-thumbnails
|
||||
// Only accepts a single value. Defaults to 20%.
|
||||
videoTimemark: '20%'
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -524,7 +524,9 @@ self.generateThumbs = async (name, extname, force) => {
|
||||
.screenshots({
|
||||
folder: paths.thumbs,
|
||||
filename: name.slice(0, -extname.length) + '.png',
|
||||
timestamps: ['20%'],
|
||||
timemarks: [
|
||||
config.uploads.generateThumbs.videoTimemark || '20%'
|
||||
],
|
||||
size: videoStream.width >= videoStream.height
|
||||
? `${self.thumbsSize}x?`
|
||||
: `?x${self.thumbsSize}`
|
||||
|
Loading…
Reference in New Issue
Block a user