The simplest FFmpeg/FFprobe wrapper.
composer required almajiro/ffsachiko
use Almajiro\FFSachiko\FFmpeg;
use Almajiro\FFSachiko\FFmpeg\Parameters\Input;
use Almajiro\FFSachiko\FFmpeg\Parameters\Threads;
use Almajiro\FFSachiko\FFmpeg\Parameters\VideoFilters;
use Almajiro\FFSachiko\FFmpeg\Parameters\VideoFilters\Scale;
$file = '~/videos/owarimonogatari.mp4';
$ffmpeg = new FFmpeg('/usr/local/bin/ffmpeg');
$file = $ffmpeg->open(new Input($file));
// Define how many core want to use
$file->addParameter(new Threads(4));
// Declare new VideoFilters class
$videoFilter = new VideoFilters();
// Resize video size to 640x320
$videoFilter->addFilter(new Scale(640, 320));
$file->addParameter($videoFilter);
$file->saveAs('output/video.mp4')->convert();
- Fork it ( http://github.com/almajiro/ffsachiko )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request