{"_id":"wrapbox","_rev":"3-e1f6ff5909013a436482e7759ed4c46c","name":"wrapbox","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"wrapbox","version":"0.0.1","keywords":["video","rendering","webcodecs","mp4"],"author":{"name":"DesignCombo"},"license":"SEE LICENSE IN LICENSE","_id":"wrapbox@0.0.1","maintainers":[{"name":"yourcombo","email":"db@snapmotion.one"}],"homepage":"https://github.com/designcombo/wrapbox#readme","bugs":{"url":"https://github.com/designcombo/wrapbox/issues"},"dist":{"shasum":"66d4cd52e99332ebee3e31c724497ea249230498","tarball":"https://registry.npmjs.org/wrapbox/-/wrapbox-0.0.1.tgz","fileCount":16,"integrity":"sha512-tQdovzNzzCSwC7xyxQ6sRJzh5n+0KnDtWTcYtcLDSqXlPe7VCsJuHdf2FNsQc+k9S07fytgyvtiBJua8xHd3Iw==","signatures":[{"sig":"MEQCIBMMqhnkewljvKxvyfIa1VH8LLg6TXuZDnK4ge++GQjpAiALnMKxJUVCDFt0NnKOnKJkB7z5RKKx7281yLYAixpruQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":505883},"main":"dist/index.umd.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.umd.js"}},"gitHead":"cd9ad983dabd7712615de54936c96ccb15d3aa6f","scripts":{"dev":"vite","build":"tsc && vite build"},"_npmUser":{"name":"yourcombo","email":"db@snapmotion.one"},"repository":{"url":"git+https://github.com/designcombo/wrapbox.git","type":"git"},"_npmVersion":"11.3.0","description":"Video rendering and processing library","directories":{},"_nodeVersion":"24.1.0","dependencies":{"mp4box":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b","devDependencies":{"vite":"^7.1.5","typescript":"~5.9.2","vite-plugin-dts":"^4.5.4","rollup-plugin-peer-deps-external":"^2.2.4","@types/rollup-plugin-peer-deps-external":"^2.2.6"},"_npmOperationalInternal":{"tmp":"tmp/wrapbox_0.0.1_1768288448269_0.5525610514564827","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"wrapbox","version":"0.0.2","keywords":["video","rendering","webcodecs","mp4"],"author":{"name":"DesignCombo"},"license":"SEE LICENSE IN LICENSE","_id":"wrapbox@0.0.2","maintainers":[{"name":"yourcombo","email":"db@snapmotion.one"}],"homepage":"https://github.com/designcombo/wrapbox#readme","bugs":{"url":"https://github.com/designcombo/wrapbox/issues"},"dist":{"shasum":"809197a7c3087f27c5ebe3b4f96282f84e2853b7","tarball":"https://registry.npmjs.org/wrapbox/-/wrapbox-0.0.2.tgz","fileCount":16,"integrity":"sha512-Pu4YT5uCKla0XAWINdtVKeZKyjP05MJ5wb4p7XqheNDSQlfFG4l5kWERSuFWJB0yBDPYcvSIufwbQGEqtI8gug==","signatures":[{"sig":"MEQCIHyAjl9dM+/SRRObp8O9cd4BPC7wQ0V4XkARvWX9iTMtAiAoLSyoEXQrJ2MApfWoS89G5U8G7m+SgoRhL3OzXCmVYw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":507229},"main":"dist/index.umd.js","type":"module","types":"dist/index.d.ts","module":"dist/index.es.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.umd.js"}},"gitHead":"cd9ad983dabd7712615de54936c96ccb15d3aa6f","scripts":{"dev":"vite","build":"tsc && vite build"},"_npmUser":{"name":"yourcombo","email":"db@snapmotion.one"},"repository":{"url":"git+https://github.com/designcombo/wrapbox.git","type":"git"},"_npmVersion":"11.3.0","description":"Video rendering and processing library","directories":{},"_nodeVersion":"24.1.0","dependencies":{"mp4box":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b","devDependencies":{"vite":"^7.1.5","typescript":"~5.9.2","vite-plugin-dts":"^4.5.4","rollup-plugin-peer-deps-external":"^2.2.4","@types/rollup-plugin-peer-deps-external":"^2.2.6"},"_npmOperationalInternal":{"tmp":"tmp/wrapbox_0.0.2_1769116367165_0.912085095541449","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"wrapbox","version":"0.1.0","description":"Video rendering and processing library","type":"module","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/designcombo/wrapbox.git"},"keywords":["video","rendering","webcodecs","mp4"],"author":{"name":"Openvideo"},"license":"SEE LICENSE IN LICENSE","main":"dist/index.umd.js","module":"dist/index.es.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.umd.js"}},"scripts":{"dev":"vite","build":"tsc && vite build"},"devDependencies":{"@types/rollup-plugin-peer-deps-external":"^2.2.6","rollup-plugin-peer-deps-external":"^2.2.4","typescript":"~5.9.2","vite":"^7.1.5","vite-plugin-dts":"^4.5.4"},"dependencies":{"mediabunny":"^1.27.6","mp4box":"^2.3.0"},"packageManager":"pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b","_id":"wrapbox@0.1.0","gitHead":"60e8dde1f9e53153ad59cba7274e6b89c64fa54c","bugs":{"url":"https://github.com/designcombo/wrapbox/issues"},"homepage":"https://github.com/designcombo/wrapbox#readme","_nodeVersion":"24.1.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-KvybgkCwP74+4PYzZHPxdKrRIGFewzFxeswXjocVgVCR+jebFdMwrfjVoQe4MVs0PQ67sRf+p4zh4//x7jDj9w==","shasum":"51aec414960d02069cf99223c301e79d1cd7f89b","tarball":"https://registry.npmjs.org/wrapbox/-/wrapbox-0.1.0.tgz","fileCount":12,"unpackedSize":1004816,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCx4XzGjJHBqmFtxh5Q7528wwYvX9PaUIW5HzVaFoKqhgIhAOKs2APQ79qgDMfARsa8o5MOekqDChNmPDa3VTocxqpo"}]},"_npmUser":{"name":"yourcombo","email":"db@snapmotion.one"},"directories":{},"maintainers":[{"name":"yourcombo","email":"db@snapmotion.one"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wrapbox_0.1.0_1772083442872_0.051079603306659394"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-13T07:14:08.197Z","modified":"2026-02-26T05:24:03.221Z","0.0.1":"2026-01-13T07:14:08.495Z","0.0.2":"2026-01-22T21:12:47.378Z","0.1.0":"2026-02-26T05:24:03.079Z"},"bugs":{"url":"https://github.com/designcombo/wrapbox/issues"},"author":{"name":"Openvideo"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/designcombo/wrapbox#readme","keywords":["video","rendering","webcodecs","mp4"],"repository":{"type":"git","url":"git+https://github.com/designcombo/wrapbox.git"},"description":"Video rendering and processing library","maintainers":[{"name":"yourcombo","email":"db@snapmotion.one"}],"readme":"# wrapbox\n\nA focused library for video rendering and processing, specializing in recodemuxing and MP4 box handling using WebCodecs.\n\n## Features\n\n- **Recodemuxing**: High-performance video and audio encoding/decoding.\n- **MP4 Box Handling**: Deep integration with [mp4box.js](https://github.com/gpac/mp4box.js) for structured MP4 creation.\n- **WebCodecs Integration**: Optimized for modern browser-based video processing.\n- **Metadata Support**: Easy addition of metadata tags to MOOV boxes.\n\n## Installation\n\n```bash\nnpm install wrapbox\n```\n\n## Quick Start: recodemux\n\nThe `recodemux` function is the core utility for handling audio and video streams simultaneously, synchronizing them into a valid MP4 file.\n\n```typescript\nimport { recodemux } from 'wrapbox';\n\nconst muxer = recodemux({\n  video: {\n    width: 1920,\n    height: 1080,\n    expectFPS: 30,\n    codec: 'avc1.42E01E',\n    bitrate: 5_000_000,\n  },\n  audio: {\n    codec: 'aac',\n    sampleRate: 44100,\n    channelCount: 2,\n  },\n  duration: 10000, // Duration in ms\n});\n\n// To encode video (VideoFrame from WebCodecs)\nmuxer.encodeVideo(videoFrame, { keyFrame: true });\n\n// To encode audio (AudioData from WebCodecs)\nmuxer.encodeAudio(audioData);\n\n// Finalize the file\nawait muxer.flush();\nmuxer.close();\n\n// Access the underlying mp4box file\nconst mp4 = muxer.mp4file;\n```\n\n## Advanced MP4 Box Access\n\n`wrapbox` provides direct access to `mp4box.js` primitives:\n\n```typescript\nimport { createFile } from 'wrapbox';\n\nconst mp4file = createFile();\nmp4file.onReady = (info) => {\n  console.log('MP4 is ready', info);\n};\n```\n\n## API Reference\n\n### `recodemux(opts: RecodeMuxOpts)`\n\n- **`video`**: Configuration for the video track (width, height, FPS, codec, bitrate).\n- **`audio`**: Configuration for the audio track (codec, sampleRate, channelCount).\n- **`duration`**: (Optional) Total duration of the media.\n- **`metaDataTags`**: (Optional) Key-value pairs to add as metadata.\n\n### Returns\n\n- `encodeVideo(frame, options)`: Encodes a `VideoFrame`.\n- `encodeAudio(data)`: Encodes `AudioData`.\n- `flush()`: Returns a promise that resolves when all data is processed.\n- `close()`: Cleans up resources.\n- `mp4file`: The underlying `MP4File` instance.\n\n## License\n\nWrapBox is licensed under a two-tier system:\n- **Free License**: For individuals, small teams (up to 3 employees), and non-profits.\n- **Company License**: For organizations with more than 3 employees.\n\nFor detailed terms, see [LICENSE](https://github.com/designcombo/combo#license).\n\n## Telemetry\n\nTo improve the library and monitor usage for licensing compliance, WrapBox includes anonymous telemetry. It sends a simple ping when the library is initialized and when video creation starts. No personal data or video content is ever transmitted.\n","readmeFilename":"README.md"}