mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 07:11: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,
|
video: true,
|
||||||
// Placeholder defaults to 'public/images/unavailable.png'.
|
// Placeholder defaults to 'public/images/unavailable.png'.
|
||||||
placeholder: null,
|
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({
|
.screenshots({
|
||||||
folder: paths.thumbs,
|
folder: paths.thumbs,
|
||||||
filename: name.slice(0, -extname.length) + '.png',
|
filename: name.slice(0, -extname.length) + '.png',
|
||||||
timestamps: ['20%'],
|
timemarks: [
|
||||||
|
config.uploads.generateThumbs.videoTimemark || '20%'
|
||||||
|
],
|
||||||
size: videoStream.width >= videoStream.height
|
size: videoStream.width >= videoStream.height
|
||||||
? `${self.thumbsSize}x?`
|
? `${self.thumbsSize}x?`
|
||||||
: `?x${self.thumbsSize}`
|
: `?x${self.thumbsSize}`
|
||||||
|
Loading…
Reference in New Issue
Block a user