@remotion/webcodecs
从 v4.0.229 起可用
🌐 available from v4.0.229
此软件包提供在浏览器中转换视频的 API。它利用 @remotion/media-parser 来解析视频和音频数据,然后使用 WebCodecs API 编码视频。
🌐 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.
你可以用这个包做什么?
🌐 What can you do with this package?
在实现了 WebCodecs 的浏览器中,你可以使用此软件包来:
🌐 In browsers that implement WebCodecs, you can use this package to:
- 将视频从一种格式转换为另一种格式(从 .mp4、.webm、.mov、.mkv、.m3u8、.ts、.avi、.mp3、.flac、.wav、.m4a、.aac 转换为 .mp4、.webm、.wav)
- 旋转视频
- 高效地从视频中提取帧
- 从视频中提取音频
- 操控视频的像素
- 修复使用
MediaRecorder录制的视频 - 即将推出:压缩、剪辑、裁剪视频
它快吗?
🌐 Is it fast?
与利用 WebAssembly 的解决方案不同,WebCodecs 可以完全访问 GPU 加速。你可以期待比在线转换器或基于 WebAssembly 的处理速度快得多的处理速度。
🌐 Unlike solutions which leverage WebAssembly, WebCodecs have full access to GPU acceleration.
You can expect vastly faster processing than with online converters or WebAssembly-based processing.
在这里查看 比较。
🌐 See a comparison here.
💼 许可证免责声明
🌐 💼 License Disclaimer
We consider a team of 4 or more people a "company".
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.🚧 不稳定的 API 警告
🌐 🚧 Unstable API Warning
We might change the API at any time, until we remove this notice.
安装
🌐 Installation
- Remotion CLI
- npm
- bun
- pnpm
- yarn
npx remotion add @remotion/webcodecs
This assumes you are currently using v4.0.431 of Remotion.npm i --save-exact @remotion/webcodecs@4.0.431
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.This assumes you are currently using v4.0.431 of Remotion.pnpm i @remotion/webcodecs@4.0.431
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.This assumes you are currently using v4.0.431 of Remotion.bun i @remotion/webcodecs@4.0.431
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.This assumes you are currently using v4.0.431 of Remotion.yarn --exact add @remotion/webcodecs@4.0.431
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.指南
🌐 Guide
应用接口
🌐 APIs
以下 API 可用:
🌐 The following APIs are available:
@remotion/webcodecs supports.AudioData object.AudioDecoder object.VideoDecoder object.