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 2w 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 77% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

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

2114d 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

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)

PHPackages © 2026

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