PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 355 This week: 1All time: 6,947 This week: 571Up
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: 103 Up7 in Russian Federation Russian Federation Equal
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  
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:355
This week:1
All time:6,947
This week:571Up