Add 4k transcoding test
This commit is contained in:
parent
78d62f4d18
commit
f5961a8cdf
|
@ -486,7 +486,9 @@ describe('Test video transcoding', function () {
|
||||||
'360p': true,
|
'360p': true,
|
||||||
'480p': true,
|
'480p': true,
|
||||||
'720p': true,
|
'720p': true,
|
||||||
'1080p': true
|
'1080p': true,
|
||||||
|
'1440p': true,
|
||||||
|
'2160p': true
|
||||||
},
|
},
|
||||||
webtorrent: { enabled: true },
|
webtorrent: { enabled: true },
|
||||||
hls: { enabled: true }
|
hls: { enabled: true }
|
||||||
|
@ -567,6 +569,34 @@ describe('Test video transcoding', function () {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('Should transcode a 4k video', async function () {
|
||||||
|
this.timeout(200000)
|
||||||
|
|
||||||
|
const videoAttributes = {
|
||||||
|
name: '4k video',
|
||||||
|
fixture: 'video_short_4k.mp4'
|
||||||
|
}
|
||||||
|
|
||||||
|
const resUpload = await uploadVideo(servers[1].url, servers[1].accessToken, videoAttributes)
|
||||||
|
const videoUUID = resUpload.body.video.uuid
|
||||||
|
|
||||||
|
await waitJobs(servers)
|
||||||
|
|
||||||
|
const resolutions = [ 240, 360, 480, 720, 1080, 1440, 2160 ]
|
||||||
|
|
||||||
|
for (const server of servers) {
|
||||||
|
const res = await getVideo(server.url, videoUUID)
|
||||||
|
const videoDetails: VideoDetails = res.body
|
||||||
|
|
||||||
|
expect(videoDetails.files).to.have.lengthOf(resolutions.length)
|
||||||
|
|
||||||
|
for (const r of resolutions) {
|
||||||
|
expect(videoDetails.files.find(f => f.resolution.id === r)).to.not.be.undefined
|
||||||
|
expect(videoDetails.streamingPlaylists[0].files.find(f => f.resolution.id === r)).to.not.be.undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
await cleanupTests(servers)
|
await cleanupTests(servers)
|
||||||
})
|
})
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue