PHP Classes

ffmpeg-maker: Build movies with images and audio using ffmpeg

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 357 All time: 6,939 This week: 79Up
Version License PHP version Categories
ffmpeg-maker 1.0.0GNU General Publi...5PHP 5, Graphics, Audio, Video
Description 

Author

This package can be used to build movies with images and audio using ffmpeg.

It can build movies by adding images as frames for the movies.

The image frames can also have animation effects like fade in or fade out.

Audio tracks may be added using separate audio files.

Innovation Award
PHP Programming Innovation award nominee
December 2017
Number 4
Sometimes it is useful to generate videos pragmatically to make special presentations.

The package can generate videos using FFMPEG to include frames defined by images, as well custom audio tracks.

Manuel Lemos
Picture of Raskin Veniamin
  Performance   Level  
Name: Raskin Veniamin <contact>
Classes: 12 packages by
Country: Russian Federation Russian Federation
Age: ???
All time rank: 2207 in Russian Federation Russian Federation
Week rank: 10 Up2 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 6x

Winner: 1x

Documentation

ffmpeg-maker

PHP library allow create simple movie with ffmpeg

Install

> TODO

Initialize object

Initialize object Movie

$mv = new Movie([
    'width'             => 640,
    'height'            => 480,
    'outputFile'        => 'movie.mp4',
    'outputDirectory'   => './out',
]);

Add frame

$mv->addFrame(new ImageFrame([
    'filePath'  => 'image1.jpg',
    'duration'  => 6,
    'effects'   => [
         FadeEffect::makeIn(1, 0),
         FadeEffect::makeOut(1, 4)
    ],
    'text'  => new Text([
         'value' => "Hello world!\nSome text.",
         'posX'  => '10',
         'posY'  => '20',
         'color' => '#ffff00',
         'box'   => true,
         'wrap'  => false,
    ])
]));

Add audio track

$mv->addAudio(new Audio([
    'filePath'  => 'audio.mp3',
]));

Build movie

$mm = new MovieMaker($mv);
$mm->build();


  Files folder image Files (15)  
File Role Description
Files folder imagesrc (1 file, 1 directory)
Files folder imagetest (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (15)  /  src  
File Role Description
Files folder imageModels (10 files)
  Plain text file MovieMaker.php Class Class source

  Files folder image Files (15)  /  src  /  Models  
File Role Description
  Plain text file Audio.php Class Class source
  Plain text file Effect.php Class Class source
  Plain text file FadeEffect.php Class Class source
  Plain text file Frame.php Class Class source
  Plain text file ImageFrame.php Class Class source
  Plain text file Input.php Class Class source
  Plain text file Movie.php Class Class source
  Plain text file Text.php Class Class source
  Plain text file VideoFrame.php Class Class source
  Plain text file ZoomEffect.php Class Class source

  Files folder image Files (15)  /  test  
File Role Description
  Plain text file MovieMakerTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:357
This week:0
All time:6,939
This week:79Up