ActivityPub-federated video streaming platform using P2P directly in your web browser
improve documentation plugin-transcode
Théo Le Calvard5fc35c24d49
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.mdindex 18e962c10f..331813e4f5 100644--- a/support/doc/plugins/guide.md+++ b/support/doc/plugins/guide.md@@ -328,6 +328,8 @@ function register (...) {Adding transcoding profiles allow admins to change ffmpeg encoding parameters and/or encoders.A transcoding profile has to be chosen by the admin of the instance using the admin configuration.+Transcoding profiles used for live transcoding must not provide any `videoFilters`.+```jsasync function register ({transcodingManager@@ -341,8 +343,12 @@ async function register ({const streamString = streamNum ? ':' + streamNum : ''// You can also return a promise+ // All these options are optional and defaults to []return {inputOptions: [],+ videoFilters: [+ 'vflip' // flip the video vertically+ ],outputOptions: [// Use a custom bitrate'-b' + streamString + ' 10K'@@ -358,6 +364,7 @@ async function register ({// And/Or support this profile for live transcodingtranscodingManager.addLiveProfile(encoder, profileName, builder)+ // Note: this profile will fail for live transcode because it specifies videoFilters}{@@ -394,6 +401,7 @@ async function register ({const builder = () => {return {inputOptions: [],+ videoFilters: [],outputOptions: []}}@@ -413,6 +421,9 @@ async function register ({}```+During live transcode input options are applied once for each target resolution.+Plugins are responsible for detecting such situation and applying input options only once if necessary.+### HelpersPeerTube provides your plugin some helpers. For example: