WP Manifestindependent plugin directory
manifest / performance / anatomy-video-optimiser-plugin

Anatomy Video Optimiser

WordPress plugin: auto-optimise uploaded videos with ffmpeg (H.264/30fps/faststart), review & replace from the dashboard

by Anatomy · github.com/ixn-digital/anatomy-video-optimiser-plugin · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/ixn-digital/anatomy-video-optimiser-plugin/archive/refs/heads/main.zip

Readme

Anatomy Video Optimiser

A 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.jpg still 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 the wagworks_hero_video_poster filter.
  • WP-CLI: wp avo optimize --all processes a whole back-catalogue with no timeout — used by the hosting playbook right after install.

Requirements

  • ffmpeg and ffprobe on the server (installed by anatomy-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.

Read the full README on GitHub →