@remotion/webcodecs
available from v4.0.229
This package provides APIs for converting videos in the browser.
It leverages @remotion/media-parser
to parse the video and audio data, and then uses the WebCodecs API to encode the video.
💼 License Disclaimer​
This package is licensed under the Remotion License.
We consider a team of 4 or more people a "company".
We consider a team of 4 or more people a "company".
For "companies": A Remotion Company license needs to be obtained to use this package.
In a future version of
In a future version of
@remotion/webcodecs
, this package will also require the purchase of a newly created "WebCodecs Conversion Seat". Get in touch with us if you are planning to use this package.For individuals and teams up to 3: You can use this package for free.
This is a short, non-binding explanation of our license. See the License itself for more details.
🚧 Unstable API Warning​
This package is experimental.
We might change the API at any time, until we remove this notice.
We might change the API at any time, until we remove this notice.
Installation​
- npm
- yarn
- pnpm
- bun
npm i --save-exact @remotion/webcodecs@4.0.231
npm i --save-exact @remotion/webcodecs@4.0.231
pnpm i @remotion/webcodecs@4.0.231
pnpm i @remotion/webcodecs@4.0.231
bun i @remotion/webcodecs@4.0.231
bun i @remotion/webcodecs@4.0.231
yarn --exact add @remotion/webcodecs@4.0.231
yarn --exact add @remotion/webcodecs@4.0.231
Also update
remotion
and all `@remotion/*`
packages to the same version.Remove all
^
character in front of the version numbers of it as it can lead to a version conflict.APIs​
The following APIs are available:
convertMedia()
Converts a video using WebCodecs and Media Parser
canReencodeVideoTrack()
Determine if a video track can be re-encoded
canReencodeAudioTrack()
Determine if a audio track can be re-encoded
canCopyVideoTrack()
Determine if a video track can be copied without re-encoding
canCopyAudioTrack()
Determine if a audio track can be copied without re-encoding
getDefaultAudioCodec()
Gets the default audio codec for a container if no other audio codec is specified.
getDefaultVideoCodec()
Gets the default video codec for a container if no other audio codec is specified.
defaultOnAudioTrackHandler()
The default track transformation function for audio tracks.
defaultOnVideoTrackHandler()
The default track transformation function for video tracks.