X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=6c44d703e78813510ea410ccd596b540f2cc4c73;hb=f64615efa6929c7b8d4e8750a861caf009614a1f;hp=02e42a59436e5d503f85581f2d9bd1d2d320106b;hpb=501af82d999a79e277f87794f6296d0e3495775c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 02e42a594..6c44d703e 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -24,7 +24,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 550 +const LAST_MIGRATION_VERSION = 560 // --------------------------------------------------------------------------- @@ -63,7 +63,10 @@ const SORTABLE_COLUMNS = { JOBS: [ 'createdAt' ], VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ], VIDEO_IMPORTS: [ 'createdAt' ], + VIDEO_COMMENT_THREADS: [ 'createdAt', 'totalReplies' ], + VIDEO_COMMENTS: [ 'createdAt' ], + VIDEO_RATES: [ 'createdAt' ], BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ], FOLLOWERS: [ 'createdAt', 'state', 'score' ], @@ -288,7 +291,7 @@ const CONSTRAINTS_FIELDS = { PRIVATE_KEY: { min: 10, max: 5000 }, // Length URL: { min: 3, max: 2000 }, // Length AVATAR: { - EXTNAME: [ '.png', '.jpeg', '.jpg' ], + EXTNAME: [ '.png', '.jpeg', '.jpg', '.gif' ], FILE_SIZE: { max: 2 * 1024 * 1024 // 2MB } @@ -333,6 +336,17 @@ const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { KEEP_ORIGIN_FPS_RESOLUTION_MIN: 720 // We keep the original FPS on high resolutions (720 minimum) } +const VIDEO_TRANSCODING_ENCODERS = { + VIDEO: [ 'libx264' ], + + // Try the first one, if not available try the second one etc + AUDIO: [ + // we favor VBR, if a good AAC encoder is available + 'libfdk_aac', + 'aac' + ] +} + const DEFAULT_AUDIO_RESOLUTION = VideoResolution.H_480P const VIDEO_RATE_TYPES: { [ id: string ]: VideoRateType } = { @@ -620,7 +634,7 @@ const VIDEO_LIVE = { CLEANUP_DELAY: 1000 * 60 * 5, // 5 minutes SEGMENT_TIME_SECONDS: 4, // 4 seconds SEGMENTS_LIST_SIZE: 15, // 15 maximum segments in live playlist - EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION: 3, + EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION: 4, RTMP: { CHUNK_SIZE: 60000, GOP_CACHE: true, @@ -801,6 +815,7 @@ export { ACTOR_FOLLOW_SCORE, PREVIEWS_SIZE, REMOTE_SCHEME, + VIDEO_TRANSCODING_ENCODERS, FOLLOW_STATES, DEFAULT_USER_THEME_NAME, SERVER_ACTOR_NAME,