diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-24 18:02:04 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-01-13 09:14:09 +0100 |
commit | b7085c713220c9c5a96c9bb77330c2ba6ae9274e (patch) | |
tree | a2cefbd1742d5f2ba48f76759f3450171dc224f8 /server | |
parent | 7185dab3ff509cec9f03a15d826625b5a1bd0ada (diff) | |
download | PeerTube-b7085c713220c9c5a96c9bb77330c2ba6ae9274e.tar.gz PeerTube-b7085c713220c9c5a96c9bb77330c2ba6ae9274e.tar.zst PeerTube-b7085c713220c9c5a96c9bb77330c2ba6ae9274e.zip |
add support for 1440p (Quad HD/QHD/WQHD) videos
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/config.ts | 2 | ||||
-rw-r--r-- | server/helpers/ffprobe-utils.ts | 1 | ||||
-rw-r--r-- | server/initializers/checker-before-init.ts | 5 | ||||
-rw-r--r-- | server/initializers/config.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/config.ts | 2 | ||||
-rw-r--r-- | server/tests/api/check-params/config.ts | 2 | ||||
-rw-r--r-- | server/tests/api/live/live-constraints.ts | 1 | ||||
-rw-r--r-- | server/tests/api/live/live-permanent.ts | 2 | ||||
-rw-r--r-- | server/tests/api/live/live-save-replay.ts | 1 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/stats.ts | 1 | ||||
-rw-r--r-- | server/tests/api/videos/audio-only.ts | 1 | ||||
-rw-r--r-- | server/tests/api/videos/video-hls.ts | 1 | ||||
-rw-r--r-- | server/tests/cli/create-transcoding-job.ts | 1 |
14 files changed, 24 insertions, 2 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index 2401e2ff4..8bc3123bf 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts | |||
@@ -423,6 +423,7 @@ function customConfig (): CustomConfig { | |||
423 | '480p': CONFIG.TRANSCODING.RESOLUTIONS['480p'], | 423 | '480p': CONFIG.TRANSCODING.RESOLUTIONS['480p'], |
424 | '720p': CONFIG.TRANSCODING.RESOLUTIONS['720p'], | 424 | '720p': CONFIG.TRANSCODING.RESOLUTIONS['720p'], |
425 | '1080p': CONFIG.TRANSCODING.RESOLUTIONS['1080p'], | 425 | '1080p': CONFIG.TRANSCODING.RESOLUTIONS['1080p'], |
426 | '1440p': CONFIG.TRANSCODING.RESOLUTIONS['1440p'], | ||
426 | '2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p'] | 427 | '2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p'] |
427 | }, | 428 | }, |
428 | webtorrent: { | 429 | webtorrent: { |
@@ -447,6 +448,7 @@ function customConfig (): CustomConfig { | |||
447 | '480p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['480p'], | 448 | '480p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['480p'], |
448 | '720p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['720p'], | 449 | '720p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['720p'], |
449 | '1080p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1080p'], | 450 | '1080p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1080p'], |
451 | '1440p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1440p'], | ||
450 | '2160p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['2160p'] | 452 | '2160p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['2160p'] |
451 | } | 453 | } |
452 | } | 454 | } |
diff --git a/server/helpers/ffprobe-utils.ts b/server/helpers/ffprobe-utils.ts index 4dea6283c..adb459ed3 100644 --- a/server/helpers/ffprobe-utils.ts +++ b/server/helpers/ffprobe-utils.ts | |||
@@ -188,6 +188,7 @@ function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod' | |||
188 | VideoResolution.H_720P, | 188 | VideoResolution.H_720P, |
189 | VideoResolution.H_240P, | 189 | VideoResolution.H_240P, |
190 | VideoResolution.H_1080P, | 190 | VideoResolution.H_1080P, |
191 | VideoResolution.H_1440P, | ||
191 | VideoResolution.H_4K | 192 | VideoResolution.H_4K |
192 | ] | 193 | ] |
193 | 194 | ||
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 765ef157e..7945e8586 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -23,7 +23,7 @@ function checkMissedConfig () { | |||
23 | 'redundancy.videos.strategies', 'redundancy.videos.check_interval', | 23 | 'redundancy.videos.strategies', 'redundancy.videos.check_interval', |
24 | 'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled', | 24 | 'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled', |
25 | 'transcoding.resolutions.0p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 'transcoding.resolutions.480p', | 25 | 'transcoding.resolutions.0p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 'transcoding.resolutions.480p', |
26 | 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.2160p', | 26 | 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p', 'transcoding.resolutions.2160p', |
27 | 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'auto_blacklist.videos.of_users.enabled', | 27 | 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'auto_blacklist.videos.of_users.enabled', |
28 | 'trending.videos.interval_days', | 28 | 'trending.videos.interval_days', |
29 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', | 29 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', |
@@ -41,7 +41,8 @@ function checkMissedConfig () { | |||
41 | 'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives', | 41 | 'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives', |
42 | 'live.transcoding.enabled', 'live.transcoding.threads', | 42 | 'live.transcoding.enabled', 'live.transcoding.threads', |
43 | 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p', 'live.transcoding.resolutions.480p', | 43 | 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p', 'live.transcoding.resolutions.480p', |
44 | 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p', 'live.transcoding.resolutions.2160p' | 44 | 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p', 'live.transcoding.resolutions.1440p', |
45 | 'live.transcoding.resolutions.2160p' | ||
45 | ] | 46 | ] |
46 | 47 | ||
47 | const requiredAlternatives = [ | 48 | const requiredAlternatives = [ |
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 705223b0a..0f58dc1d4 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -189,6 +189,7 @@ const CONFIG = { | |||
189 | get '480p' () { return config.get<boolean>('transcoding.resolutions.480p') }, | 189 | get '480p' () { return config.get<boolean>('transcoding.resolutions.480p') }, |
190 | get '720p' () { return config.get<boolean>('transcoding.resolutions.720p') }, | 190 | get '720p' () { return config.get<boolean>('transcoding.resolutions.720p') }, |
191 | get '1080p' () { return config.get<boolean>('transcoding.resolutions.1080p') }, | 191 | get '1080p' () { return config.get<boolean>('transcoding.resolutions.1080p') }, |
192 | get '1440p' () { return config.get<boolean>('transcoding.resolutions.1440p') }, | ||
192 | get '2160p' () { return config.get<boolean>('transcoding.resolutions.2160p') } | 193 | get '2160p' () { return config.get<boolean>('transcoding.resolutions.2160p') } |
193 | }, | 194 | }, |
194 | HLS: { | 195 | HLS: { |
@@ -221,6 +222,7 @@ const CONFIG = { | |||
221 | get '480p' () { return config.get<boolean>('live.transcoding.resolutions.480p') }, | 222 | get '480p' () { return config.get<boolean>('live.transcoding.resolutions.480p') }, |
222 | get '720p' () { return config.get<boolean>('live.transcoding.resolutions.720p') }, | 223 | get '720p' () { return config.get<boolean>('live.transcoding.resolutions.720p') }, |
223 | get '1080p' () { return config.get<boolean>('live.transcoding.resolutions.1080p') }, | 224 | get '1080p' () { return config.get<boolean>('live.transcoding.resolutions.1080p') }, |
225 | get '1440p' () { return config.get<boolean>('live.transcoding.resolutions.1440p') }, | ||
224 | get '2160p' () { return config.get<boolean>('live.transcoding.resolutions.2160p') } | 226 | get '2160p' () { return config.get<boolean>('live.transcoding.resolutions.2160p') } |
225 | } | 227 | } |
226 | } | 228 | } |
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts index 9c1cfa7e7..faabf17d7 100644 --- a/server/middlewares/validators/config.ts +++ b/server/middlewares/validators/config.ts | |||
@@ -45,6 +45,7 @@ const customConfigUpdateValidator = [ | |||
45 | body('transcoding.resolutions.480p').isBoolean().withMessage('Should have a valid transcoding 480p resolution enabled boolean'), | 45 | body('transcoding.resolutions.480p').isBoolean().withMessage('Should have a valid transcoding 480p resolution enabled boolean'), |
46 | body('transcoding.resolutions.720p').isBoolean().withMessage('Should have a valid transcoding 720p resolution enabled boolean'), | 46 | body('transcoding.resolutions.720p').isBoolean().withMessage('Should have a valid transcoding 720p resolution enabled boolean'), |
47 | body('transcoding.resolutions.1080p').isBoolean().withMessage('Should have a valid transcoding 1080p resolution enabled boolean'), | 47 | body('transcoding.resolutions.1080p').isBoolean().withMessage('Should have a valid transcoding 1080p resolution enabled boolean'), |
48 | body('transcoding.resolutions.1440p').isBoolean().withMessage('Should have a valid transcoding 1440p resolution enabled boolean'), | ||
48 | body('transcoding.resolutions.2160p').isBoolean().withMessage('Should have a valid transcoding 2160p resolution enabled boolean'), | 49 | body('transcoding.resolutions.2160p').isBoolean().withMessage('Should have a valid transcoding 2160p resolution enabled boolean'), |
49 | 50 | ||
50 | body('transcoding.webtorrent.enabled').isBoolean().withMessage('Should have a valid webtorrent transcoding enabled boolean'), | 51 | body('transcoding.webtorrent.enabled').isBoolean().withMessage('Should have a valid webtorrent transcoding enabled boolean'), |
@@ -75,6 +76,7 @@ const customConfigUpdateValidator = [ | |||
75 | body('live.transcoding.resolutions.480p').isBoolean().withMessage('Should have a valid transcoding 480p resolution enabled boolean'), | 76 | body('live.transcoding.resolutions.480p').isBoolean().withMessage('Should have a valid transcoding 480p resolution enabled boolean'), |
76 | body('live.transcoding.resolutions.720p').isBoolean().withMessage('Should have a valid transcoding 720p resolution enabled boolean'), | 77 | body('live.transcoding.resolutions.720p').isBoolean().withMessage('Should have a valid transcoding 720p resolution enabled boolean'), |
77 | body('live.transcoding.resolutions.1080p').isBoolean().withMessage('Should have a valid transcoding 1080p resolution enabled boolean'), | 78 | body('live.transcoding.resolutions.1080p').isBoolean().withMessage('Should have a valid transcoding 1080p resolution enabled boolean'), |
79 | body('live.transcoding.resolutions.1440p').isBoolean().withMessage('Should have a valid transcoding 1440p resolution enabled boolean'), | ||
78 | body('live.transcoding.resolutions.2160p').isBoolean().withMessage('Should have a valid transcoding 2160p resolution enabled boolean'), | 80 | body('live.transcoding.resolutions.2160p').isBoolean().withMessage('Should have a valid transcoding 2160p resolution enabled boolean'), |
79 | 81 | ||
80 | body('search.remoteUri.users').isBoolean().withMessage('Should have a remote URI search for users boolean'), | 82 | body('search.remoteUri.users').isBoolean().withMessage('Should have a remote URI search for users boolean'), |
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index fab440fc5..e36cdeab2 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -92,6 +92,7 @@ describe('Test config API validators', function () { | |||
92 | '480p': true, | 92 | '480p': true, |
93 | '720p': false, | 93 | '720p': false, |
94 | '1080p': false, | 94 | '1080p': false, |
95 | '1440p': false, | ||
95 | '2160p': false | 96 | '2160p': false |
96 | }, | 97 | }, |
97 | webtorrent: { | 98 | webtorrent: { |
@@ -118,6 +119,7 @@ describe('Test config API validators', function () { | |||
118 | '480p': true, | 119 | '480p': true, |
119 | '720p': true, | 120 | '720p': true, |
120 | '1080p': true, | 121 | '1080p': true, |
122 | '1440p': true, | ||
121 | '2160p': true | 123 | '2160p': true |
122 | } | 124 | } |
123 | } | 125 | } |
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts index 257673b66..1c60a7c76 100644 --- a/server/tests/api/live/live-constraints.ts +++ b/server/tests/api/live/live-constraints.ts | |||
@@ -179,6 +179,7 @@ describe('Test live constraints', function () { | |||
179 | '480p': true, | 179 | '480p': true, |
180 | '720p': true, | 180 | '720p': true, |
181 | '1080p': true, | 181 | '1080p': true, |
182 | '1440p': true, | ||
182 | '2160p': true | 183 | '2160p': true |
183 | } | 184 | } |
184 | } | 185 | } |
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts index 1128e993c..a5bda009f 100644 --- a/server/tests/api/live/live-permanent.ts +++ b/server/tests/api/live/live-permanent.ts | |||
@@ -75,6 +75,7 @@ describe('Permenant live', function () { | |||
75 | '480p': true, | 75 | '480p': true, |
76 | '720p': true, | 76 | '720p': true, |
77 | '1080p': true, | 77 | '1080p': true, |
78 | '1440p': true, | ||
78 | '2160p': true | 79 | '2160p': true |
79 | } | 80 | } |
80 | } | 81 | } |
@@ -164,6 +165,7 @@ describe('Permenant live', function () { | |||
164 | '480p': false, | 165 | '480p': false, |
165 | '720p': false, | 166 | '720p': false, |
166 | '1080p': false, | 167 | '1080p': false, |
168 | '1440p': false, | ||
167 | '2160p': false | 169 | '2160p': false |
168 | } | 170 | } |
169 | } | 171 | } |
diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts index 35fe4e7bd..757e11845 100644 --- a/server/tests/api/live/live-save-replay.ts +++ b/server/tests/api/live/live-save-replay.ts | |||
@@ -99,6 +99,7 @@ describe('Save replay setting', function () { | |||
99 | '480p': true, | 99 | '480p': true, |
100 | '720p': true, | 100 | '720p': true, |
101 | '1080p': true, | 101 | '1080p': true, |
102 | '1440p': true, | ||
102 | '2160p': true | 103 | '2160p': true |
103 | } | 104 | } |
104 | } | 105 | } |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index bfaad3688..af25f4800 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -75,6 +75,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { | |||
75 | expect(data.transcoding.resolutions['480p']).to.be.true | 75 | expect(data.transcoding.resolutions['480p']).to.be.true |
76 | expect(data.transcoding.resolutions['720p']).to.be.true | 76 | expect(data.transcoding.resolutions['720p']).to.be.true |
77 | expect(data.transcoding.resolutions['1080p']).to.be.true | 77 | expect(data.transcoding.resolutions['1080p']).to.be.true |
78 | expect(data.transcoding.resolutions['1440p']).to.be.true | ||
78 | expect(data.transcoding.resolutions['2160p']).to.be.true | 79 | expect(data.transcoding.resolutions['2160p']).to.be.true |
79 | expect(data.transcoding.webtorrent.enabled).to.be.true | 80 | expect(data.transcoding.webtorrent.enabled).to.be.true |
80 | expect(data.transcoding.hls.enabled).to.be.true | 81 | expect(data.transcoding.hls.enabled).to.be.true |
@@ -91,6 +92,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { | |||
91 | expect(data.live.transcoding.resolutions['480p']).to.be.false | 92 | expect(data.live.transcoding.resolutions['480p']).to.be.false |
92 | expect(data.live.transcoding.resolutions['720p']).to.be.false | 93 | expect(data.live.transcoding.resolutions['720p']).to.be.false |
93 | expect(data.live.transcoding.resolutions['1080p']).to.be.false | 94 | expect(data.live.transcoding.resolutions['1080p']).to.be.false |
95 | expect(data.live.transcoding.resolutions['1440p']).to.be.false | ||
94 | expect(data.live.transcoding.resolutions['2160p']).to.be.false | 96 | expect(data.live.transcoding.resolutions['2160p']).to.be.false |
95 | 97 | ||
96 | expect(data.import.videos.http.enabled).to.be.true | 98 | expect(data.import.videos.http.enabled).to.be.true |
@@ -322,6 +324,7 @@ describe('Test config', function () { | |||
322 | '480p': true, | 324 | '480p': true, |
323 | '720p': false, | 325 | '720p': false, |
324 | '1080p': false, | 326 | '1080p': false, |
327 | '1440p': false, | ||
325 | '2160p': false | 328 | '2160p': false |
326 | }, | 329 | }, |
327 | webtorrent: { | 330 | webtorrent: { |
@@ -346,6 +349,7 @@ describe('Test config', function () { | |||
346 | '480p': true, | 349 | '480p': true, |
347 | '720p': true, | 350 | '720p': true, |
348 | '1080p': true, | 351 | '1080p': true, |
352 | '1440p': true, | ||
349 | '2160p': true | 353 | '2160p': true |
350 | } | 354 | } |
351 | } | 355 | } |
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts index 6fbf32186..82065e770 100644 --- a/server/tests/api/server/stats.ts +++ b/server/tests/api/server/stats.ts | |||
@@ -153,6 +153,7 @@ describe('Test stats (excluding redundancy)', function () { | |||
153 | '480p': false, | 153 | '480p': false, |
154 | '720p': false, | 154 | '720p': false, |
155 | '1080p': false, | 155 | '1080p': false, |
156 | '1440p': false, | ||
156 | '2160p': false | 157 | '2160p': false |
157 | } | 158 | } |
158 | } | 159 | } |
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts index 294a00112..7ddbd5cd9 100644 --- a/server/tests/api/videos/audio-only.ts +++ b/server/tests/api/videos/audio-only.ts | |||
@@ -36,6 +36,7 @@ describe('Test audio only video transcoding', function () { | |||
36 | '480p': false, | 36 | '480p': false, |
37 | '720p': false, | 37 | '720p': false, |
38 | '1080p': false, | 38 | '1080p': false, |
39 | '1440p': false, | ||
39 | '2160p': false | 40 | '2160p': false |
40 | }, | 41 | }, |
41 | hls: { | 42 | hls: { |
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts index f3dbbb114..d1720d0d9 100644 --- a/server/tests/api/videos/video-hls.ts +++ b/server/tests/api/videos/video-hls.ts | |||
@@ -202,6 +202,7 @@ describe('Test HLS videos', function () { | |||
202 | '480p': true, | 202 | '480p': true, |
203 | '720p': true, | 203 | '720p': true, |
204 | '1080p': true, | 204 | '1080p': true, |
205 | '1440p': true, | ||
205 | '2160p': true | 206 | '2160p': true |
206 | }, | 207 | }, |
207 | hls: { | 208 | hls: { |
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts index 997a9a1fd..5bc1687cd 100644 --- a/server/tests/cli/create-transcoding-job.ts +++ b/server/tests/cli/create-transcoding-job.ts | |||
@@ -33,6 +33,7 @@ describe('Test create transcoding jobs', function () { | |||
33 | '480p': true, | 33 | '480p': true, |
34 | '720p': true, | 34 | '720p': true, |
35 | '1080p': true, | 35 | '1080p': true, |
36 | '1440p': true, | ||
36 | '2160p': true | 37 | '2160p': true |
37 | }, | 38 | }, |
38 | hls: { | 39 | hls: { |