Anatomy Video Optimiser
WordPress plugin: auto-optimise uploaded videos with ffmpeg (H.264/30fps/faststart), review & replace from the dashboard
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/ixn-digital/anatomy-video-optimiser-plugin/archive/refs/heads/main.zipA lightweight WordPress plugin that keeps uploaded videos lean and web-optimised, so pages aren't dragged down by multi-megabyte, phone-recorded MP4s.
It transcodes videos with ffmpeg to a sensible web profile — H.264, ≤30 fps,
capped resolution, +faststart for instant streaming — and replaces the file in
place so existing URLs keep working. It runs automatically on upload and gives you
a dashboard to review, optimise and (if needed) restore existing videos.
Why
On real sites the single biggest page-weight offender is often raw video uploaded straight from a phone (e.g. an 8 MB autoplay hero + several 2–5 MB clips = 20 MB+). That tanks LCP, Speed Index and Time to Interactive. This plugin fixes it at the source instead of relying on every editor to compress before uploading.
What it does
- On upload: new videos are queued and transcoded in the background (WP-Cron), so the upload itself is never blocked.
- Dashboard → Video Optimiser: lists every video with its size, dimensions and optimisation status. Optimise or re-optimise individually, or Optimise all in one click. Progress is polled live, so big files never hit a request timeout.
- In-place replace: the optimised file takes the original's path/URL. The source
is backed up to
uploads/avo-originals/(toggleable) so any change can be undone. - Poster frames: optionally extracts a
…-poster.jpgstill per video so themes can paint an image before the video loads (big LCP win for hero videos). The companion Wagworks theme reads this via thewagworks_hero_video_posterfilter. - WP-CLI:
wp avo optimize --allprocesses a whole back-catalogue with no timeout — used by the hosting playbook right after install.
Requirements
ffmpegandffprobeon the server (installed byanatomy-hosting-ansible).- PHP
exec()enabled for the site.
Settings (Video Optimiser → Settings)
| Setting | Default | Notes |
|---|---|---|
| Optimise on upload | on | Auto-transcode new uploads. |
| Max width | 1920 | Downscales wider videos; never upscales. |
| Max frame rate | 30 fps | Caps frame rate only when the source is faster. |
| Quality (CRF) | 23 | x264 constant rate factor (18–28 sensible). |
| Audio bitrate | 128 kbps | |
| Skip below | 2 MB | On-upload optimiser leaves already-small files alone. |
| Keep originals | on | Backup for one-click restore. |
| Generate poster frames | on | Writes …-poster.jpg beside each video. |
| ffmpeg / ffprobe path | ffmpeg / ffprobe |
Absolute path or command name. |
WP-CLI
wp avo list [--status=optimized|unoptimized|failed]
wp avo optimize <id>... [--force]
wp avo optimize --all [--force]
Uninstall
Removes settings and scheduled events only. Your media, backups and per-video status are left untouched.