webFsWriter
💼 Important 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.
warning
Unstable API: The writer interface is experimental. The API may change in the future.
A writer for @remotion/webcodecs
that writes to the browser's file system using the File System Access API.
Can be used for convertMedia()
to write the converted output directly to a temporary file in the browser's origin-private file system.
Availability​
This writer is only available in browsers that support the File System Access API. Use canUseWebFsWriter()
to check if it's available.
Example​
Using webFsWritertsx
import {convertMedia } from '@remotion/webcodecs';import {webFsWriter } from '@remotion/webcodecs/web-fs';Âconstresult = awaitconvertMedia ({src : 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',container : 'webm',writer :webFsWriter ,});Âconstblob = awaitresult .save ();
canUseWebFsWriter()​
A function that returns a Promise<boolean>
indicating whether the webFsWriter
can be used in the current environment.
Checking availabilitytsx
import {canUseWebFsWriter ,webFsWriter } from '@remotion/webcodecs/web-fs';ÂconstcanUse = awaitcanUseWebFsWriter ();if (canUse ) {// Use webFsWriter} else {// Fall back to bufferWriter or another writer}
See also​
- Source code for this function
bufferWriter
- Alternative in-memory writerconvertMedia()