]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/shared/generate.ts
Add ability to save replay of permanent lives
[github/Chocobozzz/PeerTube.git] / server / tests / shared / generate.ts
index f806df2f58705cf721f319657a6e9cb6a97b7f1a..9a57084e45dc408aaced4eff61a56650bc17106c 100644 (file)
@@ -3,12 +3,12 @@ import ffmpeg from 'fluent-ffmpeg'
 import { ensureDir, pathExists } from 'fs-extra'
 import { dirname } from 'path'
 import { buildAbsoluteFixturePath, getMaxBitrate } from '@shared/core-utils'
-import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '@shared/extra-utils'
+import { getVideoStreamBitrate, getVideoStreamFPS, getVideoStreamDimensionsInfo } from '@shared/extra-utils'
 
 async function ensureHasTooBigBitrate (fixturePath: string) {
-  const bitrate = await getVideoFileBitrate(fixturePath)
-  const dataResolution = await getVideoFileResolution(fixturePath)
-  const fps = await getVideoFileFPS(fixturePath)
+  const bitrate = await getVideoStreamBitrate(fixturePath)
+  const dataResolution = await getVideoStreamDimensionsInfo(fixturePath)
+  const fps = await getVideoStreamFPS(fixturePath)
 
   const maxBitrate = getMaxBitrate({ ...dataResolution, fps })
   expect(bitrate).to.be.above(maxBitrate)