Giter Site home page Giter Site logo

libav.wasm's Introduction

libav.wasm

stability-wip Build libav.wasm GitHub commit activity

libav WebAssembly port.

Background

libav (incl. libavcodec, libavformat, โ€ฆ) is the library behind FFmpeg to record, convert and stream audio and video. This repository aims to port libav to WebAssembly to allow users edit video and audio directly inside the browser.

Why not ffmpeg.wasm?

ffmpeg.wasm ports FFmpeg to WebAssembly using a more coarse-grained approach (you can imagine ffmpeg.wasm as an extremely large function, once it starts to run, there isn't much you can control.), it works but also suffers from the isolation of C and JavaScript world which makes it hard to develop and improve.

The ultimate goal of libav.wasm is to enable a ffmpeg.wasm with better developer experience (DX) and potentially be the foundation to fix issues like performance and more.

Get Started

We use docker to achieve a (hopefully) cached and reproducible build, so it is required to install docker 19.03 or above before you run any build script.

  • Build libav.wasm
# default build
$ bash build.sh

# build with details
$ bash build.sh --progress plain

If nothing went wrong, you should find libav assets in dist/.

Try it

A few examples can be found in example/, feel free to try and see how it works in action.

As these examples use video files in testdata/, you need to do a git submodule update --init first

  • metadata: use libav.wasm to extra video metadata
make run-metadata
  • transcode: use libav.wasm to transcode mp4 to a gop fixed mp4
make run-transcode

Configuration

libav.wasm is built using tools/libraries with version:

Name Version
emsdk 3.1.18
FFmpeg n5.1
x264 0.160.x

libav.wasm's People

Contributors

jeromewu avatar

Watchers

 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.