diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-24 16:29:39 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 10:07:51 +0100 |
commit | 6b67897e2eab96978daee40aeaf716835856d65d (patch) | |
tree | 2a203bf589599061a62c4e42b0e580a1c61b47ee /server/tests/api/live | |
parent | 33ff70baa64c6315856066682595878a27b7ed8c (diff) | |
download | PeerTube-6b67897e2eab96978daee40aeaf716835856d65d.tar.gz PeerTube-6b67897e2eab96978daee40aeaf716835856d65d.tar.zst PeerTube-6b67897e2eab96978daee40aeaf716835856d65d.zip |
Add transcoding module comments
Diffstat (limited to 'server/tests/api/live')
-rw-r--r-- | server/tests/api/live/live.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index e685be08e..0786db554 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts | |||
@@ -39,6 +39,7 @@ import { | |||
39 | viewVideo, | 39 | viewVideo, |
40 | wait, | 40 | wait, |
41 | waitJobs, | 41 | waitJobs, |
42 | waitUntilLivePublished, | ||
42 | waitUntilLiveStarts, | 43 | waitUntilLiveStarts, |
43 | waitUntilLog | 44 | waitUntilLog |
44 | } from '../../../../shared/extra-utils' | 45 | } from '../../../../shared/extra-utils' |
@@ -396,7 +397,7 @@ describe('Test live', function () { | |||
396 | }) | 397 | }) |
397 | 398 | ||
398 | it('Should enable transcoding with some resolutions and correctly save them', async function () { | 399 | it('Should enable transcoding with some resolutions and correctly save them', async function () { |
399 | this.timeout(60000) | 400 | this.timeout(120000) |
400 | 401 | ||
401 | const resolutions = [ 240, 360, 720 ] | 402 | const resolutions = [ 240, 360, 720 ] |
402 | 403 | ||
@@ -410,13 +411,14 @@ describe('Test live', function () { | |||
410 | await testVideoResolutions(liveVideoId, resolutions) | 411 | await testVideoResolutions(liveVideoId, resolutions) |
411 | 412 | ||
412 | await stopFfmpeg(command) | 413 | await stopFfmpeg(command) |
414 | await waitUntilLivePublished(servers[0].url, servers[0].accessToken, liveVideoId) | ||
413 | 415 | ||
414 | await waitJobs(servers) | 416 | await waitJobs(servers) |
415 | 417 | ||
416 | const bitrateLimits = { | 418 | const bitrateLimits = { |
417 | 720: 2800 * 1000, | 419 | 720: 3000 * 1000, |
418 | 360: 780 * 1000, | 420 | 360: 1100 * 1000, |
419 | 240: 320 * 1000 | 421 | 240: 600 * 1000 |
420 | } | 422 | } |
421 | 423 | ||
422 | for (const server of servers) { | 424 | for (const server of servers) { |
@@ -442,7 +444,7 @@ describe('Test live', function () { | |||
442 | 444 | ||
443 | const probe = await ffprobePromise(segmentPath) | 445 | const probe = await ffprobePromise(segmentPath) |
444 | const videoStream = await getVideoStreamFromFile(segmentPath, probe) | 446 | const videoStream = await getVideoStreamFromFile(segmentPath, probe) |
445 | console.log(videoStream) | 447 | |
446 | expect(probe.format.bit_rate).to.be.below(bitrateLimits[videoStream.height]) | 448 | expect(probe.format.bit_rate).to.be.below(bitrateLimits[videoStream.height]) |
447 | 449 | ||
448 | await makeRawRequest(file.torrentUrl, 200) | 450 | await makeRawRequest(file.torrentUrl, 200) |