FFMPEG webgpu adapter

Contribution Project

Working on making a hw context to add webgpu functionality to ffmpeg to expand ffmpeg wasm compile

Description

This project introduces a WebGPU-backed hardware context for FFmpeg, enabling GPU-accelerated video processing when FFmpeg is compiled to WebAssembly.

Currently, ffmpeg.wasm runs entirely on the CPU, making in-browser transcoding, filtering, and scaling slow and impractical. By implementing a new hwcontext_webgpu backend inside FFmpeg, this project allows video frames to be allocated and processed directly on the GPU using WebGPU compute shaders.

The backend integrates with FFmpeg’s hardware abstraction layer (AVHWDeviceContext, AVHWFramesContext) and enables GPU-accelerated filter graphs in the browser — such as scaling, color conversion, and real-time effects.

This bridges native multimedia performance with the open web stack (WebAssembly + WebGPU), unlocking high-performance client-side video processing for browser-based editors, streaming tools, and decentralized media applications.

Issues & Pull Requests Thread