aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/shared/generate.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-05 10:53:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commite7d8e2b245491c0a8e008fb570037506d729ff04 (patch)
treed850a7f82cc02946f2e87b306d0b281cef5eb73d /server/tests/shared/generate.ts
parentdd3f99434cc3cb7226d33ffcd888c91d0ce150a9 (diff)
downloadPeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.tar.gz
PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.tar.zst
PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.zip
Fix audio transcoding copy
Diffstat (limited to 'server/tests/shared/generate.ts')
-rw-r--r--server/tests/shared/generate.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tests/shared/generate.ts b/server/tests/shared/generate.ts
index b0c8dba66..3788b049f 100644
--- a/server/tests/shared/generate.ts
+++ b/server/tests/shared/generate.ts
@@ -2,7 +2,7 @@ import { expect } from 'chai'
2import ffmpeg from 'fluent-ffmpeg' 2import ffmpeg from 'fluent-ffmpeg'
3import { ensureDir, pathExists } from 'fs-extra' 3import { ensureDir, pathExists } from 'fs-extra'
4import { dirname } from 'path' 4import { dirname } from 'path'
5import { buildAbsoluteFixturePath, getMaxBitrate } from '@shared/core-utils' 5import { buildAbsoluteFixturePath, getMaxTheoreticalBitrate } from '@shared/core-utils'
6import { getVideoStreamBitrate, getVideoStreamDimensionsInfo, getVideoStreamFPS } from '@shared/ffmpeg' 6import { getVideoStreamBitrate, getVideoStreamDimensionsInfo, getVideoStreamFPS } from '@shared/ffmpeg'
7 7
8async function ensureHasTooBigBitrate (fixturePath: string) { 8async function ensureHasTooBigBitrate (fixturePath: string) {
@@ -10,7 +10,7 @@ async function ensureHasTooBigBitrate (fixturePath: string) {
10 const dataResolution = await getVideoStreamDimensionsInfo(fixturePath) 10 const dataResolution = await getVideoStreamDimensionsInfo(fixturePath)
11 const fps = await getVideoStreamFPS(fixturePath) 11 const fps = await getVideoStreamFPS(fixturePath)
12 12
13 const maxBitrate = getMaxBitrate({ ...dataResolution, fps }) 13 const maxBitrate = getMaxTheoreticalBitrate({ ...dataResolution, fps })
14 expect(bitrate).to.be.above(maxBitrate) 14 expect(bitrate).to.be.above(maxBitrate)
15} 15}
16 16