MP4
++
+
MP4
An output type that allows saving video and audio from the compositor to MP4 file.
Mp4Output
type Mp4Output = {
path: string;
video?: OutputVideoOptions;
audio?: OutputMp4AudioOptions;
}
From 4388f0675cf08d08d159082c196657f626ff8780 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:46:19 +0000 Subject: [PATCH] deploy: 1379cce4ee74a0e3ff69ee03b732123431b616d9 --- 404.html | 2 +- assets/js/{8b6aa7f8.4c845e76.js => 8b6aa7f8.79b22697.js} | 2 +- assets/js/{935f2afb.ad0f012a.js => 935f2afb.a500497b.js} | 2 +- ...runtime~main.96f480b1.js => runtime~main.03d4f7b6.js} | 2 +- docs/api/components/Image.html | 2 +- docs/api/components/InputStream.html | 2 +- docs/api/components/Rescaler.html | 2 +- docs/api/components/Shader.html | 2 +- docs/api/components/Text.html | 2 +- docs/api/components/Tiles.html | 2 +- docs/api/components/View.html | 2 +- docs/api/components/WebView.html | 2 +- docs/api/events.html | 2 +- docs/api/generated/component-Image.html | 2 +- docs/api/generated/component-InputStream.html | 2 +- docs/api/generated/component-Rescaler.html | 2 +- docs/api/generated/component-Shader.html | 2 +- docs/api/generated/component-Text.html | 2 +- docs/api/generated/component-Tiles.html | 2 +- docs/api/generated/component-View.html | 2 +- docs/api/generated/component-WebView.html | 2 +- docs/api/generated/output-Mp4Output.html | 2 +- docs/api/generated/output-RtpOutputStream.html | 2 +- docs/api/generated/renderer-DeckLink.html | 2 +- docs/api/generated/renderer-Image.html | 2 +- docs/api/generated/renderer-Mp4Input.html | 2 +- docs/api/generated/renderer-RtpInputStream.html | 2 +- docs/api/generated/renderer-Shader.html | 2 +- docs/api/generated/renderer-WebRenderer.html | 2 +- docs/api/inputs/decklink.html | 2 +- docs/api/inputs/mp4.html | 2 +- docs/api/inputs/rtp.html | 2 +- docs/api/outputs/mp4.html | 9 ++++++--- docs/api/outputs/rtp.html | 2 +- docs/api/renderers/image.html | 2 +- docs/api/renderers/shader.html | 2 +- docs/api/renderers/web.html | 2 +- docs/api/routes.html | 2 +- docs/category/api-reference.html | 2 +- docs/category/guides.html | 2 +- docs/common/absolute-position.html | 2 +- docs/concept/component.html | 2 +- docs/concept/layouts.html | 2 +- docs/concept/overview.html | 2 +- docs/concept/shaders.html | 2 +- docs/concept/web.html | 2 +- docs/deployment/aws-ec2.html | 2 +- docs/deployment/configuration.html | 2 +- docs/deployment/overview.html | 2 +- docs/deployment/requirements.html | 2 +- docs/guides/deliver-input.html | 2 +- docs/guides/receive-output.html | 2 +- docs/guides/simple-scene.html | 2 +- docs/guides/view-transition.html | 2 +- docs/intro.html | 2 +- index.html | 2 +- search.html | 2 +- 57 files changed, 62 insertions(+), 59 deletions(-) rename assets/js/{8b6aa7f8.4c845e76.js => 8b6aa7f8.79b22697.js} (86%) rename assets/js/{935f2afb.ad0f012a.js => 935f2afb.a500497b.js} (68%) rename assets/js/{runtime~main.96f480b1.js => runtime~main.03d4f7b6.js} (98%) diff --git a/404.html b/404.html index 128e6e2e4..420b513d0 100644 --- a/404.html +++ b/404.html @@ -10,7 +10,7 @@ - +
diff --git a/assets/js/8b6aa7f8.4c845e76.js b/assets/js/8b6aa7f8.79b22697.js similarity index 86% rename from assets/js/8b6aa7f8.4c845e76.js rename to assets/js/8b6aa7f8.79b22697.js index 4e4d5f00d..de0c7f956 100644 --- a/assets/js/8b6aa7f8.4c845e76.js +++ b/assets/js/8b6aa7f8.79b22697.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcompositor_live=self.webpackChunkcompositor_live||[]).push([[1182,1897],{7786:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>r,default:()=>c,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var i=t(5893),s=t(1151);const o={},r=void 0,d={id:"api/generated/output-Mp4Output",title:"output-Mp4Output",description:"Mp4Output",source:"@site/pages/api/generated/output-Mp4Output.md",sourceDirName:"api/generated",slug:"/api/generated/output-Mp4Output",permalink:"/docs/api/generated/output-Mp4Output",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{}},p={},l=[{value:"Mp4Output",id:"mp4output",level:2},{value:"Properties",id:"properties",level:4},{value:"OutputVideoOptions",id:"outputvideooptions",level:2},{value:"Properties",id:"properties-1",level:4},{value:"OutputMp4AudioOptions",id:"outputmp4audiooptions",level:2},{value:"Properties",id:"properties-2",level:4},{value:"OutputEndCondition",id:"outputendcondition",level:2},{value:"Properties",id:"properties-3",level:4},{value:"VideoEncoderOptions",id:"videoencoderoptions",level:2},{value:"Properties (type: "ffmpeg_h264"
)",id:"properties-type-ffmpeg_h264",level:4},{value:"Mp4AudioEncoderOptions",id:"mp4audioencoderoptions",level:2},{value:"InputAudio",id:"inputaudio",level:2},{value:"Properties",id:"properties-4",level:4}];function u(e){const n={a:"a",code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"mp4output",children:"Mp4Output"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"type Mp4Output = {\n path: string;\n video?: OutputVideoOptions;\n audio?: OutputMp4AudioOptions;\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"properties",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"path"})," - Path to output MP4 file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"video"})," - Video track configuration."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"audio"})," - Audio track configuration."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"outputvideooptions",children:"OutputVideoOptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"type OutputVideoOptions = {\n resolution: {\n width: u32;\n height: u32;\n };\n send_eos_when?: OutputEndCondition;\n encoder: VideoEncoderOptions;\n initial: { root: Component; };\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"properties-1",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"resolution"})," - Output resolution in pixels."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"send_eos_when"})," - Defines when output stream should end if some of the input streams are finished. If output includes both audio and video streams, then EOS needs to be sent on both."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"encoder"})," - Video encoder options."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"initial"})," - Root of a component tree/scene that should be rendered for the output. Use ",(0,i.jsxs)(n.a,{href:"/docs/api/routes#update-output",children:[(0,i.jsx)(n.code,{children:"update_output"})," request"]})," to update this value after registration. ",(0,i.jsx)(n.a,{href:"/docs/concept/component",children:"Learn more"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"outputmp4audiooptions",children:"OutputMp4AudioOptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'type OutputMp4AudioOptions = {\n mixing_strategy?: "sum_clip" | "sum_scale";\n send_eos_when?: OutputEndCondition;\n encoder: Mp4AudioEncoderOptions;\n initial: { inputs: InputAudio[]; };\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"properties-2",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mixing_strategy"})," - (",(0,i.jsx)(n.strong,{children:'default="sum_clip"'}),") Specifies how audio should be mixed.","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"sum_clip"'})," - Firstly, input samples are summed. If the result is outside the i16 PCM range, it gets clipped."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"sum_scale"'})," - Firstly, input samples are summed. If the result is outside the i16 PCM range,\nnearby summed samples are scaled down by factor, such that the summed wave is in the i16 PCM range."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"send_eos_when"})," - Condition for termination of output stream based on the input streams states."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"encoder"})," - Audio encoder options."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"initial"})," - Initial audio mixer configuration for output."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"outputendcondition",children:"OutputEndCondition"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"type OutputEndCondition = {\n any_of?: string[];\n all_of?: string[];\n any_input?: bool;\n all_inputs?: bool;\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"This type defines when end of an input stream should trigger end of the output stream. Only one of those fields can be set at the time.\nUnless specified otherwise the input stream is considered finished/ended when:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"TCP connection was dropped/closed."}),"\n",(0,i.jsxs)(n.li,{children:["RTCP Goodbye packet (",(0,i.jsx)(n.code,{children:"BYE"}),") was received."]}),"\n",(0,i.jsx)(n.li,{children:"Mp4 track has ended."}),"\n",(0,i.jsx)(n.li,{children:"Input was unregistered already (or never registered)."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"properties-3",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"any_of"})," - Terminate output stream if any of the input streams from the list are finished."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"all_of"})," - Terminate output stream if all the input streams from the list are finished."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"any_input"})," - Terminate output stream if any of the input streams ends. This includes streams added after the output was registered. In particular, output stream will ",(0,i.jsx)(n.strong,{children:"not be"})," terminated if no inputs were ever connected."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"all_inputs"})," - Terminate output stream if all the input streams finish. In particular, output stream will ",(0,i.jsx)(n.strong,{children:"be"})," terminated if no inputs were ever connected."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"videoencoderoptions",children:"VideoEncoderOptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'type VideoEncoderOptions = \n | {\n type: "ffmpeg_h264";\n preset: \n | "ultrafast"\n | "superfast"\n | "veryfast"\n | "faster"\n | "fast"\n | "medium"\n | "slow"\n | "slower"\n | "veryslow"\n | "placebo";\n ffmpeg_options?: Maptype: "ffmpeg_h264"
)",id:"properties-type-ffmpeg_h264",level:4},{value:"Mp4AudioEncoderOptions",id:"mp4audioencoderoptions",level:2},{value:"InputAudio",id:"inputaudio",level:2},{value:"Properties",id:"properties-4",level:4}];function u(e){const n={a:"a",code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"mp4output",children:"Mp4Output"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"type Mp4Output = {\n path: string;\n video?: OutputVideoOptions;\n audio?: OutputMp4AudioOptions;\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"properties",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"path"})," - Path to output MP4 file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"video"})," - Video track configuration."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"audio"})," - Audio track configuration."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"outputvideooptions",children:"OutputVideoOptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"type OutputVideoOptions = {\n resolution: {\n width: u32;\n height: u32;\n };\n send_eos_when?: OutputEndCondition;\n encoder: VideoEncoderOptions;\n initial: { root: Component; };\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"properties-1",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"resolution"})," - Output resolution in pixels."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"send_eos_when"})," - Defines when output stream should end if some of the input streams are finished. If output includes both audio and video streams, then EOS needs to be sent on both."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"encoder"})," - Video encoder options."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"initial"})," - Root of a component tree/scene that should be rendered for the output. Use ",(0,i.jsxs)(n.a,{href:"/docs/api/routes#update-output",children:[(0,i.jsx)(n.code,{children:"update_output"})," request"]})," to update this value after registration. ",(0,i.jsx)(n.a,{href:"/docs/concept/component",children:"Learn more"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"outputmp4audiooptions",children:"OutputMp4AudioOptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'type OutputMp4AudioOptions = {\n mixing_strategy?: "sum_clip" | "sum_scale";\n send_eos_when?: OutputEndCondition;\n encoder: Mp4AudioEncoderOptions;\n initial: { inputs: InputAudio[]; };\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"properties-2",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mixing_strategy"})," - (",(0,i.jsx)(n.strong,{children:'default="sum_clip"'}),") Specifies how audio should be mixed.","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"sum_clip"'})," - Firstly, input samples are summed. If the result is outside the i16 PCM range, it gets clipped."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"sum_scale"'})," - Firstly, input samples are summed. If the result is outside the i16 PCM range,\nnearby summed samples are scaled down by factor, such that the summed wave is in the i16 PCM range."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"send_eos_when"})," - Condition for termination of output stream based on the input streams states."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"encoder"})," - Audio encoder options."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"initial"})," - Initial audio mixer configuration for output."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"outputendcondition",children:"OutputEndCondition"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"type OutputEndCondition = {\n any_of?: string[];\n all_of?: string[];\n any_input?: bool;\n all_inputs?: bool;\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"This type defines when end of an input stream should trigger end of the output stream. Only one of those fields can be set at the time.\nUnless specified otherwise the input stream is considered finished/ended when:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"TCP connection was dropped/closed."}),"\n",(0,i.jsxs)(n.li,{children:["RTCP Goodbye packet (",(0,i.jsx)(n.code,{children:"BYE"}),") was received."]}),"\n",(0,i.jsx)(n.li,{children:"Mp4 track has ended."}),"\n",(0,i.jsx)(n.li,{children:"Input was unregistered already (or never registered)."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"properties-3",children:"Properties"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"any_of"})," - Terminate output stream if any of the input streams from the list are finished."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"all_of"})," - Terminate output stream if all the input streams from the list are finished."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"any_input"})," - Terminate output stream if any of the input streams ends. This includes streams added after the output was registered. In particular, output stream will ",(0,i.jsx)(n.strong,{children:"not be"})," terminated if no inputs were ever connected."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"all_inputs"})," - Terminate output stream if all the input streams finish. In particular, output stream will ",(0,i.jsx)(n.strong,{children:"be"})," terminated if no inputs were ever connected."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"videoencoderoptions",children:"VideoEncoderOptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'type VideoEncoderOptions = \n | {\n type: "ffmpeg_h264";\n preset: \n | "ultrafast"\n | "superfast"\n | "veryfast"\n | "faster"\n | "fast"\n | "medium"\n | "slow"\n | "slower"\n | "veryslow"\n | "placebo";\n ffmpeg_options?: MapAn output type that allows saving video and audio from the compositor to MP4 file.
type Mp4Output = {
path: string;
video?: OutputVideoOptions;
audio?: OutputMp4AudioOptions;
}