Building a Web-Based Video Compressor for WordPress
Testing a free WordPress plugin that converts large videos into smaller web-ready MP4 files
One of the things I often run into when working on websites is video size.
A client records a quick video on a phone, uploads it to WordPress, and suddenly a page is trying to load a file that is hundreds of megabytes or even several gigabytes in size.
The answer is usually simple: compress the video before uploading it.
The problem is that many people don’t want to install desktop software, learn video settings, or work out which options they should choose. They just want a smaller version that still looks good on a website.
So I started building my own web-based video compression tool.
The goal wasn’t to create another online video converter. The goal was to create something simple that I could use myself and eventually make available as a free download for WordPress users.
The current version uses HandBrake on the server to process uploaded videos and produce a web-optimised MP4 file.
The frontend is deliberately simple.
Upload a video.
Choose 1080p or 720p.
Choose whether to keep the audio or remove it.
Click convert.
The system handles everything else.
One thing I wanted to avoid was multiple users overloading the server. Video conversion is CPU intensive and can quickly consume resources if several large jobs are running at the same time.
To solve that, the system only processes a single video at a time.
If somebody else is already converting a video, new visitors can see the current progress and wait for the queue to become available. Once the active conversion finishes, the form becomes available again.
Privacy was another important consideration.
Uploaded videos are not stored permanently.
Original uploads are removed after conversion and generated downloads are automatically deleted after they have been downloaded or once the expiry period has passed.
The current test system supports uploads up to 10GB and uses HandBrake’s H.264 encoder for maximum compatibility across devices and browsers.
During testing I have been seeing dramatic reductions in file sizes while maintaining quality that is more than suitable for website use.
The plugin is still in development and there are plenty of improvements I want to explore.
At the moment the focus is reliability, performance and making the workflow as simple as possible.
Once I am happy with the testing phase, the plan is to release it as a free WordPress plugin.
As with many projects on Web Workbench, it started as something I wanted for myself and gradually evolved into something that may be useful for other website owners too.
Try it for yourself
