PHPackages                             vkr/ffmpeg-converter-bundle - 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. vkr/ffmpeg-converter-bundle

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

vkr/ffmpeg-converter-bundle
===========================

A bundle for Symfony2/3 that handles multimedia conversion using FFMPEG

1.0.4(8y ago)053MITPHPPHP &gt;=5.6

Since Aug 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/wladislavk/FFMPEGConverterBundle)[ Packagist](https://packagist.org/packages/vkr/ffmpeg-converter-bundle)[ Docs](https://github.com/wladislavk/FFMPEGConverterBundle)[ RSS](/packages/vkr-ffmpeg-converter-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

About
=====

[](#about)

This is a simple bundle that handles conversion of multimedia formats using the popular FFMPEG library. It depends on VKRCustomLoggerBundle to function.

Installation
============

[](#installation)

Besides enabling the bundle in `AppKernel.php`, you will also need to create to do some configuration.

First, add the following to `parameters.yml`:

```
ffmpeg_path: /path/to/ffmpeg/executable

```

Second, you will need to add FFMPEG arguments to `config.yml` under `vkr_ffmpeg_converter` key. There can be three groups of arguments: `video`, `audio` and `image`. Inside each one, there should be three keys: `extension` corresponds to the desired destination file extension, `input` and `output` are series of arguments for FFMPEG.

In FFMPEG, unlike most other command-line tools, arguments are not idempotent, in other words, argument's behavior depends on its position in the arguments list. Input arguments are the ones that go before the source filename, output arguments go between input and output file names. For details, refer to [FFMPEG manual](https://ffmpeg.org/documentation.html).

Note that you do not have to specify `-i` argument in your config.

Finally, you need to create a log file in your `app/logs` folder and make it script- writable.

Usage
=====

[](#usage)

The usage is very simple. Just write this in your controller:

```
$converter = $this->get('vkr_ffmpeg_converter.converter');
$sourceFile = new Symfony\Component\HttpFoundation\File\File('source/filename/with.path');
$destination = '/path/to/destination/dir/';
// corresponds to /app/logs/video_converter.log
$logFile = 'video_converter';
$converter->convertFile($sourceFile, $destination, $logFile);

```

You may also provide fourth argument to `convertFile()` which is maximum output file length in seconds (same as `-t` input argument).

Testing
=======

[](#testing)

It is highly recommended that you run functional tests shipped with this bundle before writing your production code. Functional tests will help you determine if your configuration is correct as well as if this bundle will work with your version of FFMPEG.

Currently, the functional test suite provides conversions between WEBM and MP4 and between JPEG and MP4. There are no audio conversions available.

To run tests, add the following to `config_test.yml` file:

```
imports:
    - { resource: parameters_test.yml }

```

Create `app/config/parameters_test.yml` file and add the following:

```
parameters:
    vkr_ffmpeg_converter:
        video:
            extension: 'mp4'
            input: ''
            output: '-c:v libx264 -crf 20'
        image:
            extension: 'mp4'
            input: '-loop 1'
            output: '-c:v libx264 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2"'

```

Run `phpunit -c app/ vendor/vkr/ffmpeg-converter-bundle/Tests` and see if all tests are green.

Re-run the tests after deployment to a live server.

Known limitations
=================

[](#known-limitations)

- There is only one set of settings per multimedia type. Therefore, you cannot specify different arguments for different input file types or multiple ways of conversion.
- There can be only one input file. Therefore, you cannot do such things as gluing multiple files together.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~71 days

Total

5

Last Release

3275d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79f5fa971e7fda7a6180c1bdfca4f819a43b7681ec4e04c66b184a082fb5a20f?d=identicon)[wladislavk](/maintainers/wladislavk)

---

Top Contributors

[![wladislavk](https://avatars.githubusercontent.com/u/11371476?v=4)](https://github.com/wladislavk "wladislavk (7 commits)")

---

Tags

imageSymfony2conversionaudiovideoffmpegsymfony3multimedia

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vkr-ffmpeg-converter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/vkr-ffmpeg-converter-bundle/health.svg)](https://phpackages.com/packages/vkr-ffmpeg-converter-bundle)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k21.7M163](/packages/php-ffmpeg-php-ffmpeg)[soluble/mediatools

FFMpeg video/audio/subs conversions, thumbnails, audio extraction, query...

1451.7k](/packages/soluble-mediatools)[pulse00/ffmpeg-bundle

Symfony bundle to provide PHP-FFmpeg as a Symfony service (https://github.com/alchemy-fr/PHP-FFmpeg)

57447.2k1](/packages/pulse00-ffmpeg-bundle)[codescale/ffmpeg-php

PHP wrapper for FFmpeg application

495270.5k1](/packages/codescale-ffmpeg-php)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[buggedcom/phpvideotoolkit

PHPVideoToolkit is a set of classes aimed to provide a modular, object oriented and accessible interface for interacting with videos and audio through the FFmpeg program.

26382.1k1](/packages/buggedcom-phpvideotoolkit)

PHPackages © 2026

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