diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-05 10:53:04 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | e7d8e2b245491c0a8e008fb570037506d729ff04 (patch) | |
tree | d850a7f82cc02946f2e87b306d0b281cef5eb73d /server/tests/api | |
parent | dd3f99434cc3cb7226d33ffcd888c91d0ce150a9 (diff) | |
download | PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.tar.gz PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.tar.zst PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.zip |
Fix audio transcoding copy
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/transcoding/transcoder.ts | 6 |
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 @@ | |||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { canDoQuickTranscode } from '@server/lib/transcoding/transcoding-quick-transcode' | 4 | import { canDoQuickTranscode } from '@server/lib/transcoding/transcoding-quick-transcode' |
5 | import { checkWebTorrentWorks, generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' | 5 | import { checkWebTorrentWorks, generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' |
6 | import { buildAbsoluteFixturePath, getAllFiles, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' | 6 | import { buildAbsoluteFixturePath, getAllFiles, getMaxTheoreticalBitrate, getMinTheoreticalBitrate, omit } from '@shared/core-utils' |
7 | import { | 7 | import { |
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 | ||