Download the PHP package javer/ffmpeg-transformer without Composer
On this page you can find all versions of the php package javer/ffmpeg-transformer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download javer/ffmpeg-transformer
More information about javer/ffmpeg-transformer
Files in javer/ffmpeg-transformer
Package ffmpeg-transformer
Short Description FFmpeg transformation command builder
License MIT
Homepage https://github.com/javer/ffmpeg-transformer
Informations about the package ffmpeg-transformer
FFmpeg transformer
This library simplifies usage of FFmpeg for complex transcoding of the media files in PHP applications.
Features:
- FFmpeg command builder
- Media profile builder
- Profile transformer
- Command transformer
Requirements
- PHP 8.0+
- php-ffmpeg/php-ffmpeg for extracting media profile directly from the media file.
Installation
Install the library using composer:
FFmpeg command builder
Enables you to build FFmpeg command line in OOP style.
For example, for retranscoding of the source media file in any format/codecs to mp4/h264/aac you need just write:
To build command line which performs this transformation just call $command->build()
which will return array of all command line arguments to achieve the goal:
More examples can be found in CommandTest.
Media profile builder
Enables you to create MediaProfile
for the given media file or from the given array.
From file:
From array:
Profile transformer
Performs calculation of the transformation which should be applied to the input MediaProfile to get output MediaProfile (usually reference).
It returns a new MediaProfile
which contains only necessary parameters which should be changed.
Command transformer
Builds a command for FFmpeg to perform necessary transformation (from the previous step) to transform input media file to the output media file.
It returns a Command
(see the first section) which should be run by ffmpeg to convert input media file to the reference.