
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@diffusionstudio/core
Advanced tools
@diffusionstudio/core
is a 2D motion graphics and video rendering engine powered by WebCodecs. Developers commonly use it for video editing automations and to build editing playgrounds/web apps.
Explore the full documentation at docs.diffusion.studio.
This project owes much to @Vanilagy's exceptional muxer implementations.
💻 100% client-side
🪽 Small bundle size – Only 75 KB with a single dependency
🩸 Blazingly fast WebCodecs renderer
🦾 AI-first architecture
npm install @diffusionstudio/core
Here’s an example of how to use the library:
import * as core from '@diffusionstudio/core';
const url = 'https://diffusion-studio-public.s3.eu-central-1.amazonaws.com/videos/big_buck_bunny_1080p_30fps.mp4';
// create a video clip and trim it
const video = new core.VideoClip(url).subclip(0, '10s');
// create a text clip and add styles
const text = new core.TextClip({
text: 'Bunny - Our Brave Hero',
position: 'center',
duration: '5s',
stroke: { color: '#000000' }
});
const composition = new core.Composition(); // 1920x1080
// this is how to compose your clips
await composition.add(video); // convenience function for
await composition.add(text); // clip -> layer -> composition
await new core.Encoder(composition).render('hello_world.mp4');
The API models the structure of conventional video editing applications like Adobe Premiere or CapCut, using a layer-based system. Each layer contains zero or more clips of a single type, arranged in ascending chronological order.
Layers are created implicitly with composition.add(clip)
, but you can also create them manually:
const layer = composition.createLayer();
await layer.add(text0);
await layer.add(text1);
await layer.add(text2);
...
Find more examples here., or test all capabilities on our Playground.
https://github.com/user-attachments/assets/7a943407-e916-4d9f-b46a-3163dbff44c3
A React-based video creation tool that converts the DOM into videos. It’s beginner-friendly, allowing web developers to leverage their existing skills.
A standalone editor designed for high-quality animations. It features an imperative API, adding elements procedurally rather than relying on keyframes, making it ideal for detailed animations.
A video editing library rather than a framework with a visual interface. It’s lightweight, operates entirely on the client-side, and supports WebCodecs without relying on WebAssembly/ffmpeg. Ideal for integration into existing projects.
Currently, version ^2.0.0 is invite-only. You can request access on our Discord if you're interested in contributing. The source code for version ^1.0.0 is available in this repository.
'clamp' | 'extend'
This project was initiated in March 2023 with the mission of creating a “video processing toolkit for the era of AI.” As someone passionate about video editing for over a decade, the release of WebCodecs and WebGPU without feature flags in Chrome presented the perfect opportunity to build something new.
Traditional browser-based video editors rely on server-side rendering, requiring time-consuming uploads and downloads of large files. With WebCodecs, video processing can now be done directly in the browser, making it significantly faster and more efficient.
I’m excited to contribute to the next generation of video editing technology.
This library is free to use under the Diffusion Studio Non-Commercial License, as long as your project is not monetized.
For any questions, feel free to contact us.
FAQs
2D motion graphics and video rendering engine
The npm package @diffusionstudio/core receives a total of 985 weekly downloads. As such, @diffusionstudio/core popularity was classified as not popular.
We found that @diffusionstudio/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.