weblet-convert 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -101,6 +101,17 @@ Transcodes videos to WebM.
101
101
  - **Browser WebP support varies**: the browser build relies on Canvas/OffscreenCanvas WebP encoding support. When encoding isn’t available, the function can return the original input and set `isWebp: false`.
102
102
  - **Metadata**: EXIF/IPTC metadata is not preserved.
103
103
  - **Not a perfect “max bytes” guarantee**: `targetBytes` is a best-effort search within the provided quality range.
104
+ - **Browser video memory guardrail**: `videoToWebm()` now enforces a default `maxInputBytes` limit (64 MiB) before ffmpeg.wasm processing to avoid hard crashes on constrained devices. You can override this via `video: { maxInputBytes: ... }`.
105
+
106
+ ## Troubleshooting video conversion
107
+
108
+ - **Browser `RuntimeError: memory access out of bounds`**:
109
+ - Reduce source file size/resolution, trim duration, or lower bitrate.
110
+ - Set a stricter `maxDurationSeconds` and/or adjust `maxInputBytes` for your environment.
111
+ - Ensure ffmpeg.wasm assets can load (no CSP/CORS/asset-path issues).
112
+ - **Node conversion fails with VP9 encoder errors**:
113
+ - The Node converter tries VP9 first and automatically falls back to VP8 when VP9 encoder support is missing.
114
+ - If both fail, check bundled ffmpeg capabilities and runtime stderr in the thrown error.
104
115
 
105
116
  ## Import paths
106
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weblet-convert",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Convert images to WebP and videos to WebM in browser and Node.js.",
5
5
  "license": "MIT",
6
6
  "repository": {