@frkntmbs/strapi-plugin-video-optimizer 1.0.2 → 1.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 +62 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -253,11 +253,71 @@ While a video is queued or encoding, hover the card and click the **stop** butto
253
253
 
254
254
  ## Test results
255
255
 
256
- Real-world encode runs on a Strapi 5 project with default plugin settings (`maxConcurrentJobs: 1`, `maxFfmpegThreads: 2`). Results vary by source file, output format, and server CPU.
256
+ Real-world encode runs on a Strapi 5 project. Results vary by source file, output format, and server CPU.
257
+
258
+ ### Test environment
259
+
260
+ Benchmarks below were captured on a **Hetzner VPS** running Strapi in production-like conditions:
261
+
262
+ | Component | Value |
263
+ |-----------|-------|
264
+ | Provider | Hetzner |
265
+ | vCPU | 2 |
266
+ | RAM | 4 GB |
267
+ | Strapi | 5.x |
268
+ | FFmpeg | `ffmpeg-static` (npm dependency) |
269
+ | `maxConcurrentJobs` | `1` |
270
+ | `maxFfmpegThreads` | `2` |
271
+ | Default CRF | `23` |
272
+
273
+ These results reflect a **small VPS** tier — weaker hosts may be slower; `maxConcurrentJobs: 1` and `maxFfmpegThreads: 1–2` are recommended here.
257
274
 
258
275
  > **Note:** Optimization controls encoding — it does **not** guarantee a smaller file. Re-encoding an already compressed source at the same resolution may increase size. For size reduction, raise CRF, lower resolution, or stay on H.264 instead of switching to WebM.
259
276
 
260
- _Test results will be added here after benchmark runs (e.g. 4K 1920 scaling)._
277
+ ### Test 1 `video-2.mp4` (CustomMP4, downscale)
278
+
279
+ **Source file**
280
+
281
+ | Property | Value |
282
+ |----------|-------|
283
+ | File | `video-2.mp4` |
284
+ | Resolution | 1080×1920 (9:16 portrait) |
285
+ | Duration | ~14.2 s |
286
+ | Video codec | H.264 |
287
+ | File size | 43.9 MB (46,009,883 bytes) |
288
+ | Bitrate | ~26 Mbps |
289
+
290
+ **Optimization profile**
291
+
292
+ | Setting | Value |
293
+ |---------|-------|
294
+ | Mode | **Custom** |
295
+ | Output format | **MP4 (H.264)** |
296
+ | Output dimensions | **432×768** (exact) |
297
+
298
+ **Result**
299
+
300
+ | Metric | Value |
301
+ |--------|-------|
302
+ | Output format | `.mp4` |
303
+ | Output resolution | 432×768 |
304
+ | Output size | 2.8 MB (2,897,316 bytes) |
305
+ | Size change | **−94%** (43.9 MB → 2.8 MB) |
306
+ | Encode time | ~22 s (first progress → completed) |
307
+ | Realtime factor | ~0.63× (14.2 s video in ~22 s on test host) |
308
+
309
+ **Server log (excerpt)**
310
+
311
+ ```
312
+ [video-optimizer] Job … progress 9% (encoding, mp4) 01:10:44
313
+ [video-optimizer] Job … progress 52% (encoding, mp4) 01:10:55
314
+ [video-optimizer] Job … progress 95% (encoding, mp4) 01:11:06
315
+ [video-optimizer] Job … progress 98% (finalizing, mp4) 01:11:06
316
+ [video-optimizer] File 2 updated in Media Library (45MB → 3MB, .mp4)
317
+ [video-optimizer] Job … completed for file 2 → .mp4 (2897316 bytes)
318
+ ```
319
+
320
+ Downscaling a high-bitrate portrait clip produced a large file-size win. Log MB values are rounded (`Math.round`); actual sizes are in the table above. `ECONNRESET` lines in the server log came from the browser closing preview range requests while encoding continued in the background — the job still completed successfully.
261
321
 
262
322
  ## Permissions
263
323
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.2",
6
+ "version": "1.0.4",
7
7
  "description": "Per-video optimization controls for the Strapi Media Library upload flow with async FFmpeg processing.",
8
8
  "license": "MIT",
9
9
  "keywords": [