aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/plugins')
-rw-r--r--support/doc/plugins/guide.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 18e962c10..331813e4f 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -328,6 +328,8 @@ function register (...) {
328Adding transcoding profiles allow admins to change ffmpeg encoding parameters and/or encoders. 328Adding transcoding profiles allow admins to change ffmpeg encoding parameters and/or encoders.
329A transcoding profile has to be chosen by the admin of the instance using the admin configuration. 329A transcoding profile has to be chosen by the admin of the instance using the admin configuration.
330 330
331Transcoding profiles used for live transcoding must not provide any `videoFilters`.
332
331```js 333```js
332async function register ({ 334async function register ({
333 transcodingManager 335 transcodingManager
@@ -341,8 +343,12 @@ async function register ({
341 const streamString = streamNum ? ':' + streamNum : '' 343 const streamString = streamNum ? ':' + streamNum : ''
342 344
343 // You can also return a promise 345 // You can also return a promise
346 // All these options are optional and defaults to []
344 return { 347 return {
345 inputOptions: [], 348 inputOptions: [],
349 videoFilters: [
350 'vflip' // flip the video vertically
351 ],
346 outputOptions: [ 352 outputOptions: [
347 // Use a custom bitrate 353 // Use a custom bitrate
348 '-b' + streamString + ' 10K' 354 '-b' + streamString + ' 10K'
@@ -358,6 +364,7 @@ async function register ({
358 364
359 // And/Or support this profile for live transcoding 365 // And/Or support this profile for live transcoding
360 transcodingManager.addLiveProfile(encoder, profileName, builder) 366 transcodingManager.addLiveProfile(encoder, profileName, builder)
367 // Note: this profile will fail for live transcode because it specifies videoFilters
361 } 368 }
362 369
363 { 370 {
@@ -394,6 +401,7 @@ async function register ({
394 const builder = () => { 401 const builder = () => {
395 return { 402 return {
396 inputOptions: [], 403 inputOptions: [],
404 videoFilters: [],
397 outputOptions: [] 405 outputOptions: []
398 } 406 }
399 } 407 }
@@ -413,6 +421,9 @@ async function register ({
413 } 421 }
414``` 422```
415 423
424During live transcode input options are applied once for each target resolution.
425Plugins are responsible for detecting such situation and applying input options only once if necessary.
426
416### Helpers 427### Helpers
417 428
418PeerTube provides your plugin some helpers. For example: 429PeerTube provides your plugin some helpers. For example: