PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-11-17 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 125 This week: 5All time: 8,665 This week: 111Up
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
Nominee
Vote
This package can be used to build movies with images and audio using ffmpeg.

Manuel Lemos
  Performance   Level  
Name: Raskin Veniamin <contact>
Classes: 8 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Details

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  
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  /  src  
File Role Description
Files folder imageModels (10 files)
  Plain text file MovieMaker.php Class Class source

  Files folder image Files  /  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  /  test  
File Role Description
  Plain text file MovieMakerTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:125
This week:5
All time:8,665
This week:111Up