mirror of https://github.com/Chocobozzz/PeerTube
Use veryfast preset for default transcoding profile
parent
b87b606a65
commit
a8537c622e
|
@ -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}`,
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue