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/shared/generate.ts | |
parent | dd3f99434cc3cb7226d33ffcd888c91d0ce150a9 (diff) | |
download | PeerTube-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.ts | 4 |
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' | |||
2 | import ffmpeg from 'fluent-ffmpeg' | 2 | import ffmpeg from 'fluent-ffmpeg' |
3 | import { ensureDir, pathExists } from 'fs-extra' | 3 | import { ensureDir, pathExists } from 'fs-extra' |
4 | import { dirname } from 'path' | 4 | import { dirname } from 'path' |
5 | import { buildAbsoluteFixturePath, getMaxBitrate } from '@shared/core-utils' | 5 | import { buildAbsoluteFixturePath, getMaxTheoreticalBitrate } from '@shared/core-utils' |
6 | import { getVideoStreamBitrate, getVideoStreamDimensionsInfo, getVideoStreamFPS } from '@shared/ffmpeg' | 6 | import { getVideoStreamBitrate, getVideoStreamDimensionsInfo, getVideoStreamFPS } from '@shared/ffmpeg' |
7 | 7 | ||
8 | async function ensureHasTooBigBitrate (fixturePath: string) { | 8 | async 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 | ||