PHPackages                             packet/ffmpeglib - 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. [Image &amp; Media](/categories/media)
4. /
5. packet/ffmpeglib

ActiveLibrary[Image &amp; Media](/categories/media)

packet/ffmpeglib
================

FFMpeg Library

2.0.1(5y ago)114.7k1[1 PRs](https://github.com/KaloyanYosifov/FFmpeg-Library/pulls)MITPHP

Since Jul 15Pushed 1y agoCompare

[ Source](https://github.com/KaloyanYosifov/FFmpeg-Library)[ Packagist](https://packagist.org/packages/packet/ffmpeglib)[ RSS](/packages/packet-ffmpeglib/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (0)

FFmpeg-Library
==============

[](#ffmpeg-library)

FFMPEG library, available to anyone.

This library is create for personal use, but if you want to use it feel free to use it :) . To use it you will need to go deeper and see what the functions are doign, since it is a personal use i am not going to document everything

### How To use

[](#how-to-use)

First you need all of the libraries to use it

```
use FFMpegLib\Initializer;
use FFMpegLib\Executor\Executor;
use FFMpegLib\Commands\VideoDurationCommand;
use FFMpegLib\Commands\CreateImagesCommand;
use FFMpegLib\Commands\GifCommand;
use FFMpegLib\FileFinder\FileFinder;

```

Then you need to initalize it

```
Initializer::initializeFFMpeg();

```

You can get video duration with

```
$videoDurationCommand = new VideoDurationCommand('video.flv', APP_PATH);

Executor::executeCommand($videoDurationCommand);

$videoDurationCommand->getDuration(); // it returns an instance of Time

```

To create images suitable for gif:

```
$imagesPath = APP_PATH . '/assets/images/image.png';
$videoPath = APP_PATH . '/assets/videos/video.flv';

$createImagesCommand = new CreateImagesCommand(
	$videoPath,
	$imagesPath,
	'00:30:40',
	'00:0:03',
	$videoDurationCommand->getDuration());

Executor::executeCommand($createImagesCommand);

```

Take note you need to delete the images yourself as the option is not yet implemented

You can create a gif with:

```
$gifCommand = new GifCommand(APP_PATH . '/assets/images/image.png', APP_PATH . '/assets/images/t.gif');
Executor::executeCommand($gifCommand);

```

You need to specify the full path of the video for every command except for the duration, there i use a finder for the base path, but you can pass the full path as well.

to get the images/frames created from createImagesCommand use

```
$createImagesCommand->framesCreated();

```

The time Class

methods:

```
getSeconds(); //returns seconds, you need a Time object to call all of theese methods
getMinutes();
getHours();
getFullTime();
getTimeInSeconds();
getTimeInMinutes();
create();// static method -- Time::create()
createFromString(); // static method -- Time::createFromString()

```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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.

###  Release Activity

Cadence

Every ~396 days

Total

3

Last Release

2066d ago

Major Versions

1.0.0 → 2.0.02020-09-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7af67faceb3c62fcf7b88bd41fb6d0c6a4d79c7c810aed376622b549864f498?d=identicon)[Base Test](/maintainers/Base%20Test)

---

Top Contributors

[![KaloyanYosifov](https://avatars.githubusercontent.com/u/32775332?v=4)](https://github.com/KaloyanYosifov "KaloyanYosifov (11 commits)")[![kyosifov](https://avatars.githubusercontent.com/u/47237885?v=4)](https://github.com/kyosifov "kyosifov (2 commits)")

### Embed Badge

![Health badge](/badges/packet-ffmpeglib/health.svg)

```
[![Health](https://phpackages.com/badges/packet-ffmpeglib/health.svg)](https://phpackages.com/packages/packet-ffmpeglib)
```

###  Alternatives

[liip/imagine-bundle

This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.

1.7k38.3M217](/packages/liip-imagine-bundle)[spatie/image

Manipulate images with an expressive API

1.4k54.4M138](/packages/spatie-image)[ambroisemaupate/intervention-request

A customizable Intervention Image wrapper to use image simple re-sampling features over urls and a configurable cache.

4242.4k2](/packages/ambroisemaupate-intervention-request)[spatie/pixelmatch-php

Compare images using PHP

5783.7k9](/packages/spatie-pixelmatch-php)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)

PHPackages © 2026

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