aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/audio-only.ts4
-rw-r--r--server/tests/api/videos/video-hls.ts5
2 files changed, 6 insertions, 3 deletions
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts
index f5b6a26e5..f12d730cc 100644
--- a/server/tests/api/videos/audio-only.ts
+++ b/server/tests/api/videos/audio-only.ts
@@ -22,7 +22,7 @@ import { VideoDetails } from '../../../../shared/models/videos'
22import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' 22import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
23import { join } from 'path' 23import { join } from 'path'
24import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' 24import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
25import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution, audio, getVideoFileSize } from '@server/helpers/ffmpeg-utils' 25import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution, audio, getVideoStreamSize } from '@server/helpers/ffmpeg-utils'
26 26
27const expect = chai.expect 27const expect = chai.expect
28 28
@@ -96,7 +96,7 @@ describe('Test audio only video transcoding', function () {
96 expect(audioStream[ 'codec_name' ]).to.be.equal('aac') 96 expect(audioStream[ 'codec_name' ]).to.be.equal('aac')
97 expect(audioStream[ 'bit_rate' ]).to.be.at.most(384 * 8000) 97 expect(audioStream[ 'bit_rate' ]).to.be.at.most(384 * 8000)
98 98
99 const size = await getVideoFileSize(path) 99 const size = await getVideoStreamSize(path)
100 expect(size.height).to.equal(0) 100 expect(size.height).to.equal(0)
101 expect(size.width).to.equal(0) 101 expect(size.width).to.equal(0)
102 } 102 }
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index 289209177..bde3b5656 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -66,7 +66,10 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string, hlsOn
66 const masterPlaylist = res.text 66 const masterPlaylist = res.text
67 67
68 for (const resolution of resolutions) { 68 for (const resolution of resolutions) {
69 expect(masterPlaylist).to.match(new RegExp('#EXT-X-STREAM-INF:BANDWIDTH=\\d+,RESOLUTION=\\d+x' + resolution + ',FRAME-RATE=\\d+')) 69 const reg = new RegExp('#EXT-X-STREAM-INF:BANDWIDTH=\\d+,RESOLUTION=\\d+x' + resolution + ',FRAME-RATE=\\d+,CODECS="avc1.64001f,mp4a.40.2"')
70
71 expect(masterPlaylist).to.match(reg)
72 expect(masterPlaylist).to.contain(`${resolution}.m3u8`)
70 expect(masterPlaylist).to.contain(`${resolution}.m3u8`) 73 expect(masterPlaylist).to.contain(`${resolution}.m3u8`)
71 } 74 }
72 } 75 }