1"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([["2789"],{74188(e,c,d){d.r(c),d.d(c,{metadata:()=>n,default:()=>h,frontMatter:()=>o,contentTitle:()=>l,toc:()=>t,assets:()=>s});var n=JSON.parse('{"id":"reference/track-conversion","title":"Track / Conversion","description":"Produce mono audio by taking the mean of all audio channels.","source":"@site/docs/reference/track-conversion.md","sourceDirName":"reference","slug":"/reference/track-conversion","permalink":"/doc-dev/reference/track-conversion","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Track / Conversion","description":"Produce mono audio by taking the mean of all audio channels."}}'),r=d(74848),i=d(28453);let o={title:"Track / Conversion",description:"Produce mono audio by taking the mean of all audio channels."},l,s={},t=[{value:"<code>track.audio.mean</code>",id:"track.audio.mean",level:3},{value:"<code>track.audio.stereo</code>",id:"track.audio.stereo",level:3},{value:"<code>track.audio.swap</code>",id:"track.audio.swap",level:3},{value:"<code>track.ffmpeg.decode.audio</code>",id:"track.ffmpeg.decode.audio",level:3},{value:"<code>track.ffmpeg.decode.video</code>",id:"track.ffmpeg.decode.video",level:3},{value:"<code>track.ffmpeg.encode.audio</code>",id:"track.ffmpeg.encode.audio",level:3},{value:"<code>track.ffmpeg.encode.video</code>",id:"track.ffmpeg.encode.video",level:3},{value:"<code>track.ffmpeg.raw.decode.audio</code>",id:"track.ffmpeg.raw.decode.audio",level:3},{value:"<code>track.ffmpeg.raw.decode.video</code>",id:"track.ffmpeg.raw.decode.video",level:3},{value:"<code>track.ffmpeg.raw.encode.audio</code>",id:"track.ffmpeg.raw.encode.audio",level:3},{value:"<code>track.ffmpeg.raw.encode.video</code>",id:"track.ffmpeg.raw.encode.video",level:3}];function a(e){let c={code:"code",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.h3,{id:"track.audio.mean",children:(0,r.jsx)(c.code,{children:"track.audio.mean"})}),"\n",(0,r.jsx)(c.p,{children:"Produce mono audio by taking the mean of all audio channels."}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, ?normalize : bool, pcm('a)) -> pcm(mono)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"normalize"})," (of type ",(0,r.jsx)(c.code,{children:"bool"}),", which defaults to ",(0,r.jsx)(c.code,{children:"true"}),"): Divide the output volume by the number of channels."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"pcm('a)"}),"): Track whose mean should be computed."]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.audio.stereo",children:(0,r.jsx)(c.code,{children:"track.audio.stereo"})}),"\n",(0,r.jsx)(c.p,{children:"Convert any pcm audio track into a stereo track."}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, pcm('a)) -> pcm(stereo)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"pcm('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.audio.swap",children:(0,r.jsx)(c.code,{children:"track.audio.swap"})}),"\n",(0,r.jsx)(c.p,{children:"Swap two channels of a stereo track."}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, pcm(stereo)) -> pcm(stereo)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"pcm(stereo)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.decode.audio",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.decode.audio"})}),"\n",(0,r.jsx)(c.p,{children:"Decode a track content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, ffmpeg.copy('a)) -> pcm('b)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"ffmpeg.copy('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.decode.video",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.decode.video"})}),"\n",(0,r.jsx)(c.p,{children:"Decode a track content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, ffmpeg.copy('a)) -> yuv420p('b)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"ffmpeg.copy('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.encode.audio",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.encode.audio"})}),"\n",(0,r.jsx)(c.p,{children:"Convert a track's content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, format(audio=pcm('a), 'b), pcm('a)) -> ffmpeg.copy('c)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"format(audio=pcm('a), 'b)"}),"): Encoding format."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"pcm('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.encode.video",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.encode.video"})}),"\n",(0,r.jsx)(c.p,{children:"Convert a track's content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, format(video=yuv420p('a), 'b), yuv420p('a)) ->\nffmpeg.copy('c)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"format(video=yuv420p('a), 'b)"}),"): Encoding format."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"yuv420p('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.raw.decode.audio",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.raw.decode.audio"})}),"\n",(0,r.jsx)(c.p,{children:"Decode a track content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, ffmpeg.audio.raw('a))
1-> pcm('b)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"ffmpeg.audio.raw('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.raw.decode.video",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.raw.decode.video"})}),"\n",(0,r.jsx)(c.p,{children:"Decode a track content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, ffmpeg.video.raw('a)) -> yuv420p('b)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"ffmpeg.video.raw('a)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.raw.encode.audio",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.raw.encode.audio"})}),"\n",(0,r.jsx)(c.p,{children:"Convert a track's content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, format(audio=ffmpeg.audio.raw('a), 'b), pcm('c)) ->\nffmpeg.audio.raw('a)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"format(audio=ffmpeg.audio.raw('a), 'b)"}),"): Encoding format."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"pcm('c)"}),")"]}),"\n"]}),"\n",(0,r.jsx)(c.h3,{id:"track.ffmpeg.raw.encode.video",children:(0,r.jsx)(c.code,{children:"track.ffmpeg.raw.encode.video"})}),"\n",(0,r.jsx)(c.p,{children:"Convert a track's content"}),"\n",(0,r.jsx)(c.p,{children:"Type:"}),"\n",(0,r.jsx)(c.pre,{children:(0,r.jsx)(c.code,{children:"(?id : string?, format(video=ffmpeg.video.raw('a), 'b), yuv420p('c)) ->\nffmpeg.video.raw('a)\n"})}),"\n",(0,r.jsx)(c.p,{children:"Arguments:"}),"\n",(0,r.jsxs)(c.ul,{children:["\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"id"})," (of type ",(0,r.jsx)(c.code,{children:"string?"}),", which defaults to ",(0,r.jsx)(c.code,{children:"null"}),"): Force the value of the track ID."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"format(video=ffmpeg.video.raw('a), 'b)"}),"): Encoding format."]}),"\n",(0,r.jsxs)(c.li,{children:[(0,r.jsx)(c.code,{children:"(unlabeled)"})," (of type ",(0,r.jsx)(c.code,{children:"yuv420p('c)"}),")"]}),"\n"]})]})}function h(e={}){let{wrapper:c}={...(0,i.R)(),...e.components};return c?(0,r.jsx)(c,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},28453(e,c,d){d.d(c,{R:()=>o,x:()=>l});var n=d(96540);let r={},i=n.createContext(r);function o(e){let c=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(c):{...c,...e}},[c,e])}function l(e){let c;return c=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:c},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.