PHPackages                             alexwindsor/simple-media-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alexwindsor/simple-media-tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alexwindsor/simple-media-tools
==============================

04PHP

Since Sep 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/alexwindsor/simple-media-tools)[ Packagist](https://packagist.org/packages/alexwindsor/simple-media-tools)[ RSS](/packages/alexwindsor-simple-media-tools/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

simple-media-tools
==================

[](#simple-media-tools)

Some custom tools for editing video and audio files using mostly ffmpeg

Initialise an object with the path and filename of the media file in question. It currently works with the following types:

image/jpeg audio/mpeg video/mp4 video/quicktime

eg.

$video = new SimpleMediaTools('/full/path/to/movie.mp4');

On initialisation, various properties are gleaned depending on the mimeType, using the ffprobe command and the file command for images, such as dimensions, duration for video and audio.

echo $video-&gt;media\_data\['width'\]; echo $video-&gt;media\_data\['duration'\]; print\_r($video-&gt;media\_data);

The following methods are currently included:

setVideoPosterImage($secs, $image\_filename)

Makes an image screengrab from the video.

$secs - number of seconds into a video from where to generate an image $image\_filename - what to save the image as

rotate($direction)

Rotates both an image or a video

$direction = 1 clockwise $direction = 2 counter clockwise

resizeToWidth($width, $suffix = '')

Resizes an image to the given width, maintaining height ratio

$width - width in pixels to resize the image to $suffix - what to call the resized image

crop($start\_time, $end\_time)

Removes time from the beginning and end of a video or audio file

$start\_time/$end\_time - start/end time in seconds (works with milliseconds as float) in relation to original media

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d330c408ed4a9ee53e23c1f4e35214df2e4e6553709853e08b39714c9e1bd162?d=identicon)[alexwindsor](/maintainers/alexwindsor)

---

Top Contributors

[![alexwindsor](https://avatars.githubusercontent.com/u/45699206?v=4)](https://github.com/alexwindsor "alexwindsor (6 commits)")

### Embed Badge

![Health badge](/badges/alexwindsor-simple-media-tools/health.svg)

```
[![Health](https://phpackages.com/badges/alexwindsor-simple-media-tools/health.svg)](https://phpackages.com/packages/alexwindsor-simple-media-tools)
```

###  Alternatives

[liip/rmt

Release Management Tool: a handy tool to help releasing new version of your software

461462.8k78](/packages/liip-rmt)[smile/module-multi-coupon

Extension of Magento2 Sales Rule to allow multiple coupon usage.

102.9k](/packages/smile-module-multi-coupon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
