mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-08-17 09:20:26 +03:00
#5618 - added configuration fields for Thumbnails and Previews, if no config is provided, the previous, default values are configured
This commit is contained in:
parent
5e01c9c9a7
commit
3fbe849183
@ -469,6 +469,16 @@ thumbnails:
|
||||
# Increasing this value will increase CPU and memory usage when generating the thumbnail, especially for high video resolution
|
||||
# Minimum value is 2
|
||||
frames_to_analyze: 50
|
||||
size:
|
||||
width: 280
|
||||
height: 157
|
||||
min_width: 150
|
||||
|
||||
previews:
|
||||
size:
|
||||
width: 850
|
||||
height: 480
|
||||
min_width: 400
|
||||
|
||||
stats:
|
||||
# Display registration requests stats (average response time, total requests...)
|
||||
|
@ -371,6 +371,18 @@ const CONFIG = {
|
||||
THUMBNAILS: {
|
||||
GENERATION_FROM_VIDEO: {
|
||||
FRAMES_TO_ANALYZE: config.get<number>('thumbnails.generation_from_video.frames_to_analyze')
|
||||
},
|
||||
SIZE: {
|
||||
WIDTH: config.get<number>('thumbnails.size.width'),
|
||||
HEIGHT: config.get<number>('thumbnails.size.height'),
|
||||
MIN_WIDTH: config.get<number>('thumbnails.size.min_width'),
|
||||
}
|
||||
},
|
||||
PREVIEWS: {
|
||||
SIZE: {
|
||||
WIDTH: config.get<number>('previews.size.width'),
|
||||
HEIGHT: config.get<number>('previews.size.height'),
|
||||
MIN_WIDTH: config.get<number>('previews.size.min_width'),
|
||||
}
|
||||
},
|
||||
STATS: {
|
||||
|
@ -903,14 +903,14 @@ const STATIC_MAX_AGE = {
|
||||
|
||||
// Videos thumbnail size
|
||||
const THUMBNAILS_SIZE = {
|
||||
width: 280,
|
||||
height: 157,
|
||||
minWidth: 150
|
||||
width: CONFIG.THUMBNAILS.SIZE.WIDTH || 280,
|
||||
height: CONFIG.THUMBNAILS.SIZE.HEIGHT || 157,
|
||||
minWidth: CONFIG.THUMBNAILS.SIZE.MIN_WIDTH || 150
|
||||
}
|
||||
const PREVIEWS_SIZE = {
|
||||
width: 850,
|
||||
height: 480,
|
||||
minWidth: 400
|
||||
width: CONFIG.PREVIEWS.SIZE.WIDTH || 850,
|
||||
height: CONFIG.PREVIEWS.SIZE.HEIGHT || 480,
|
||||
minWidth: CONFIG.PREVIEWS.SIZE.MIN_WIDTH || 400
|
||||
}
|
||||
const ACTOR_IMAGES_SIZE: { [key in ActorImageType_Type]: { width: number, height: number }[] } = {
|
||||
[ActorImageType.AVATAR]: [ // 1/1 ratio
|
||||
|
Loading…
Reference in New Issue
Block a user