aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-transcoding-one
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-09 10:36:21 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-04-09 15:53:18 +0200
commit3e03b961b8ab897500dfea626f808c009f64e551 (patch)
treebfde6c71a4a63b77fe94536149d0b68cf02110c9 /server/tests/fixtures/peertube-plugin-test-transcoding-one
parentd2351bcfd4cfed4b728df170593e0c6b66aa6762 (diff)
downloadPeerTube-3e03b961b8ab897500dfea626f808c009f64e551.tar.gz
PeerTube-3e03b961b8ab897500dfea626f808c009f64e551.tar.zst
PeerTube-3e03b961b8ab897500dfea626f808c009f64e551.zip
Add ability for plugins to specify scale filter
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-transcoding-one')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js97
1 files changed, 59 insertions, 38 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
index 366b827a9..59b136947 100644
--- a/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js
+++ b/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js
@@ -1,63 +1,84 @@
1async function register ({ transcodingManager }) { 1async function register ({ transcodingManager }) {
2 2
3 // Output options
3 { 4 {
4 const builder = () => { 5 {
5 return { 6 const builder = () => {
6 outputOptions: [ 7 return {
7 '-r 10' 8 outputOptions: [
8 ] 9 '-r 10'
10 ]
11 }
9 } 12 }
10 }
11 13
12 transcodingManager.addVODProfile('libx264', 'low-vod', builder) 14 transcodingManager.addVODProfile('libx264', 'low-vod', builder)
13 } 15 }
14 16
15 { 17 {
16 const builder = () => { 18 const builder = (options) => {
17 return { 19 return {
18 videoFilters: [ 20 outputOptions: [
19 'fps=10' 21 '-r:' + options.streamNum + ' 5'
20 ] 22 ]
23 }
21 } 24 }
22 }
23 25
24 transcodingManager.addVODProfile('libx264', 'video-filters-vod', builder) 26 transcodingManager.addLiveProfile('libx264', 'low-live', builder)
27 }
25 } 28 }
26 29
30 // Input options
27 { 31 {
28 const builder = () => { 32 {
29 return { 33 const builder = () => {
30 inputOptions: [ 34 return {
31 '-r 5' 35 inputOptions: [
32 ] 36 '-r 5'
37 ]
38 }
33 } 39 }
34 }
35 40
36 transcodingManager.addVODProfile('libx264', 'input-options-vod', builder) 41 transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
37 } 42 }
38 43
39 { 44 {
40 const builder = (options) => { 45 const builder = () => {
41 return { 46 return {
42 outputOptions: [ 47 inputOptions: [
43 '-r:' + options.streamNum + ' 5' 48 '-r 5'
44 ] 49 ]
50 }
45 } 51 }
46 }
47 52
48 transcodingManager.addLiveProfile('libx264', 'low-live', builder) 53 transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
54 }
49 } 55 }
50 56
57 // Scale filters
51 { 58 {
52 const builder = () => { 59 {
53 return { 60 const builder = () => {
54 inputOptions: [ 61 return {
55 '-r 5' 62 scaleFilter: {
56 ] 63 name: 'Glomgold'
64 }
65 }
57 } 66 }
67
68 transcodingManager.addVODProfile('libx264', 'bad-scale-vod', builder)
58 } 69 }
59 70
60 transcodingManager.addLiveProfile('libx264', 'input-options-live', builder) 71 {
72 const builder = () => {
73 return {
74 scaleFilter: {
75 name: 'Flintheart'
76 }
77 }
78 }
79
80 transcodingManager.addLiveProfile('libx264', 'bad-scale-live', builder)
81 }
61 } 82 }
62} 83}
63 84