]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js
Add option to not transcode original resolution
[github/Chocobozzz/PeerTube.git] / server / tests / fixtures / peertube-plugin-test-transcoding-one / main.js
index 366b827a94d04af0dcda39c8986a08d37d6c9ce4..c4ae777f55f0b4426a29107ed79b00b89df49e44 100644 (file)
@@ -1,67 +1,87 @@
 async function register ({ transcodingManager }) {
 
+  // Output options
   {
-    const builder = () => {
-      return {
-        outputOptions: [
-          '-r 10'
-        ]
+    {
+      const builder = () => {
+        return {
+          outputOptions: [
+            '-r 10'
+          ]
+        }
       }
-    }
 
-    transcodingManager.addVODProfile('libx264', 'low-vod', builder)
-  }
+      transcodingManager.addVODProfile('libx264', 'low-vod', builder)
+    }
 
-  {
-    const builder = () => {
-      return {
-        videoFilters: [
-          'fps=10'
-        ]
+    {
+      const builder = (options) => {
+        return {
+          outputOptions: [
+            '-r:' + options.streamNum + ' 50'
+          ]
+        }
       }
-    }
 
-    transcodingManager.addVODProfile('libx264', 'video-filters-vod', builder)
+      transcodingManager.addLiveProfile('libx264', 'high-live', builder)
+    }
   }
 
+  // Input options
   {
-    const builder = () => {
-      return {
-        inputOptions: [
-          '-r 5'
-        ]
+    {
+      const builder = () => {
+        return {
+          inputOptions: [
+            '-r 5'
+          ]
+        }
       }
-    }
 
-    transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
-  }
+      transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
+    }
 
-  {
-    const builder = (options) => {
-      return {
-        outputOptions: [
-          '-r:' + options.streamNum + ' 5'
-        ]
+    {
+      const builder = () => {
+        return {
+          inputOptions: [
+            '-r 50'
+          ]
+        }
       }
-    }
 
-    transcodingManager.addLiveProfile('libx264', 'low-live', builder)
+      transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
+    }
   }
 
+  // Scale filters
   {
-    const builder = () => {
-      return {
-        inputOptions: [
-          '-r 5'
-        ]
+    {
+      const builder = () => {
+        return {
+          scaleFilter: {
+            name: 'Glomgold'
+          }
+        }
       }
+
+      transcodingManager.addVODProfile('libx264', 'bad-scale-vod', builder)
     }
 
-    transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
+    {
+      const builder = () => {
+        return {
+          scaleFilter: {
+            name: 'Flintheart'
+          }
+        }
+      }
+
+      transcodingManager.addLiveProfile('libx264', 'bad-scale-live', builder)
+    }
   }
 }
 
-
 async function unregister () {
   return
 }