{"_id":"@ffmpeg.wasm/main","_rev":"2-d0b22420ed36cc46b625abeea2bddd7b","name":"@ffmpeg.wasm/main","dist-tags":{"latest":"0.13.1"},"versions":{"0.12.0":{"name":"@ffmpeg.wasm/main","version":"0.12.0","description":"FFmpeg WebAssembly version","main":"src/index.js","types":"src/index.d.ts","directories":{"example":"examples"},"scripts":{"start":"node scripts/server.js","start:worker":"node scripts/worker-server.js","build":"rimraf dist && webpack --config scripts/webpack.config.prod.js","build:worker":"rimraf dist && webpack --config scripts/webpack.config.worker.prod.js","prepublishOnly":"npm run build","lint":"eslint src","wait":"rimraf dist && wait-on http://localhost:3000/dist/ffmpeg.dev.js","test":"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:ffmpeg test:node:all","test:node":"node node_modules/mocha/bin/_mocha --exit --bail --require ./scripts/test-helper.js","test:node:all":"npm run test:node -- ./tests/*.test.js","test:browser":"mocha-headless-chrome -a allow-file-access-from-files -a incognito -a no-sandbox -a disable-setuid-sandbox -a disable-logging -t 300000","test:browser:ffmpeg":"npm run test:browser -- -f ./tests/ffmpeg.test.html"},"browser":{"./src/node/index.js":"./src/browser/index.js"},"repository":{"type":"git","url":"git+https://github.com/DreamOfIce/ffmpeg.wasm.git"},"keywords":["ffmpeg","WebAssembly","video"],"author":{"name":"Jerome Wu","email":"jeromewus@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/DreamOfIce/ffmpeg.wasm/issues"},"engines":{"node":">=12.16.1"},"homepage":"https://github.com/DreamOfIce/ffmpeg.wasm#readme","dependencies":{"is-url":"^1.2.4","node-fetch":"^2.6.9","regenerator-runtime":"^0.13.11"},"devDependencies":{"@babel/core":"^7.12.3","@babel/preset-env":"^7.12.1","@ffmpeg.wasm/core-mt":"^0.12.0","@types/emscripten":"^1.39.4","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","chai":"^4.2.0","cors":"^2.8.5","eslint":"^8.37.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.27.5","express":"^4.17.1","mocha":"^10.1.0","mocha-headless-chrome":"^2.0.3","npm-run-all2":"^6.0.4","wait-on":"^5.3.0","webpack":"^5.3.2","webpack-cli":"^4.1.0","webpack-dev-middleware":"^4.0.0"},"publishConfig":{"access":"public"},"gitHead":"7ff4a0be6c0c1d49636bc9a63ad675b8a8a7c9a2","_id":"@ffmpeg.wasm/main@0.12.0","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-LILAKTrU3Rga2iXLsF9jeFxe2hNQFjWlrKuXPWSdCFeQ7Kg69fO4WwjNJ0CzjOyO6qtndRQMNKqf//N4fLYUBA==","shasum":"ce2ebcad5bae7329eb4d5ba27fc975eaf86b4e0c","tarball":"https://registry.npmjs.org/@ffmpeg.wasm/main/-/main-0.12.0.tgz","fileCount":35,"unpackedSize":133820,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOg5Mb4fhMlFutimWzFLrW4OMsOHCan37ePlkS2cq+WgIhAMm5VJEN7Kv92IG/68ocdQSM5hBVH8DuzMFSVMpJuyuC"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKZdVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoe/w//bawPd3YqPbRql3DCS9OZDfFCHuF4I9Aet/V6DZqooQqBpXgt\r\nKoD85UZg0XuZW1CtkbnQKTJ+Ye5ueusQ6CWJ9CmzGnS8hodBjI3cMGfCdPq4\r\nlwehu1hp/0veeGwjRxLHPQJfYRgbL+uzZKffzu+tOHwzjFhFw7Ncdq1yLyeA\r\nRzIlVqQ3FjGVOhwVwnam3CkpW/ZQn5tdo9NysnYV1bbmeLB5HmZ9niOvSbb+\r\nMjmV+V8/dMNF5dJPrvYjWTtUlrd1pVnTpvUySZTV0YmrXCycqxnKdGj0ApFM\r\nV5g08kKqr7WwMUwJZqkaSx+U8A1NQ+w5ykE/RHJULpL0aWnW8LuAWlOF3MO/\r\nZmrP1sFyuTl5geSYtVey7qndIy7OUORojmrCYDI0g6hhKjtLGRWhFdjSU2pN\r\nVoEVFLWL+YOy/Zoi4kt75LNe73t09A22cMSZPSh6099XtHx2I/4OnwpIC42V\r\nQBo8zXuUhTgGDaPqvhB7/QiMR7I7imi/hk6Fm+NVY/VVewXez0FNGjCAQ+9c\r\nkiWUIPXbImq5ZLXRtTWUD5fpxuJh+QkcNYegOjGNaCbtmSTWdpwhLSxn5q3p\r\nmFKG98TAIqQwjg6kdXKweKmF5wTs/FDoIFYOBxOcni8Z8TvPvgN4CIAuCcFs\r\nUoI55VB41ye5rjrFre9HaaonK3ys7X4xyH0=\r\n=hYXL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dreamofice","email":"dreamofice@outlook.com"},"maintainers":[{"name":"dreamofice","email":"dreamofice@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/main_0.12.0_1680447317129_0.5983986351135315"},"_hasShrinkwrap":false},"0.13.0":{"name":"@ffmpeg.wasm/main","version":"0.13.0","description":"WebAssembly version of FFmpeg","keywords":["ffmpeg","WebAssembly","video"],"homepage":"https://github.com/ffmpeg.wasm/ffmpeg.wasm#readme","bugs":{"url":"https://github.com/ffmpeg.wasm/ffmpeg.wasm/issues"},"repository":{"type":"git","url":"git+https://github.com/ffmpeg.wasm/ffmpeg.wasm.git"},"license":"MIT","author":{"name":"Jerome Wu","email":"jeromewus@gmail.com"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@commitlint/cli":"^17.6.7","@commitlint/config-conventional":"^17.6.7","@ffmpeg.wasm/core-mt":"^0.13.2","@ffmpeg.wasm/core-st":"^0.13.2","@release-it/conventional-changelog":"^7.0.0","@tsconfig/esm":"^1.0.4","@tsconfig/node-lts":"^18.12.3","@tsconfig/strictest":"^2.0.1","@types/emscripten":"^1.39.6","@types/node":"^20.4.4","@typescript-eslint/eslint-plugin":"^6.1.0","@typescript-eslint/parser":"^6.1.0","eslint":"^8.45.0","eslint-config-prettier":"^8.8.0","file-type":"^18.5.0","husky":"^8.0.3","nano-staged":"^0.8.0","prettier":"^3.0.0","prettier-plugin-packagejson":"^2.4.5","release-it":"^16.1.3","tsup":"^7.1.0","typescript":"^5.1.6","vitest":"^0.33.0"},"engines":{"node":">=14.0.0"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","lint":"pnpm run \"/^lint:.*/\"","lint:eslint":"eslint --ext .ts --fix ./src","lint:prettier":"prettier --write .","release":"release-it","test":"vitest"},"_id":"@ffmpeg.wasm/main@0.13.0","_integrity":"sha512-UEOE+GHQzxH6wK/2FJtB15ismUQXXqXm/FPoTtnpAidP62hBQ/05WiOVqijF9Vhy3bscQzYiU4aiQVctwuDvVg==","_resolved":"/tmp/d3fad6d34dfa51677377a4098d440d92/ffmpeg.wasm-main-0.13.0.tgz","_from":"file:ffmpeg.wasm-main-0.13.0.tgz","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-UEOE+GHQzxH6wK/2FJtB15ismUQXXqXm/FPoTtnpAidP62hBQ/05WiOVqijF9Vhy3bscQzYiU4aiQVctwuDvVg==","shasum":"82031596cfc75eca7c5d374c1e3ffd36fde60b6b","tarball":"https://registry.npmjs.org/@ffmpeg.wasm/main/-/main-0.13.0.tgz","fileCount":8,"unpackedSize":46217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnUrF7goHOmS0hbmOsa1/LbiB/ptW8H63EplbhUipS6QIhAPx0kKH89E/uasktq1K6kHBV8kfDLgd+n/L2bCajMHh6"}]},"_npmUser":{"name":"dreamofice","email":"dreamofice@outlook.com"},"directories":{},"maintainers":[{"name":"dreamofice","email":"dreamofice@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/main_0.13.0_1690219677173_0.31326972699125966"},"_hasShrinkwrap":false},"0.13.1":{"name":"@ffmpeg.wasm/main","version":"0.13.1","description":"WebAssembly version of FFmpeg","keywords":["ffmpeg","WebAssembly","video"],"homepage":"https://github.com/FFmpeg-wasm/FFmpeg.wasm#readme","bugs":{"url":"https://github.com/FFmpeg-wasm/FFmpeg.wasm/issues"},"repository":{"type":"git","url":"git+https://github.com/FFmpeg-wasm/FFmpeg.wasm.git"},"license":"MIT","author":{"name":"Jerome Wu","email":"jeromewus@gmail.com"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@commitlint/cli":"^17.6.7","@commitlint/config-conventional":"^17.6.7","@ffmpeg.wasm/core-mt":"^0.13.2","@ffmpeg.wasm/core-st":"^0.13.2","@release-it/conventional-changelog":"^7.0.0","@tsconfig/esm":"^1.0.4","@tsconfig/node-lts":"^18.12.3","@tsconfig/strictest":"^2.0.1","@types/node":"^20.4.4","@typescript-eslint/eslint-plugin":"^6.1.0","@typescript-eslint/parser":"^6.1.0","dotenv-cli":"^7.2.1","eslint":"^8.45.0","eslint-config-prettier":"^8.8.0","file-type":"^18.5.0","husky":"^8.0.3","nano-staged":"^0.8.0","prettier":"^3.0.0","prettier-plugin-packagejson":"^2.4.5","release-it":"^16.1.3","tsup":"^7.1.0","typescript":"^5.1.6","vitest":"^0.33.0"},"engines":{"node":">=14.0.0"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","lint":"pnpm run \"/^lint:.*/\"","lint:eslint":"eslint --ext .ts --fix ./src","lint:prettier":"prettier --write .","release":"dotenv release-it","test":"vitest"},"_id":"@ffmpeg.wasm/main@0.13.1","_integrity":"sha512-WoEd9xp/N9VWddZ3y1cdRK/el52ZKLoqOS+BNQZcsbLQpkQuHrFG93+zY4VjMZ0aWno4pQG4TSgLzsexpukpHw==","_resolved":"/tmp/878efa6435b36ecc166936f4fb2319c6/ffmpeg.wasm-main-0.13.1.tgz","_from":"file:ffmpeg.wasm-main-0.13.1.tgz","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-WoEd9xp/N9VWddZ3y1cdRK/el52ZKLoqOS+BNQZcsbLQpkQuHrFG93+zY4VjMZ0aWno4pQG4TSgLzsexpukpHw==","shasum":"8022e0d0036fc65c2cee4fa1bfdfe70e17256f46","tarball":"https://registry.npmjs.org/@ffmpeg.wasm/main/-/main-0.13.1.tgz","fileCount":8,"unpackedSize":66265,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAaYTwwS5lFnwImzBSS7aRc7PO8UJcWQtByXFAoOZ33yAiAh8MS5b81CtpF3CoIJa0oyCVPMbL3NUtacHfegBjW5kw=="}]},"_npmUser":{"name":"dreamofice","email":"dreamofice@outlook.com"},"directories":{},"maintainers":[{"name":"dreamofice","email":"dreamofice@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/main_0.13.1_1691247366653_0.289889361901835"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-02T14:55:17.060Z","0.12.0":"2023-04-02T14:55:17.385Z","modified":"2023-08-05T14:56:07.009Z","0.13.0":"2023-07-24T17:27:57.389Z","0.13.1":"2023-08-05T14:56:06.896Z"},"maintainers":[{"name":"dreamofice","email":"dreamofice@outlook.com"}],"description":"WebAssembly version of FFmpeg","homepage":"https://github.com/FFmpeg-wasm/FFmpeg.wasm#readme","keywords":["ffmpeg","WebAssembly","video"],"repository":{"type":"git","url":"git+https://github.com/FFmpeg-wasm/FFmpeg.wasm.git"},"author":{"name":"Jerome Wu","email":"jeromewus@gmail.com"},"bugs":{"url":"https://github.com/FFmpeg-wasm/FFmpeg.wasm/issues"},"license":"MIT","readme":"# FFmpeg.wasm\n\n[![NPM](https://img.shields.io/npm/v/%40ffmpeg.wasm/main)](https://www.npmjs.com/package/@ffmpeg.wasm/main)\n[![NPM Downloads](https://img.shields.io/npm/dm/@ffmpeg.wasm/main.svg)](https://www.npmjs.com/package/@ffmpeg.wasm/main)\n[![JSdelivr Downloads](https://data.jsdelivr.com/v1/package/npm/@ffmpeg.wasm/main/badge)](https://www.jsdelivr.com/package/npm/@ffmpeg.wasm/main)\n[![LICENSE](https://img.shields.io/npm/l/%40ffmpeg.wasm%2Fmain)](./LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)\n\n## About this fork\n\nThanks to [Jerome Wu](https://github.com/jeromewu) for creating the very cool package ffmpegwasm!\n~~However, because this package hasn't been updated in a long time, a lot of features are on hold and it's not compatible with node18 and above (because the emsdk version is too old). So I decided to maintain a fork, fix the problems and continue development iterations.~~\nUpdate: Jerome Wu updated ffmpegwasm, but dropped nodejs support because \"If you are not in browser, there are a lot of better choices than using WebAssembly for a better performance \". However, I don't entirely agree with this. WebAssembly gives us the possibility of run programs at high performance in both native and browser environments with the same code. The convenience and portability it brings is unmatched by any other solution, and the current performance issues will hopefully be resolved in the foreseeable future. So I decide to keep maintaining this project.\nFeel free to create issues or pull requests ヾ(≧▽≦\\*)o\n\n### Release Plan\n\n> See the [Todos](#todos) section for more plans\n\n- v0.12 is fully compatible with ffmpegwasm v0.11.x, but updates emsdk to the latest and fixes some bugs\n- Since v0.13, we'll try to add some new features and refactor it using a modern toolchain **this may bring some breaking changes in minor version**.\n\n### Migration from ffmpegwasm\n\n1. Change package names and update imports:\n   - `@ffmpeg/ffmpeg` => `@ffmpeg.wasm/main`\n   - `@ffmpeg/core` & `@ffmpeg/core-mt` => `@ffmpeg.wasm/core-mt`\n   - `@ffmpeg/core-st` => `@ffmpeg.wasm/core-st`\n2. Update version to `^0.12.0`\n\n### Todos\n\n- [x] Update emsdk to latest\n- [x] Release with Github Action\n- [x] Migrate to pnpm\n- [x] ESM Support\n- [x] Test with `vitest`\n- [x] Update deps\n- [x] Rewrite with TypeScript\n- [x] Support for parallel tasks in multi-threaded mode\n- [ ] Document site\n- [ ] Migrate to monorepo\n- [ ] Build with [xmake](https://xmake.io/)\n- [ ] Support build cache\n- [ ] SIMD and WASI version\n- [ ] Upgrade to FFmpeg@6\n- [ ] Use the faster `libsvtav1` instead of `libaom` (currently disabled because it is too slow)\n\n## Original readme\n\nffmpeg.wasm is a pure Webassembly port of FFmpeg. It enables video & audio record, convert and stream right inside browsers.\n\n## Installation\n\n**Node**\n\n```\n$ npm install @ffmpeg.wasm/main @ffmpeg.wasm/core-mt\n```\n\n**Browser**\n\nOr, using a script tag in the browser (only works in some browsers, see list below):\n\n> Only browsers with `SharedArrayBuffer` support can use multi-thread core(`@ffmpeg.wasm/core-mt`), you can check [HERE](https://caniuse.com/sharedarraybuffer) for the complete list.\n\n> [SharedArrayBuffer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) is only available to pages that are [cross-origin isolated](https://developer.chrome.com/blog/enabling-shared-array-buffer/#cross-origin-isolation). You need to send headers `Cross-Origin-Embedder-Policy: require-corp` and `Cross-Origin-Opener-Policy: same-origin` for your site, and make sure your static resource server(or public CDN) contains the header `Cross-Origin-Resource-Policy: cross-origin`(e.g. [JSdelivr](https://jsdelivr.com), not [Unpkg](https://unpkg.com))\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@ffmpeg.wasm/main/dist/index.global.js\"></script>\n<script>\n  const ffmpeg = FFmpeg.create({\n    /* ... */\n  });\n</script>\n```\n\n## Usage\n\n`ffmpeg.wasm` provides simple to use APIs, to transcode a video you only need few lines of code:\n\n```ts\nimport { readFile, writeFile } from \"fs/promises\";\nimport { FFmpeg } from \"@ffmpeg.wasm/main\";\n\nconst ffmpeg = await FFmpeg.create({ core: \"@ffmpeg.wasm/core-mt\" });\n\nffmpeg.fs.writeFile(\"test.avi\", await readFile(\"./test.avi\"));\nawait ffmpeg.run(\"-i\", \"test.avi\", \"test.mp4\");\nawait writeFile(\"./test.mp4\", ffmpeg.fs.readFile(\"test.mp4\"));\nprocess.exit(0);\n```\n\n### Use other version of ffmpeg.wasm core\n\nFor each version of ffmpeg.wasm, there is a default version of `@ffmpeg.wasm/core-mt` (you can find it in `devDependencies` section of [package.json](./package.json)), but sometimes you may need to use newer version of `@ffmpeg.wasm/core-mt` to use the latest/experimental features.\n**Warning:** before reaching v1.0.0, there may be incompatibilities between each minor version of the core, see the [migration guide](./docs/migrate/README.md) for more details!\n\n#### Node\n\nJust install the specific version you need:\n\n```sh\n$ npm install @ffmpeg.wasm/core-mt@$version\n```\n\nOr use your own version with customized path\n\n```ts\nconst ffmpeg = await FFmpeg.create({\n  core: \"path/to/your/ffmpeg.wasm/core.js\",\n});\n```\n\n#### Browser\n\n```ts\nconst ffmpeg = await FFmpeg.create({\n  core: \"https://cdn.jsdelivr.net/npm/@ffmpeg.wasm@$version/core-mt/dist/core.min.js\",\n});\n```\n\n### Use single thread version\n\n```ts\nconst ffmpeg = await FFmpeg.create({\n  core: \"@ffmpeg.wasm/core-st\",\n});\n```\n\n## Multi-threading\n\nMulti-threading need to be configured per external libraries, only following libraries supports it now:\n\n### x264\n\nRun it multi-threading mode by default, no need to pass any arguments.\n\n### libvpx / webm\n\nNeed to pass `-row-mt 1`, but can only use one thread to help, can speed up around 30%\n\n## Documentation\n\n- [API](./docs/api.md)\n- [Supported External Libraries](https://github.com/FFmpeg-wasm/ffmpeg.wasm-core#configuration)\n\n## FAQ\n\n### What is the license of ffmpeg.wasm?\n\nThere are two components inside ffmpeg.wasm:\n\n- @ffmpeg.wasm/main (https://github.com/FFmpeg-wasm/ffmpeg.wasm)\n- @ffmpeg.wasm/core-mt (https://github.com/FFmpeg-wasm/ffmpeg.wasm-core)\n\n@ffmpeg.wasm/core-mt contains WebAssembly code which is transpiled from original FFmpeg C code with minor modifications, but overall it still following the same licenses as FFmpeg and its external libraries (as each external libraries might have its own license).\n\n@ffmpeg.wasm/main contains kind of a wrapper to handle the complexity of loading core and calling low-level APIs. It is a small code base and under MIT license.\n\n### What is the maximum size of input file?\n\n1 GB, which is a hard limit in WebAssembly. Might become 4 GB in the future.\n","readmeFilename":"README.md"}