Skip to content

gizmola/PHP-FFmpeg

 
 

Repository files navigation

#PHP FFmpeg

Build Status

An Object Oriented library to convert video/audio files with AVConv / FFmpeg.

Check another amazing repo : PHP FFMpeg extras, you will find lots of Audio/Video formats there.

##Documentation

Read The Documentation at Read The Docs !

##API Browser

Browse the API

##Usage Example

$x264 = new X264();
$x264->setDimensions(320, 240);

$ffmpeg->open('Video.mpeg')
    ->encode($new WebM(), 'file.webm')
    ->encode($x264, 'file.mp4')
    ->encode($new Ogg(), 'file.ogv')
    ->close();

##Getting progress information

$progressHelper = new FFMpeg\Helper\AudioProgressHelper(function($percent, $remaining, $rate) {
	echo "Current progress: " . $percent "%\n";
	echo "Remaining time: " . $remaining " seconds\n";
});

$ffmpeg->open('Audio.wav')
	->attachHelper($progressHelper)
    ->encode(new Mp3(), 'file.mp3')
    ->close();

##Using with Silex Microframework

use FFMpeg\SilexServiceProvider;
use Silex\Application;

$app = new Application();
$app->register(new FFMpegServiceProvider());

##License

This project is licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 68.5%
  • JavaScript 20.9%
  • Python 6.7%
  • Shell 3.9%