aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-26 11:29:50 +0100
committerChocobozzz <me@florianbigard.com>2020-11-26 11:30:18 +0100
commit884d2c39ae23b44d0d037aaff0f66ad9ae0807ba (patch)
tree1e06fa6954a987b08894c574e31db7e8c106bafe /server/tests/api
parent0151c41c65e0e3e94288314afe295358b9d698f7 (diff)
downloadPeerTube-884d2c39ae23b44d0d037aaff0f66ad9ae0807ba.tar.gz
PeerTube-884d2c39ae23b44d0d037aaff0f66ad9ae0807ba.tar.zst
PeerTube-884d2c39ae23b44d0d037aaff0f66ad9ae0807ba.zip
Fix live FPS limit
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/live/live.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts
index 0786db554..4f84882ff 100644
--- a/server/tests/api/live/live.ts
+++ b/server/tests/api/live/live.ts
@@ -416,7 +416,7 @@ describe('Test live', function () {
416 await waitJobs(servers) 416 await waitJobs(servers)
417 417
418 const bitrateLimits = { 418 const bitrateLimits = {
419 720: 3000 * 1000, 419 720: 4000 * 1000, // 60FPS
420 360: 1100 * 1000, 420 360: 1100 * 1000,
421 240: 600 * 1000 421 240: 600 * 1000
422 } 422 }
@@ -436,9 +436,14 @@ describe('Test live', function () {
436 const file = hlsPlaylist.files.find(f => f.resolution.id === resolution) 436 const file = hlsPlaylist.files.find(f => f.resolution.id === resolution)
437 437
438 expect(file).to.exist 438 expect(file).to.exist
439 expect(file.fps).to.be.approximately(30, 5)
440 expect(file.size).to.be.greaterThan(1) 439 expect(file.size).to.be.greaterThan(1)
441 440
441 if (resolution >= 720) {
442 expect(file.fps).to.be.approximately(60, 2)
443 } else {
444 expect(file.fps).to.be.approximately(30, 2)
445 }
446
442 const filename = `${video.uuid}-${resolution}-fragmented.mp4` 447 const filename = `${video.uuid}-${resolution}-fragmented.mp4`
443 const segmentPath = buildServerDirectory(servers[0], join('streaming-playlists', 'hls', video.uuid, filename)) 448 const segmentPath = buildServerDirectory(servers[0], join('streaming-playlists', 'hls', video.uuid, filename))
444 449