Giter Club home page Giter Club logo

ffmpeg-web-console-alv's Introduction

A browser based terminal to run ffmpeg with web assembly. [ Experimental ]

Usage

Demo

You can run most of the ffmpeg commands on the web terminal.

Since there is no filesystem, the terminal will pick up the uploaded files from the File System section (see image below). By default it has some files which you can process, you can also upload your own files from your system (uploaded files are not actually uploaded to any server). The processed files will appear in the Generated Files section

File System

Setup Locally

Note: Make sure you have nodeJS v14+ installed.

Clone this repo

git clone https://github.com/huzaifa-99/ffmpeg-web

Cd into the cloned folder

cd ffmpeg-web

Install dependencies

yarn install
# or
npm install

Run the dev server

yarn dev
# or
npm run dev

Disclosure

  • This is an experiment of using ffmpeg with web assembly on a web based terminal just like done on a native cli.
  • It uses ffmpeg web assembly (ffmpegwasm/ffmpeg.wasm) which requires SharedArrayBuffer to work. SharedArrayBuffer is disabled in most browsers from 2018 due to Spectre vulnerability. These headers are sent from the server to enable SharedArrayBuffer.
Cross-Origin-Opener-Policy=same-origin // prevent XS-leaks, don't load cross origin documents in the same browsing context

Cross-Origin-Embedder-Policy=require-corp // prevent docs from loading cross-origin resource, only load resources from the same origin
  • It loads ffmpeg web assembly file from the same origin (only tested on chrome desktop v103)
  • For best results please only process files with size less than 1GB. You can go up to 2 GB, which is a hard limit in WebAssembly, going beyond that might break things.
  • On first page load, it pulls ffmpeg web assembly from server (size ~25MB) which might make things slow and caches it (next page loads are faster).

ffmpeg-web-console-alv's People

Contributors

huzaifa-99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.