X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Fplugin-transcoding.ts;h=ce1047388383176290e3133bfeaee3ebb898f418;hb=b1dbb9fefc870a90b25f5c0153589f45c9e75e3e;hp=5ab6864729327883a6081346eb9f4973daf0a7fc;hpb=3318147300b4f998adf728eb0a5a14a4c1829c51;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts index 5ab686472..ce1047388 100644 --- a/server/tests/plugins/plugin-transcoding.ts +++ b/server/tests/plugins/plugin-transcoding.ts @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' -import { getAudioStream, getVideoFileFPS, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' +import { getAudioStream, getVideoStreamFPS, getVideoStream } from '@server/helpers/ffmpeg' +import { VideoPrivacy } from '@shared/models' import { cleanupTests, createSingleServer, @@ -13,7 +13,6 @@ import { testFfmpegStreamError, waitJobs } from '@shared/server-commands' -import { VideoPrivacy } from '@shared/models' async function createLiveWrapper (server: PeerTubeServer) { const liveAttributes = { @@ -92,7 +91,7 @@ describe('Test transcoding plugins', function () { async function checkLiveFPS (uuid: string, type: 'above' | 'below', fps: number) { const playlistUrl = `${server.url}/static/streaming-playlists/hls/${uuid}/0.m3u8` - const videoFPS = await getVideoFileFPS(playlistUrl) + const videoFPS = await getVideoStreamFPS(playlistUrl) if (type === 'above') { expect(videoFPS).to.be.above(fps) @@ -252,7 +251,7 @@ describe('Test transcoding plugins', function () { const audioProbe = await getAudioStream(path) expect(audioProbe.audioStream.codec_name).to.equal('opus') - const videoProbe = await getVideoStreamFromFile(path) + const videoProbe = await getVideoStream(path) expect(videoProbe.codec_name).to.equal('vp9') }) @@ -269,7 +268,7 @@ describe('Test transcoding plugins', function () { const audioProbe = await getAudioStream(playlistUrl) expect(audioProbe.audioStream.codec_name).to.equal('opus') - const videoProbe = await getVideoStreamFromFile(playlistUrl) + const videoProbe = await getVideoStream(playlistUrl) expect(videoProbe.codec_name).to.equal('h264') }) })