]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/plugin-transcoding.ts
improve documentation plugin-transcode
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / plugin-transcoding.ts
index 96ff4c2fec3eb4aa5e0be5a8c2976a1c72eca033..ecea21e694d3f3eab434481c70925df8631ecc08 100644 (file)
@@ -44,12 +44,24 @@ function updateConf (server: ServerInfo, vodProfile: string, liveProfile: string
       },
       webtorrent: {
         enabled: true
+      },
+      resolutions: {
+        '240p': true,
+        '360p': false,
+        '480p': false,
+        '720p': true
       }
     },
     live: {
       transcoding: {
         profile: liveProfile,
-        enabled: true
+        enabled: true,
+        resolutions: {
+          '240p': true,
+          '360p': false,
+          '480p': false,
+          '720p': true
+        }
       }
     }
   })
@@ -191,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')