PHPackages                             projektgopher/laravel-ffmpeg-tween - 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. projektgopher/laravel-ffmpeg-tween

Abandoned → [projektgopher/laravel-ffmpeg-tools](/?search=projektgopher%2Flaravel-ffmpeg-tools)Library[Utility &amp; Helpers](/categories/utility)

projektgopher/laravel-ffmpeg-tween
==================================

Generates strings for use in ffmpeg commands to tween between values with easings.

v0.8.1(4mo ago)523762[1 issues](https://github.com/ProjektGopher/laravel-ffmpeg-tools/issues)MITPHPPHP ^8.1CI passing

Since Mar 20Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/ProjektGopher/laravel-ffmpeg-tools)[ Packagist](https://packagist.org/packages/projektgopher/laravel-ffmpeg-tween)[ Docs](https://github.com/projektgopher/laravel-ffmpeg-tools)[ RSS](/packages/projektgopher-laravel-ffmpeg-tween/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (13)Used By (0)

Tools and utilities to help generate complex strings for FFMpeg in Laravel.
===========================================================================

[](#tools-and-utilities-to-help-generate-complex-strings-for-ffmpeg-in-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a14425e711dfc0581b9ac378ec09fc3f2443d3e959193f6973815f4c85679de5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f6a656b74676f706865722f6c61726176656c2d66666d7065672d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/projektgopher/laravel-ffmpeg-tools)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9accaaa2ba3e54b5b10e5cad6af259a71daed52c523cefe95987188c479672ca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70726f6a656b74676f706865722f6c61726176656c2d66666d7065672d746f6f6c732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/projektgopher/laravel-ffmpeg-tools/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f329054fbe7c795969536bf68530849243445a6d91cf2070049de45a72096ab8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70726f6a656b74676f706865722f6c61726176656c2d66666d7065672d746f6f6c732f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/projektgopher/laravel-ffmpeg-tools/actions?query=workflow%3A%22phpstan%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/cd58cd257d6898617879163553c5ac0aedbdf449eaea40d8bfb8871b64056e08/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726f6a656b74676f706865722f6c61726176656c2d66666d7065672d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/projektgopher/laravel-ffmpeg-tools)

FFMpeg can be opaque in its commands. Take the following example:

```
if(lt(t\,5)\,((w*7/8)-text_w-200)\,if(gt(t\,5+2)\,((w*7/8)-text_w)\,((w*7/8)-text_w-200)+((((w*7/8)-text_w)-((w*7/8)-text_w-200))(if(eq(((t-5)/2)\,0)\,0\,if(eq(((t-5)/2)\,1)\,1\,pow(2\,-10((t-5)/2))*sin((((t-5)/2)*10-0.75)*2.0943951023932)+1))))))
```

This **completely bonkers** string will calculate *just* the `x` position of a text element. It'll wait 5 seconds, animate the element from 200px left of its final position over 2 seconds with an easing of `EaseOutElastic`. How would you approach changing this to an easing of `EaseOutBounce`? Not gonna happen.

This package allows you to build these string in a fluent way that's easily maintainable in a way that feels familiar to php and Laravel devs. The following example will output the exact same string as above, but imagine how much easier it'll be to change:

```
$finalXpos = '(w*7/8)-text_w';
$x = (new Tween())
    ->from("{$finalXpos}-200")
    ->to($finalXpos)
    ->delay(Timing::seconds(5))
    ->duration(Timing::seconds(2))
    ->ease(Ease::OutElastic);
```

The API is modelled after [The GreenSock Animation Platform (GSAP)](https://greensock.com/get-started/#whatIsGSAP)and all the math for the easings is ported from [Easings.net](https://easings.net). The stringification of these math strings is ported from [This Gitlab repo](https://gitlab.com/dak425/easing/-/blob/master/ffmpeg/ffmpeg.go)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require projektgopher/laravel-ffmpeg-tools
```

Usage
-----

[](#usage)

- [Easing](docs/Easing.md)
- [Expressions](docs/Expressions.md)
- [Filters](docs/Filters.md)
- [Filter Graphs](docs/FilterGraphs.md)
- [Timelines and Keyframes](docs/Timelines.md)
- [Tweening](docs/Tweening.md)

### Using outside of a Laravel application

[](#using-outside-of-a-laravel-application)

For now this package can only be used within a Laravel app, but there are plans to extract the core functionality into a separate package that can be used without being bound to the framework.

Testing
-------

[](#testing)

- [Instructions](docs/Testing.md)

Changelog
---------

[](#changelog)

Please see [RELEASES](releases) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

A **big** "Thank You" to [EXACTsports](https://github.com/EXACTsports) for supporting the development of this package.

- [Len Woodward](https://github.com/ProjektGopher)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance74

Regular maintenance activity

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.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 ~100 days

Recently: every ~245 days

Total

11

Last Release

142d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63312522f1920cf5b3c34ea474511a484162b36166a33ae4b9fde6c65ab2c2fc?d=identicon)[ProjektGopher](/maintainers/ProjektGopher)

---

Top Contributors

[![ProjektGopher](https://avatars.githubusercontent.com/u/1688608?v=4)](https://github.com/ProjektGopher "ProjektGopher (28 commits)")[![edgrosvenor](https://avatars.githubusercontent.com/u/1053395?v=4)](https://github.com/edgrosvenor "edgrosvenor (1 commits)")

---

Tags

ffmpegffmpeg-wrapperlaravellaravel-packagephpphp81tweentweeninglaravelProjektGopherlaravel-ffmpeg-tools

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/projektgopher-laravel-ffmpeg-tween/health.svg)

```
[![Health](https://phpackages.com/badges/projektgopher-laravel-ffmpeg-tween/health.svg)](https://phpackages.com/packages/projektgopher-laravel-ffmpeg-tween)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[projektgopher/laravel-ffmpeg-tools

Generates strings for use in ffmpeg commands to tween between values with easings.

5424.6k](/packages/projektgopher-laravel-ffmpeg-tools)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)

PHPackages © 2026

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