diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-28 15:52:44 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-01-28 15:55:39 +0100 |
commit | 1896bca09e088b0da9d5e845407ecebae330618c (patch) | |
tree | 56041c445c0cd49aca536d0fd6b586730f4d341e /server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js | |
parent | 529b37527cff5203a0689a15ce73dcee6e1eece2 (diff) | |
download | PeerTube-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-one/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js b/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js new file mode 100644 index 000000000..5990ce1ce --- /dev/null +++ b/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js | |||
@@ -0,0 +1,35 @@ | |||
1 | async function register ({ transcodingManager }) { | ||
2 | |||
3 | { | ||
4 | const builder = () => { | ||
5 | return { | ||
6 | outputOptions: [ | ||
7 | '-r 10' | ||
8 | ] | ||
9 | } | ||
10 | } | ||
11 | |||
12 | transcodingManager.addVODProfile('libx264', 'low-vod', builder) | ||
13 | } | ||
14 | |||
15 | { | ||
16 | const builder = (options) => { | ||
17 | return { | ||
18 | outputOptions: [ | ||
19 | '-r:' + options.streamNum + ' 5' | ||
20 | ] | ||
21 | } | ||
22 | } | ||
23 | |||
24 | transcodingManager.addLiveProfile('libx264', 'low-live', builder) | ||
25 | } | ||
26 | } | ||
27 | |||
28 | async function unregister () { | ||
29 | return | ||
30 | } | ||
31 | |||
32 | module.exports = { | ||
33 | register, | ||
34 | unregister | ||
35 | } | ||