@frkntmbs/strapi-plugin-video-optimizer 1.0.0 → 1.0.1
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.
- package/LICENSE +1 -1
- package/README.md +51 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -23,6 +23,8 @@ Strapi's Media Library uploads videos as-is unless you add custom server logic.
|
|
|
23
23
|
|
|
24
24
|
Encoding runs **asynchronously in the background** — the original file appears in the Media Library immediately, and FFmpeg replaces it when the job completes.
|
|
25
25
|
|
|
26
|
+
> **Server notice:** Video encoding is CPU-intensive. Large files can consume significant server resources. Use `maxConcurrentJobs` and `maxFfmpegThreads` on small VPS hosts. This plugin is recommended for server/VPS environments where FFmpeg is available.
|
|
27
|
+
|
|
26
28
|
Upload UX mirrors [`strapi-plugin-image-optimizer`](https://github.com/frkntmbs/strapi-plugin-image-optimizer); image processing is replaced with FFmpeg-based video encoding.
|
|
27
29
|
|
|
28
30
|
## Screenshots
|
|
@@ -104,8 +106,40 @@ flowchart LR
|
|
|
104
106
|
- [Strapi](https://strapi.io) **5.x**
|
|
105
107
|
- Node.js **20–24**
|
|
106
108
|
- `@strapi/plugin-upload` (included with Strapi)
|
|
109
|
+
- **FFmpeg** — required for video encoding (see [FFmpeg requirement](#ffmpeg-requirement) below)
|
|
110
|
+
|
|
111
|
+
## FFmpeg requirement
|
|
112
|
+
|
|
113
|
+
This plugin requires an FFmpeg executable at runtime. Resolution order:
|
|
114
|
+
|
|
115
|
+
1. [`ffmpeg-static`](https://www.npmjs.com/package/ffmpeg-static) — installed as an npm dependency and used when available (may pull platform-specific FFmpeg binaries into `node_modules`)
|
|
116
|
+
2. **System FFmpeg** — if `ffmpeg-static` is unavailable, the plugin falls back to an `ffmpeg` binary on the host `PATH`
|
|
117
|
+
|
|
118
|
+
You are responsible for ensuring your FFmpeg installation and use comply with the applicable **LGPL/GPL** license terms.
|
|
119
|
+
|
|
120
|
+
### Install FFmpeg on the host (recommended for Docker/production)
|
|
121
|
+
|
|
122
|
+
**macOS**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
brew install ffmpeg
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Ubuntu / Debian**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
sudo apt update && sudo apt install ffmpeg
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Docker**
|
|
107
135
|
|
|
108
|
-
FFmpeg
|
|
136
|
+
Install FFmpeg in your Strapi application image, for example:
|
|
137
|
+
|
|
138
|
+
```dockerfile
|
|
139
|
+
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Or use a base image that already includes FFmpeg.
|
|
109
143
|
|
|
110
144
|
## Installation
|
|
111
145
|
|
|
@@ -165,6 +199,8 @@ All options can be set in `config/plugins.ts` (defaults) and overridden from the
|
|
|
165
199
|
|
|
166
200
|
### Server resource tuning
|
|
167
201
|
|
|
202
|
+
Large videos can consume significant CPU and memory during encoding. On small VPS hosts, keep concurrency low:
|
|
203
|
+
|
|
168
204
|
| Setting | Weak VPS suggestion | Notes |
|
|
169
205
|
|---------|---------------------|-------|
|
|
170
206
|
| `maxConcurrentJobs` | `1` | Only one video encodes at a time |
|
|
@@ -277,6 +313,20 @@ npx yalc add --link @frkntmbs/strapi-plugin-video-optimizer && npm install
|
|
|
277
313
|
npm run develop
|
|
278
314
|
```
|
|
279
315
|
|
|
316
|
+
## Legal note
|
|
317
|
+
|
|
318
|
+
This plugin's **source code** is licensed under [MIT](LICENSE).
|
|
319
|
+
|
|
320
|
+
Video encoding relies on **FFmpeg**, which is licensed under LGPL/GPL. By default, the plugin uses the [`ffmpeg-static`](https://www.npmjs.com/package/ffmpeg-static) npm package, which may install platform-specific FFmpeg binaries as a transitive dependency. When `ffmpeg-static` is unavailable, the plugin uses the FFmpeg executable available on the host system.
|
|
321
|
+
|
|
322
|
+
Please make sure your FFmpeg installation and use comply with the applicable LGPL/GPL license terms.
|
|
323
|
+
|
|
324
|
+
## Disclaimer
|
|
325
|
+
|
|
326
|
+
This is a **community plugin** and is not an official Strapi plugin.
|
|
327
|
+
|
|
328
|
+
Strapi is a trademark of Strapi Solutions SAS.
|
|
329
|
+
|
|
280
330
|
## License
|
|
281
331
|
|
|
282
332
|
[MIT](LICENSE)
|
package/package.json
CHANGED