From e7d8e2b245491c0a8e008fb570037506d729ff04 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 May 2023 10:53:04 +0200 Subject: Fix audio transcoding copy --- server/tests/api/transcoding/transcoder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/tests/api') diff --git a/server/tests/api/transcoding/transcoder.ts b/server/tests/api/transcoding/transcoder.ts index fa78b58bb..8a0a7f6d2 100644 --- a/server/tests/api/transcoding/transcoder.ts +++ b/server/tests/api/transcoding/transcoder.ts @@ -3,7 +3,7 @@ import { expect } from 'chai' import { canDoQuickTranscode } from '@server/lib/transcoding/transcoding-quick-transcode' import { checkWebTorrentWorks, generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' -import { buildAbsoluteFixturePath, getAllFiles, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' +import { buildAbsoluteFixturePath, getAllFiles, getMaxTheoreticalBitrate, getMinTheoreticalBitrate, omit } from '@shared/core-utils' import { ffprobePromise, getAudioStream, @@ -564,7 +564,7 @@ describe('Test video transcoding', function () { expect(resolution).to.equal(resolution) - const maxBitrate = getMaxBitrate({ ...dataResolution, fps }) + const maxBitrate = getMaxTheoreticalBitrate({ ...dataResolution, fps }) expect(bitrate).to.be.below(maxBitrate) } } @@ -611,7 +611,7 @@ describe('Test video transcoding', function () { const bitrate = await getVideoStreamBitrate(path) const inputBitrate = 60_000 - const limit = getMinLimitBitrate({ fps: 10, ratio: 1, resolution: r }) + const limit = getMinTheoreticalBitrate({ fps: 10, ratio: 1, resolution: r }) let belowValue = Math.max(inputBitrate, limit) belowValue += belowValue * 0.20 // Apply 20% margin because bitrate control is not very precise -- cgit v1.2.3