{"id":21076211,"url":"https://github.com/rust-av/rav1e_js","last_synced_at":"2025-03-14T03:43:23.694Z","repository":{"id":54863189,"uuid":"325527741","full_name":"rust-av/rav1e_js","owner":"rust-av","description":"rav1e js/wasm bindings","archived":false,"fork":false,"pushed_at":"2021-01-25T07:56:07.000Z","size":2172,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-20T22:52:52.425Z","etag":null,"topics":["av1","rav1e"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-av.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-30T11:01:53.000Z","updated_at":"2023-11-06T11:57:39.000Z","dependencies_parsed_at":"2022-08-14T05:01:08.650Z","dependency_job_id":null,"html_url":"https://github.com/rust-av/rav1e_js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Frav1e_js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Frav1e_js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Frav1e_js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Frav1e_js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-av","download_url":"https://codeload.github.com/rust-av/rav1e_js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243521249,"owners_count":20304184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["av1","rav1e"],"created_at":"2024-11-19T19:27:21.445Z","updated_at":"2025-03-14T03:43:23.662Z","avatar_url":"https://github.com/rust-av.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rav1e_js\nThe slowest and most dangerous AV1 encoder of the web.\n\n- [About](#about)\n- [Usage](#usage)\n  - [Api](#api)\n  - [Example Website](#example-website)\n  - [Testing](#testing)\n\n## About\n`rav1e_js` aims to bring the power of [`rav1e`](https://github.com/xiph/rav1e) to the web!\n\n## Usage\n\n### Api\n\n1. Clone + enter the repository\n    ```bash\n    git clone https://github.com/rust-av/rav1e_js\n    cd rav1e_js\n    ```\n2. Install [`wasm-pack`](https://github.com/rustwasm/wasm-pack)\n    ```bash\n    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh\n    ```\n3. Build package\n    ```bash\n    # Build (emits wasm-, js/ts-files to pkg/)\n    wasm-pack build\n    ```\n4. Add file dependency to `package.json`\n    ```ts\n    {\n        // ...\n        \"dependencies\": {\n            \"rav1e\": \"file:path/to/pkg\",\n            // ...\n        },\n        // ...\n    }\n    ```\n5. Use it in your project:\n    ```ts\n    import { ChromaSampling, EncoderConfig, VideoEncoder } from \"rav1e\";\n\n    // ...\n    ```\n\n### Example Website\nRun [`rebuild.sh`](./rebuild.sh):\n```bash\nbash rebuild.sh\n```\nor run:\n```bash\nwasm-pack build\n\ncd www/\nnpm install\nnpm start\n# website served at localhost:3000\n```\n\nPlease **first** enter the developer console and then start playing the video. You should see logging about the data collection and encoding.\n\n**Note!:** This can take quite a while.\n\nIf it doesn't start, please try:\n1. reload the webpage\n\n### Testing\n```bash\n# test in browser\nwasm-pack test --headless --[firefox, chrome, safari]\n\n# test in node\nwasm-pack test --node\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-av%2Frav1e_js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-av%2Frav1e_js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-av%2Frav1e_js/lists"}