aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-29 16:41:29 +0200
committerChocobozzz <me@florianbigard.com>2018-06-29 17:10:54 +0200
commit3a6f351b255d21ec42578632600ba699885f350e (patch)
treefdc770f5f59a87a929a5c85da9aed783e9676097 /server/initializers
parent34b19192901b0f872c72ce8d94a69aeba51d1c29 (diff)
downloadPeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.gz
PeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.zst
PeerTube-3a6f351b255d21ec42578632600ba699885f350e.zip
Handle higher FPS for high resolution (test)
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.ts6
-rw-r--r--server/initializers/migrations/0225-video-fps.ts22
2 files changed, 26 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 67df3df80..24b7e2655 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -14,7 +14,7 @@ let config: IConfig = require('config')
14 14
15// --------------------------------------------------------------------------- 15// ---------------------------------------------------------------------------
16 16
17const LAST_MIGRATION_VERSION = 220 17const LAST_MIGRATION_VERSION = 225
18 18
19// --------------------------------------------------------------------------- 19// ---------------------------------------------------------------------------
20 20
@@ -282,7 +282,9 @@ const RATES_LIMIT = {
282let VIDEO_VIEW_LIFETIME = 60000 * 60 // 1 hour 282let VIDEO_VIEW_LIFETIME = 60000 * 60 // 1 hour
283const VIDEO_TRANSCODING_FPS = { 283const VIDEO_TRANSCODING_FPS = {
284 MIN: 10, 284 MIN: 10,
285 MAX: 30 285 AVERAGE: 30,
286 MAX: 60,
287 KEEP_ORIGIN_FPS_RESOLUTION_MIN: 720 // We keep the original FPS on high resolutions (720 minimum)
286} 288}
287 289
288const VIDEO_RATE_TYPES: { [ id: string ]: VideoRateType } = { 290const VIDEO_RATE_TYPES: { [ id: string ]: VideoRateType } = {
diff --git a/server/initializers/migrations/0225-video-fps.ts b/server/initializers/migrations/0225-video-fps.ts
new file mode 100644
index 000000000..733676845
--- /dev/null
+++ b/server/initializers/migrations/0225-video-fps.ts
@@ -0,0 +1,22 @@
1import * as Sequelize from 'sequelize'
2
3async function up (utils: {
4 transaction: Sequelize.Transaction
5 queryInterface: Sequelize.QueryInterface
6 sequelize: Sequelize.Sequelize
7}): Promise<void> {
8 {
9 const data = {
10 type: Sequelize.INTEGER,
11 allowNull: true,
12 defaultValue: null
13 }
14 await utils.queryInterface.addColumn('videoFile', 'fps', data)
15 }
16}
17
18function down (options) {
19 throw new Error('Not implemented.')
20}
21
22export { up, down }