diff options
| author | 2026-01-06 12:18:00 +0100 | |
|---|---|---|
| committer | 2026-01-06 12:18:00 +0100 | |
| commit | 03d270a56b751bc53b83381d9fef21da8d4cbb91 (patch) | |
| tree | 420ee265ed31995479e8660d33cb60c89472a6b0 /doc | |
| parent | Implement configurable EXIF stripping for uploaded media (diff) | |
| download | snac2-03d270a56b751bc53b83381d9fef21da8d4cbb91.tar.gz snac2-03d270a56b751bc53b83381d9fef21da8d4cbb91.tar.xz snac2-03d270a56b751bc53b83381d9fef21da8d4cbb91.zip | |
Implement metadata stripping for uploaded videos
- Extend `strip_media` to support video files using `ffmpeg`.
- Use `ffmpeg -map_metadata -1 -c copy` to strip global metadata.
- Support formats: mp4, m4v, mov, webm, mkv, avi.
- Add `ffmpeg_path` configuration option.
- Implement robust relative path handling (`user/` heuristic) to support jailed environments.
- Enforce strict checks on startup: fail if tools (mogrify/ffmpeg) are missing when enabled.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/snac.8 | 10 |
1 files changed, 7 insertions, 3 deletions
| @@ -297,13 +297,17 @@ failed instance is detected, this counter is reset for it. | |||
| 297 | .It Ic vkey | 297 | .It Ic vkey |
| 298 | Public vapid key. Used for notification on some client. | 298 | Public vapid key. Used for notification on some client. |
| 299 | .It Ic strip_exif | 299 | .It Ic strip_exif |
| 300 | If set to true, EXIF metadata will be stripped from uploaded images (jpg, png, webp, heic, avif, tiff, gif, bmp). This requires the | 300 | If set to true, EXIF and other metadata will be stripped from uploaded images (jpg, png, webp, heic, avif, tiff, gif, bmp) and videos (mp4, m4v, mov, webm, mkv, avi). This requires the |
| 301 | .Nm mogrify | 301 | .Nm mogrify |
| 302 | tool to be installed. If | 302 | (from ImageMagick) and |
| 303 | .Nm ffmpeg | ||
| 304 | tools to be installed. If | ||
| 303 | .Nm snac | 305 | .Nm snac |
| 304 | cannot find or execute the tool at startup, it will refuse to run. | 306 | cannot find or execute these tools at startup, it will refuse to run. |
| 305 | .It Ic mogrify_path | 307 | .It Ic mogrify_path |
| 306 | Overrides the default "mogrify" command name or path. Use this if the tool is not in the system PATH or has a different name. | 308 | Overrides the default "mogrify" command name or path. Use this if the tool is not in the system PATH or has a different name. |
| 309 | .It Ic ffmpeg_path | ||
| 310 | Overrides the default "ffmpeg" command name or path. Use this if the tool is not in the system PATH or has a different name. | ||
| 307 | .El | 311 | .El |
| 308 | .Pp | 312 | .Pp |
| 309 | You must restart the server to make effective these changes. | 313 | You must restart the server to make effective these changes. |