aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-29 15:31:31 +0100
committerChocobozzz <me@florianbigard.com>2021-01-29 15:31:31 +0100
commita8537c622ed8ff58b26a74a8d86e7c5b890f8af2 (patch)
tree6681cdbba4975135377f93932671e8a96c2055de /server
parentb87b606a65c9baa30742d74dd470945b08e17601 (diff)
downloadPeerTube-a8537c622ed8ff58b26a74a8d86e7c5b890f8af2.tar.gz
PeerTube-a8537c622ed8ff58b26a74a8d86e7c5b890f8af2.tar.zst
PeerTube-a8537c622ed8ff58b26a74a8d86e7c5b890f8af2.zip
Use veryfast preset for default transcoding profile
Diffstat (limited to 'server')
-rw-r--r--server/lib/video-transcoding-profiles.ts2
-rw-r--r--server/tests/plugins/plugin-transcoding.ts4
2 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/video-transcoding-profiles.ts b/server/lib/video-transcoding-profiles.ts
index 76d38b6ca..b7f9178c4 100644
--- a/server/lib/video-transcoding-profiles.ts
+++ b/server/lib/video-transcoding-profiles.ts
@@ -28,6 +28,7 @@ const defaultX264VODOptionsBuilder: EncoderOptionsBuilder = async ({ input, reso
28 28
29 return { 29 return {
30 outputOptions: [ 30 outputOptions: [
31 `-preset veryfast`,
31 `-r ${fps}`, 32 `-r ${fps}`,
32 `-maxrate ${targetBitrate}`, 33 `-maxrate ${targetBitrate}`,
33 `-bufsize ${targetBitrate * 2}` 34 `-bufsize ${targetBitrate * 2}`
@@ -40,6 +41,7 @@ const defaultX264LiveOptionsBuilder: EncoderOptionsBuilder = async ({ resolution
40 41
41 return { 42 return {
42 outputOptions: [ 43 outputOptions: [
44 `-preset veryfast`,
43 `${buildStreamSuffix('-r:v', streamNum)} ${fps}`, 45 `${buildStreamSuffix('-r:v', streamNum)} ${fps}`,
44 `${buildStreamSuffix('-b:v', streamNum)} ${targetBitrate}`, 46 `${buildStreamSuffix('-b:v', streamNum)} ${targetBitrate}`,
45 `-maxrate ${targetBitrate}`, 47 `-maxrate ${targetBitrate}`,
diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts
index 90ef01b92..ecea21e69 100644
--- a/server/tests/plugins/plugin-transcoding.ts
+++ b/server/tests/plugins/plugin-transcoding.ts
@@ -203,10 +203,10 @@ describe('Test transcoding plugins', function () {
203 it('Should use the new vod encoders', async function () { 203 it('Should use the new vod encoders', async function () {
204 this.timeout(240000) 204 this.timeout(240000)
205 205
206 const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video' })).uuid 206 const videoUUID = (await uploadVideoAndGetId({ server, videoName: 'video', fixture: 'video_short_240p.mp4' })).uuid
207 await waitJobs([ server ]) 207 await waitJobs([ server ])
208 208
209 const path = buildServerDirectory(server, join('videos', videoUUID + '-720.mp4')) 209 const path = buildServerDirectory(server, join('videos', videoUUID + '-240.mp4'))
210 const audioProbe = await getAudioStream(path) 210 const audioProbe = await getAudioStream(path)
211 expect(audioProbe.audioStream.codec_name).to.equal('opus') 211 expect(audioProbe.audioStream.codec_name).to.equal('opus')
212 212