diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-20 17:16:55 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 10:07:51 +0100 |
commit | daf6e4801052d3ca6be2fafd20bae2323b1ce175 (patch) | |
tree | a136af611c2543c461ce3fd126ddb7cb1e37a0c2 /server/tests/api/videos/audio-only.ts | |
parent | 123f61933611f326ea5a5e8c2ea253ee8720e4f0 (diff) | |
download | PeerTube-daf6e4801052d3ca6be2fafd20bae2323b1ce175.tar.gz PeerTube-daf6e4801052d3ca6be2fafd20bae2323b1ce175.tar.zst PeerTube-daf6e4801052d3ca6be2fafd20bae2323b1ce175.zip |
Split ffmpeg utils with ffprobe utils
Diffstat (limited to 'server/tests/api/videos/audio-only.ts')
-rw-r--r-- | server/tests/api/videos/audio-only.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts index ac7a0b89c..053b29ca1 100644 --- a/server/tests/api/videos/audio-only.ts +++ b/server/tests/api/videos/audio-only.ts | |||
@@ -1,7 +1,9 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | ||
4 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | ||
5 | import { join } from 'path' | ||
6 | import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' | ||
5 | import { | 7 | import { |
6 | cleanupTests, | 8 | cleanupTests, |
7 | doubleFollow, | 9 | doubleFollow, |
@@ -14,8 +16,6 @@ import { | |||
14 | waitJobs | 16 | waitJobs |
15 | } from '../../../../shared/extra-utils' | 17 | } from '../../../../shared/extra-utils' |
16 | import { VideoDetails } from '../../../../shared/models/videos' | 18 | import { VideoDetails } from '../../../../shared/models/videos' |
17 | import { join } from 'path' | ||
18 | import { audio, getVideoStreamSize } from '@server/helpers/ffmpeg-utils' | ||
19 | 19 | ||
20 | const expect = chai.expect | 20 | const expect = chai.expect |
21 | 21 | ||
@@ -85,7 +85,7 @@ describe('Test audio only video transcoding', function () { | |||
85 | ] | 85 | ] |
86 | 86 | ||
87 | for (const path of paths) { | 87 | for (const path of paths) { |
88 | const { audioStream } = await audio.get(path) | 88 | const { audioStream } = await getAudioStream(path) |
89 | expect(audioStream['codec_name']).to.be.equal('aac') | 89 | expect(audioStream['codec_name']).to.be.equal('aac') |
90 | expect(audioStream['bit_rate']).to.be.at.most(384 * 8000) | 90 | expect(audioStream['bit_rate']).to.be.at.most(384 * 8000) |
91 | 91 | ||