Use veryfast preset for default transcoding profile

This commit is contained in:
Chocobozzz 2021-01-29 15:31:31 +01:00
parent b87b606a65
commit a8537c622e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 6 additions and 2 deletions

View File

@ -28,6 +28,7 @@ const defaultX264VODOptionsBuilder: EncoderOptionsBuilder = async ({ input, reso
return {
outputOptions: [
`-preset veryfast`,
`-r ${fps}`,
`-maxrate ${targetBitrate}`,
`-bufsize ${targetBitrate * 2}`
@ -40,6 +41,7 @@ const defaultX264LiveOptionsBuilder: EncoderOptionsBuilder = async ({ resolution
return {
outputOptions: [
`-preset veryfast`,
`${buildStreamSuffix('-r:v', streamNum)} ${fps}`,
`${buildStreamSuffix('-b:v', streamNum)} ${targetBitrate}`,
`-maxrate ${targetBitrate}`,

View File

@ -203,10 +203,10 @@ describe('Test transcoding plugins', function () {
it('Should use the new vod encoders', async function () {
this.timeout(240000)
const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video' })).uuid
const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video', fixture: 'video_short_240p.mp4' })).uuid
await waitJobs([ server ])
const path = buildServerDirectory(server, join('videos', videoUUID + '-720.mp4'))
const path = buildServerDirectory(server, join('videos', videoUUID + '-240.mp4'))
const audioProbe = await getAudioStream(path)
expect(audioProbe.audioStream.codec_name).to.equal('opus')

View File

@ -641,10 +641,12 @@ async function uploadVideoAndGetId (options: {
nsfw?: boolean
privacy?: VideoPrivacy
token?: string
fixture?: string
}) {
const videoAttrs: any = { name: options.videoName }
if (options.nsfw) videoAttrs.nsfw = options.nsfw
if (options.privacy) videoAttrs.privacy = options.privacy
if (options.fixture) videoAttrs.fixture = options.fixture
const res = await uploadVideo(options.server.url, options.token || options.server.accessToken, videoAttrs)