Skip to content
ourkkPublic

About

Crop and trim video directly in the browser with ffmpeg.wasm

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

crop

Crop and trim video directly in the browser. Built with React and ffmpeg.wasm

Live demo

  • ✔️ Crop and trim timeline in-browser
  • ✔️ No watermarks
  • ✔️ Your video files stay on your computer

Building

Install the project with bun install or bun install.

Run the development server with:

bun run dev

Create a production build with:

bun run build:dist

If you prefer Bun, use bun run dev and bun run build:dist.

Environment Variables

Create .env from .env.example when you want to override defaults:

cp .env.example .env

VITE_ENABLE_MT=1 enables multi-core ffmpeg.wasm when SharedArrayBuffer is available.

Multi-core ffmpeg.wasm

To enable multi-core ffmpeg.wasm, SharedArrayBuffer needs to be available and env variable VITE_ENABLE_MT needs to equal 1.

This is a work-in-progress feature and it may not work as expected.

Nginx:

server {
  # ...
  add_header Cross-Origin-Embedder-Policy 'require-corp';
	add_header Cross-Origin-Opener-Policy 'same-origin';
  # ...
}

See: https://developer.chrome.com/blog/enabling-shared-array-buffer/

About

Crop and trim video directly in the browser with ffmpeg.wasm

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages