Requirements
Before installing, make sure your environment meets the following:
| WordPress | 6.6 or higher |
| PHP | 7.4 or higher |
| WooCommerce | Required & active (the plugin extends the product gallery) |
| FFmpeg + FFprobe | Needed for server-side conversion & auto-thumbnails. Optional if you use the in-browser converter — it runs entirely in the admin's browser and needs nothing on the server. You can also attach ready MP4/WebM files directly. |
PHP exec() | Needed only for the server conversion method (not for the in-browser one). Must not be in disable_functions. |
| Modern browser | For the in-browser method: any current Chrome, Edge, Firefox or Safari with WebAssembly (all modern browsers qualify). |
Installation
From the WordPress dashboard
- Go to Plugins → Add New.
- Search for “Magic Product Video for WooCommerce”.
- Click Install Now, then Activate.
- Make sure WooCommerce is installed and active.
Manual upload
- Download the
.zipfrom WordPress.org. - Go to Plugins → Add New → Upload Plugin and select the file.
- Click Install Now → Activate.
After activation a new Magic PVW item appears in the WordPress admin menu.
Installing & configuring FFmpeg
FFmpeg is only needed for the server conversion method. If you can't install it (e.g. on restricted shared hosting), skip this section and use the in-browser converter instead.
Install on your server
# Debian / Ubuntu
sudo apt update && sudo apt install -y ffmpeg
# RHEL / CentOS / AlmaLinux (EPEL)
sudo dnf install -y epel-release && sudo dnf install -y ffmpeg ffmpeg-devel
# Alpine (many Docker images)
apk add --no-cache ffmpeg
# macOS (Homebrew) — local dev
brew install ffmpeg
FFprobe ships together with FFmpeg in all of the above, so a single install covers both conversion and thumbnail generation.
Verify it works
# Should print a version and the install path
ffmpeg -version
which ffmpeg # e.g. /usr/bin/ffmpeg
Then open Magic PVW → Settings → FFmpeg — it shows a green “FFmpeg installed” message with the detected version when everything is wired up correctly.
Make sure PHP can call it
Server conversion launches FFmpeg through PHP's exec(). Some hosts disable it for security. Check your php.ini:
; exec must NOT be listed here
disable_functions =
exec(). That's exactly what the in-browser converter is for — switch Settings → FFmpeg → Video processing method to Browser and convert without touching the server.
Quick start
Three steps to your first product video:
Upload & convert
Open Magic PVW → Media, upload a video and let it convert to MP4 + WebM (a poster thumbnail is created automatically).
Attach it to a product
Edit any product → in the Magic Video box (sidebar) click Select video, pick your video and press Update.
Done
The video now plays inside the product gallery on the storefront — no theme changes required.
The Magic PVW admin
The plugin ships a dedicated admin app under the Magic PVW menu, organised into a few areas you can reach from the left sidebar: Dashboard, Media, Settings and Player.
Magic Media library
The Media screen is your central video library. Here you can:
- Upload a source video (MP4, MOV, AVI, MKV, HEVC, WebM and more).
- Browse all uploaded videos as cards with a poster, status badge and available formats.
- Search and paginate through your library.
- Open a video to manage its converted formats, thumbnail and conversion.
- Delete a video or an individual converted format.
Each video is stored as its own item (a magic_video entry) holding the original file, the converted MP4/WebM and the poster image.
Conversion & queue
Each source video is converted to MP4 and WebM. You choose where that happens — on the server (FFmpeg) or in your browser (WASM) — see Conversion methods. Either way:
- Add a format (MP4 or WebM) and watch a live progress indicator.
- Each format uses the preset you choose (see FFmpeg presets).
Server method: runs in the background through a queue, so your editor is never blocked. You can cancel or re-queue a conversion, and a concurrency limit (2 at a time by default) keeps the server from being overloaded; the queue is processed by WP-Cron, so it keeps going even after you close the tab.
Browser method: converts right in the admin tab and uploads the finished file — nothing runs on the server. Jobs run one at a time; keep the tab open until a conversion finishes (closing it cancels that in-progress browser job — already-saved formats are unaffected).
Thumbnails
A poster image is generated automatically from the first second of the video. Open a video's details to regenerate the thumbnail from a different second if you prefer another frame. If FFmpeg isn't available, the WooCommerce placeholder image is used.
Settings
General & WooCommerce
- Use FlexSlider — match how your theme renders the product gallery. Enable it if your theme uses WooCommerce's default FlexSlider gallery; disable it for custom galleries. If a custom theme modifies the product card template, this option may not be relevant.
- Gallery position — show the video as the first item of the gallery (most prominent) or at the end, after the product photos.
- Show video in product list — on shop / category pages, replace the product thumbnail with an autoplaying, muted, looping video for products that have one. Products without a video keep their normal thumbnail. Off by default (video shows only on the single product page).
- Sync WPML languages — share product videos across translations (see WPML).
Enabled post types
By default the Magic Video box appears on products. On the plugin settings you can enable additional post types (posts, pages, custom post types) so editors can attach a video to them too. Products are always enabled.
FFmpeg presets
A preset controls how FFmpeg encodes your videos. You can edit the default preset and create custom ones:
| Option | What it does |
|---|---|
| CRF | Quality/size trade-off (lower = higher quality, larger file). |
| Resolution | Target width & height. Use -1 to keep the original on an axis. |
| Scaling mode | Contain (fit + pad), Cover (fill + crop) or Stretch. |
| Audio codec | Per-format audio codec, or remove audio entirely. |
| Preset | FFmpeg encoding speed/efficiency preset. |
Output formats are MP4 (H.264) and WebM for the widest cross-browser support. WebM uses VP9 on the server method; the in-browser method uses VP8 automatically (VP9 isn't supported by the WASM engine). The same screen also holds the Video processing method switch (Server / Browser).
Player configuration
The Player screen configures the front-end video.js player used on the storefront:
- Autoplay, Muted, Loop, Plays inline, Show controls.
- Open in modal on click — when on, the gallery (and shortcode/PHP embeds) show a poster with a play button; clicking opens a full-screen player. When off, the video plays inline following the Autoplay setting. See Displaying videos.
- Fluid sizing & Aspect ratio (e.g.
16:9). - Default volume and object-fit (contain/cover).
- Background colour or transparent background.
Conversion methods
The plugin can encode your videos in two places today — and a third is on the roadmap. All of them produce the same MP4 + WebM outputs and feed the same library, so you can switch any time without changing how videos are attached or displayed.
Server
Native FFmpeg on your server. Fastest, handles any file size, runs in a background queue.
Needs FFmpeg + exec().
Browser
Runs in the admin's browser via WebAssembly. Nothing to install on the server — ideal for restricted hosting.
Best for small / short clips.
Cloud
A planned option to offload encoding to a dedicated third-party service — server speed with zero local setup, even for large files.
On the roadmap.
Switching server ↔ browser
Open Magic PVW → Settings → FFmpeg and use the Video processing method switch:
- Pick Server or Browser. The choice is saved instantly.
- An indicator right below shows the currently active method (and warns if Server is selected but FFmpeg isn't installed, or if your browser can't run the in-browser converter).
- That's it — the next conversion you start from the Media library uses the selected method.
.webm, broadly compatible). On the server method WebM uses VP9 as configured.
Speed & file-size guide
Native server FFmpeg is dramatically faster than the in-browser engine, which is single-threaded WebAssembly. Rough relative encoding speed (higher = faster):
Indicative only — real numbers depend on CPU, codec, preset, resolution and the client device. “Real-time” = video duration ÷ encode time.
Approximate time to convert one format of a typical clip:
| Source clip | Server | Browser |
|---|---|---|
| 10 s · 720p | ~1–3 s | ~10–30 s |
| 30 s · 1080p | ~3–10 s | ~1–4 min |
| 2 min · 1080p | ~15–40 s | ~5–15 min |
| 4K or several minutes | handles fine | may run out of memory |
Plus a one-time ~30 MB engine download on the first browser conversion. The browser engine keeps the whole job in tab memory, so very large/long/high-resolution files can fail with an out-of-memory error.
Which method should I use?
| Your situation | Recommended |
|---|---|
| FFmpeg available on the server | Server — fastest, no size limits |
| Large, long or 4K videos | Server (browser may run out of memory) |
| Short product clips (≤ ~1080p, ≤ ~1 min, ≤ ~150 MB) | Browser works well; Server still faster |
Shared hosting — no FFmpeg / no exec() | Browser (or attach ready MP4/WebM files) |
| Occasional, one-off conversions | Either — pick what's convenient |
Rule of thumb: Server is the best default whenever it's available; reach for Browser when you can't run FFmpeg on the host and your clips are reasonably small.
Attaching a video to a product or post
When editing a product (or any enabled post type) you'll see a Magic Video box in the sidebar:
- Click Select video. A modal video picker opens — the same library as Magic PVW → Media.
- Choose a ready video (search and paginate as needed) and press Select.
- The box now shows a small playable preview of the chosen video.
- Press Update / Publish to save the post — the video is now linked.
- Use Change video to swap it, or Remove to detach it.
Displaying videos
For products, the video is embedded into the WooCommerce product gallery automatically — no code needed. It uses WooCommerce's standard gallery mechanism, so it works across configurations: the FlexSlider carousel, lightbox/zoom galleries, block (FSE) themes such as Twenty Twenty-Five, and products with or without extra images. If a theme renders a completely custom gallery, the plugin still injects the video into it as a safe fallback.
How it plays follows your Player settings:
- Autoplay on → the video slide plays automatically (muted) when shown in the carousel.
- Autoplay off → the slide shows controls/poster and plays on click, inline.
- Open in modal on click → the gallery shows a poster with a play button; clicking opens a full-screen player.
The Gallery position setting controls whether the video is the first or last gallery item. For any other location (posts, pages, custom layouts) use the shortcode or PHP helpers below. The player library loads automatically whenever a video is output.
Shortcodes
There are two shortcodes. Pick based on what you want to reference:
[mpvw_video]
Shows the video attached to a post (via the Magic Video box on the edit screen). With no id it uses the current post; pass id to target another post/product by its post ID.
[mpvw_magic_video id="…"]
Shows any video directly by its Magic Video ID — no need to attach it to a post first. Great for landing pages, widgets or reusing one video in many places.
[mpvw_magic_video] shortcode (with a copy button), and the Magic Video ID is shown at the top of the “Original details” panel. Note: this is not the same as a media-library attachment ID.
// Video attached to the CURRENT post / page / product
[mpvw_video]
// Video attached to a specific post, by POST id
[mpvw_video id="128"]
// Any video directly by its MAGIC VIDEO id
[mpvw_magic_video id="194"]
// With options (both shortcodes accept the same attributes)
[mpvw_magic_video id="194" autoplay="true" muted="true" loop="true" controls="false" class="my-video"]
// Open in a full-screen modal on click
[mpvw_magic_video id="194" modal="true"]
Attributes (both shortcodes)
| Attribute | Default | Description |
|---|---|---|
| id | current | [mpvw_video]: the post ID with an attached video (defaults to the current post). [mpvw_magic_video]: the Magic Video ID (required). |
| autoplay | true | Start playing automatically (muted). |
| muted | true | Mute audio. |
| loop | true | Loop playback. |
| controls | false | Show player controls. |
| modal | inherit | Show a poster + play button that opens a full-screen player. Defaults to the Open in modal player setting. |
| class | — | Extra CSS class on the <video>. |
PHP API
For full control inside theme templates or page builders, three helpers are available:
Get the raw data
<?php
// Returns array on success, or false when there is no video.
$data = mpvw_get_video_data( $post_id ); // $post_id optional (current post)
// =>
[
'mp4' => '…/video.mp4',
'webm' => '…/video.webm',
'thumbnail_id' => 285,
'magic_video_id' => 282,
];
Render a ready-made player
<?php
// Returns the player HTML as a string (enqueues the player assets).
$html = mpvw_get_video_html( $post_id, [
'autoplay' => true,
'muted' => true,
'loop' => true,
'controls' => false,
'modal' => false, // poster + play → full-screen player
'class' => 'my-video',
] );
// Or echo it directly:
mpvw_the_video( $post_id );
WooCommerce gallery data
<?php
// Product-aware getter (honours WPML fallback). Use in WooCommerce templates.
$video = mpvw_get_product_video_data( $product_id );
WPML & multilingual
If you run WPML, enable Sync WPML languages in Settings. With it on, a translated product without its own video falls back to the default-language video — so you set the video once and it shows everywhere. Leave it off to set a different (or no) video per language.
Troubleshooting
Conversion never finishes / stays pending
Check that FFmpeg and FFprobe are installed and that PHP exec() isn't disabled. The Settings → FFmpeg screen shows whether FFmpeg is detected. The queue is processed via WP-Cron, so make sure cron is running.
The video doesn't show on the product page
Confirm the video is attached and the post was saved, the chosen video is ready, and the FlexSlider setting matches your theme's gallery. For heavily customized galleries, render it manually with the PHP API.
The “Magic Video” box doesn't appear on a post type
Enable that post type under Settings → Enabled post types. Products are always enabled.
A video can't be selected in the picker
Only ready videos (with at least one converted format) can be attached. Convert it first on the Media screen.
FAQ
What source formats can I upload?
All WordPress-compatible video formats. For conversion the plugin handles MP4, MOV, AVI, MKV, HEVC, WebM, and more.
Can I use it without FFmpeg?
Yes. Switch to the in-browser converter (Settings → FFmpeg → Video processing method → Browser), which needs nothing on the server, or attach ready MP4/WebM files directly. Server FFmpeg is only one of the conversion options.
Server or in-browser conversion — which is better?
Server is faster and handles any file size — use it whenever FFmpeg is available. Browser is great when you can't install FFmpeg, for reasonably small clips. See the speed & file-size guide. A cloud option (third-party encoding service) is planned for the future.
Can I attach a video to posts and pages, not just products?
Yes. Enable the post type in Settings, attach a video, then display it with the shortcode or PHP API.
Can I show several videos on one page?
Yes — use multiple shortcodes/helper calls; every player on the page is initialized automatically.
Where are the files stored?
In your own WordPress uploads directory — fully self-hosted, no third-party services.
Still stuck?
Open a topic on the WordPress.org support forum.