mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add ability for plugins to specify scale filter
This commit is contained in:
parent
d2351bcfd4
commit
3e03b961b8
5 changed files with 137 additions and 86 deletions
|
@ -15,9 +15,11 @@ import {
|
|||
sendRTMPStreamInVideo,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel,
|
||||
testFfmpegStreamError,
|
||||
uninstallPlugin,
|
||||
updateCustomSubConfig,
|
||||
uploadVideoAndGetId,
|
||||
waitFfmpegUntilError,
|
||||
waitJobs,
|
||||
waitUntilLivePublished
|
||||
} from '../../../shared/extra-utils'
|
||||
|
@ -119,8 +121,8 @@ describe('Test transcoding plugins', function () {
|
|||
const res = await getConfig(server.url)
|
||||
const config = res.body as ServerConfig
|
||||
|
||||
expect(config.transcoding.availableProfiles).to.have.members([ 'default', 'low-vod', 'video-filters-vod', 'input-options-vod' ])
|
||||
expect(config.live.transcoding.availableProfiles).to.have.members([ 'default', 'low-live', 'input-options-live' ])
|
||||
expect(config.transcoding.availableProfiles).to.have.members([ 'default', 'low-vod', 'input-options-vod', 'bad-scale-vod' ])
|
||||
expect(config.live.transcoding.availableProfiles).to.have.members([ 'default', 'low-live', 'input-options-live', 'bad-scale-live' ])
|
||||
})
|
||||
|
||||
it('Should not use the plugin profile if not chosen by the admin', async function () {
|
||||
|
@ -143,17 +145,6 @@ describe('Test transcoding plugins', function () {
|
|||
await checkVideoFPS(videoUUID, 'below', 12)
|
||||
})
|
||||
|
||||
it('Should apply video filters in vod profile', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
await updateConf(server, 'video-filters-vod', 'default')
|
||||
|
||||
const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video' })).uuid
|
||||
await waitJobs([ server ])
|
||||
|
||||
await checkVideoFPS(videoUUID, 'below', 12)
|
||||
})
|
||||
|
||||
it('Should apply input options in vod profile', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
|
@ -165,6 +156,22 @@ describe('Test transcoding plugins', function () {
|
|||
await checkVideoFPS(videoUUID, 'below', 6)
|
||||
})
|
||||
|
||||
it('Should apply the scale filter in vod profile', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
await updateConf(server, 'bad-scale-vod', 'default')
|
||||
|
||||
const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video' })).uuid
|
||||
await waitJobs([ server ])
|
||||
|
||||
// Transcoding failed
|
||||
const res = await getVideo(server.url, videoUUID)
|
||||
const video: VideoDetails = res.body
|
||||
|
||||
expect(video.files).to.have.lengthOf(1)
|
||||
expect(video.streamingPlaylists).to.have.lengthOf(0)
|
||||
})
|
||||
|
||||
it('Should not use the plugin profile if not chosen by the admin', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
|
@ -205,6 +212,17 @@ describe('Test transcoding plugins', function () {
|
|||
await checkLiveFPS(liveVideoId, 'below', 6)
|
||||
})
|
||||
|
||||
it('Should apply the scale filter name on live profile', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
await updateConf(server, 'low-vod', 'bad-scale-live')
|
||||
|
||||
const liveVideoId = await createLiveWrapper(server)
|
||||
|
||||
const command = await sendRTMPStreamInVideo(server.url, server.accessToken, liveVideoId, 'video_short2.webm')
|
||||
await testFfmpegStreamError(command, true)
|
||||
})
|
||||
|
||||
it('Should default to the default profile if the specified profile does not exist', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue