From 9f430a53be016f8db2736d5d8111282660b50f4c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Oct 2021 09:18:54 +0200 Subject: Fix bitrate tests --- server/tests/cli/print-transcode-command.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/tests/cli/print-transcode-command.ts') 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' const expect = chai.expect -describe('Test create transcoding jobs', function () { +describe('Test print transcode jobs', function () { it('Should print the correct command for each resolution', async function () { const fixturePath = buildAbsoluteFixturePath('video_short.webm') @@ -21,7 +21,7 @@ describe('Test create transcoding jobs', function () { VideoResolution.H_1080P ]) { const command = await CLICommand.exec(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`) - const targetBitrate = Math.min(getMaxBitrate({ resolution, fps, ratio: 16 / 9 }), bitrate) + const targetBitrate = Math.min(getMaxBitrate({ resolution, fps, ratio: 16 / 9 }), bitrate + (bitrate * 0.3)) expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`) expect(command).to.includes(`-y -acodec aac -vcodec libx264`) -- cgit v1.2.3