aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/transcoding/transcoder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/transcoding/transcoder.ts')
-rw-r--r--server/tests/api/transcoding/transcoder.ts6
1 files changed, 3 insertions, 3 deletions
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 @@
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { canDoQuickTranscode } from '@server/lib/transcoding/transcoding-quick-transcode' 4import { canDoQuickTranscode } from '@server/lib/transcoding/transcoding-quick-transcode'
5import { checkWebTorrentWorks, generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' 5import { checkWebTorrentWorks, generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared'
6import { buildAbsoluteFixturePath, getAllFiles, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' 6import { buildAbsoluteFixturePath, getAllFiles, getMaxTheoreticalBitrate, getMinTheoreticalBitrate, omit } from '@shared/core-utils'
7import { 7import {
8 ffprobePromise, 8 ffprobePromise,
9 getAudioStream, 9 getAudioStream,
@@ -564,7 +564,7 @@ describe('Test video transcoding', function () {
564 564
565 expect(resolution).to.equal(resolution) 565 expect(resolution).to.equal(resolution)
566 566
567 const maxBitrate = getMaxBitrate({ ...dataResolution, fps }) 567 const maxBitrate = getMaxTheoreticalBitrate({ ...dataResolution, fps })
568 expect(bitrate).to.be.below(maxBitrate) 568 expect(bitrate).to.be.below(maxBitrate)
569 } 569 }
570 } 570 }
@@ -611,7 +611,7 @@ describe('Test video transcoding', function () {
611 const bitrate = await getVideoStreamBitrate(path) 611 const bitrate = await getVideoStreamBitrate(path)
612 612
613 const inputBitrate = 60_000 613 const inputBitrate = 60_000
614 const limit = getMinLimitBitrate({ fps: 10, ratio: 1, resolution: r }) 614 const limit = getMinTheoreticalBitrate({ fps: 10, ratio: 1, resolution: r })
615 let belowValue = Math.max(inputBitrate, limit) 615 let belowValue = Math.max(inputBitrate, limit)
616 belowValue += belowValue * 0.20 // Apply 20% margin because bitrate control is not very precise 616 belowValue += belowValue * 0.20 // Apply 20% margin because bitrate control is not very precise
617 617