Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rust-av/rav1e_js

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rav1e_js

The slowest and most dangerous AV1 encoder of the web.

About

rav1e_js aims to bring the power of rav1e to the web!

Usage

Api

  1. Clone + enter the repository
    git clone https://github.com/rust-av/rav1e_js
    cd rav1e_js
  2. Install wasm-pack
    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
  3. Build package
    # Build (emits wasm-, js/ts-files to pkg/)
    wasm-pack build
  4. Add file dependency to package.json
    {
        // ...
        "dependencies": {
            "rav1e": "file:path/to/pkg",
            // ...
        },
        // ...
    }
  5. Use it in your project:
    import { ChromaSampling, EncoderConfig, VideoEncoder } from "rav1e";
    
    // ...

Example Website

Run rebuild.sh:

bash rebuild.sh

or run:

wasm-pack build

cd www/
npm install
npm start
# website served at localhost:3000

Please first enter the developer console and then start playing the video. You should see logging about the data collection and encoding.

Note!: This can take quite a while.

If it doesn't start, please try:

  1. reload the webpage

Testing

# test in browser
wasm-pack test --headless --[firefox, chrome, safari]

# test in node
wasm-pack test --node

About

rav1e js/wasm bindings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.