diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-12 13:50:48 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-12 13:50:48 +0200 |
commit | 10ef089102f2225c5ec3ed426bc612e4f2bc8655 (patch) | |
tree | a92171db9114792a363e360bfb645c13d9ea4234 /server/tests/cli | |
parent | c80e458afb63915163467fe9b3b147b3b4e4657d (diff) | |
parent | 3c25d37aef66b125e8c66d38b04eb763f1b17bc6 (diff) | |
download | PeerTube-10ef089102f2225c5ec3ed426bc612e4f2bc8655.tar.gz PeerTube-10ef089102f2225c5ec3ed426bc612e4f2bc8655.tar.zst PeerTube-10ef089102f2225c5ec3ed426bc612e4f2bc8655.zip |
Merge branch 'release/3.4.0' into develop
Diffstat (limited to 'server/tests/cli')
-rw-r--r-- | server/tests/cli/print-transcode-command.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tests/cli/print-transcode-command.ts b/server/tests/cli/print-transcode-command.ts index e328a6072..e2cca17f9 100644 --- a/server/tests/cli/print-transcode-command.ts +++ b/server/tests/cli/print-transcode-command.ts | |||
@@ -9,7 +9,7 @@ import { VideoResolution } from '../../../shared/models/videos' | |||
9 | 9 | ||
10 | const expect = chai.expect | 10 | const expect = chai.expect |
11 | 11 | ||
12 | describe('Test create transcoding jobs', function () { | 12 | describe('Test print transcode jobs', function () { |
13 | 13 | ||
14 | it('Should print the correct command for each resolution', async function () { | 14 | it('Should print the correct command for each resolution', async function () { |
15 | const fixturePath = buildAbsoluteFixturePath('video_short.webm') | 15 | const fixturePath = buildAbsoluteFixturePath('video_short.webm') |
@@ -21,7 +21,7 @@ describe('Test create transcoding jobs', function () { | |||
21 | VideoResolution.H_1080P | 21 | VideoResolution.H_1080P |
22 | ]) { | 22 | ]) { |
23 | const command = await CLICommand.exec(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`) | 23 | const command = await CLICommand.exec(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`) |
24 | const targetBitrate = Math.min(getMaxBitrate({ resolution, fps, ratio: 16 / 9 }), bitrate) | 24 | const targetBitrate = Math.min(getMaxBitrate({ resolution, fps, ratio: 16 / 9 }), bitrate + (bitrate * 0.3)) |
25 | 25 | ||
26 | expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`) | 26 | expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`) |
27 | expect(command).to.includes(`-y -acodec aac -vcodec libx264`) | 27 | expect(command).to.includes(`-y -acodec aac -vcodec libx264`) |