aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/lib/video-transcoding-profiles.ts2
-rw-r--r--server/tests/plugins/plugin-transcoding.ts4
-rw-r--r--shared/extra-utils/videos/videos.ts2
3 files changed, 6 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
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts
index 392eddcc5..110552c77 100644
--- a/shared/extra-utils/videos/videos.ts
+++ b/shared/extra-utils/videos/videos.ts
@@ -641,10 +641,12 @@ async function uploadVideoAndGetId (options: {
641 nsfw?: boolean 641 nsfw?: boolean
642 privacy?: VideoPrivacy 642 privacy?: VideoPrivacy
643 token?: string 643 token?: string
644 fixture?: string
644}) { 645}) {
645 const videoAttrs: any = { name: options.videoName } 646 const videoAttrs: any = { name: options.videoName }
646 if (options.nsfw) videoAttrs.nsfw = options.nsfw 647 if (options.nsfw) videoAttrs.nsfw = options.nsfw
647 if (options.privacy) videoAttrs.privacy = options.privacy 648 if (options.privacy) videoAttrs.privacy = options.privacy
649 if (options.fixture) videoAttrs.fixture = options.fixture
648 650
649 const res = await uploadVideo(options.server.url, options.token || options.server.accessToken, videoAttrs) 651 const res = await uploadVideo(options.server.url, options.token || options.server.accessToken, videoAttrs)
650 652