]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js
add tests for inputOptions and videoFilters in trancode plugins
[github/Chocobozzz/PeerTube.git] / server / tests / fixtures / peertube-plugin-test-transcoding-one / main.js
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 = () => {
17 return {
18 videoFilters: [
19 'fps=10'
20 ]
21 }
22 }
23
24 transcodingManager.addVODProfile('libx264', 'video-filters-vod', builder)
25 }
26
27 {
28 const builder = () => {
29 return {
30 inputOptions: [
31 '-r 5'
32 ]
33 }
34 }
35
36 transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
37 }
38
39 {
40 const builder = (options) => {
41 return {
42 outputOptions: [
43 '-r:' + options.streamNum + ' 5'
44 ]
45 }
46 }
47
48 transcodingManager.addLiveProfile('libx264', 'low-live', builder)
49 }
50
51 {
52 const builder = () => {
53 return {
54 inputOptions: [
55 '-r 5'
56 ]
57 }
58 }
59
60 transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
61 }
62 }
63
64
65 async function unregister () {
66 return
67 }
68
69 module.exports = {
70 register,
71 unregister
72 }