aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-28 15:52:44 +0100
committerChocobozzz <me@florianbigard.com>2021-01-28 15:55:39 +0100
commit1896bca09e088b0da9d5e845407ecebae330618c (patch)
tree56041c445c0cd49aca536d0fd6b586730f4d341e /server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js
parent529b37527cff5203a0689a15ce73dcee6e1eece2 (diff)
downloadPeerTube-1896bca09e088b0da9d5e845407ecebae330618c.tar.gz
PeerTube-1896bca09e088b0da9d5e845407ecebae330618c.tar.zst
PeerTube-1896bca09e088b0da9d5e845407ecebae330618c.zip
Support transcoding options/encoders by plugins
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js b/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js
new file mode 100644
index 000000000..a914bce49
--- /dev/null
+++ b/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js
@@ -0,0 +1,38 @@
1async function register ({ transcodingManager }) {
2
3 {
4 const builder = () => {
5 return {
6 outputOptions: []
7 }
8 }
9
10 transcodingManager.addVODProfile('libopus', 'test-vod-profile', builder)
11 transcodingManager.addVODProfile('libvpx-vp9', 'test-vod-profile', builder)
12
13 transcodingManager.addVODEncoderPriority('audio', 'libopus', 1000)
14 transcodingManager.addVODEncoderPriority('video', 'libvpx-vp9', 1000)
15 }
16
17 {
18 const builder = (options) => {
19 return {
20 outputOptions: [
21 '-b:' + options.streamNum + ' 10K'
22 ]
23 }
24 }
25
26 transcodingManager.addLiveProfile('libopus', 'test-live-profile', builder)
27 transcodingManager.addLiveEncoderPriority('audio', 'libopus', 1000)
28 }
29}
30
31async function unregister () {
32 return
33}
34
35module.exports = {
36 register,
37 unregister
38}