aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/audio-only.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-20 17:16:55 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 10:07:51 +0100
commitdaf6e4801052d3ca6be2fafd20bae2323b1ce175 (patch)
treea136af611c2543c461ce3fd126ddb7cb1e37a0c2 /server/tests/api/videos/audio-only.ts
parent123f61933611f326ea5a5e8c2ea253ee8720e4f0 (diff)
downloadPeerTube-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.ts8
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
3import * as chai from 'chai'
4import 'mocha' 3import 'mocha'
4import * as chai from 'chai'
5import { join } from 'path'
6import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils'
5import { 7import {
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'
16import { VideoDetails } from '../../../../shared/models/videos' 18import { VideoDetails } from '../../../../shared/models/videos'
17import { join } from 'path'
18import { audio, getVideoStreamSize } from '@server/helpers/ffmpeg-utils'
19 19
20const expect = chai.expect 20const 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