|Classes of Vladimir Gorej||FFmpeg PHP||README.md||Download|
FFmpegPHP is a pure OO PSR-4 compatible PHP port of ffmpeg-php library (that was written in C). It adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP image functions. This works well for automatically creating thumbnail images from movies. FFmpegPHP is also useful for reporting the duration and bitrate of audio files (mp3, wma...). FFmpegPHP can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...)
Drop-in replacement for ffmpeg-php
FFmpegPHP can be used as a drop in replacement for ffmpeg-php library.
FFmpegPHP API documentation can be found here http://char0n.github.io/ffmpeg-php/.
Grab the source code located in
This command will create file called
Create a file called
Install the FFmpegPHP by running the following command:
After this command is successfully executed, the new directory called
To verify that everything works as expected create new file called
Before you run the script you need to also download the testing movie file:
Now run it.
The output should be something similar to the following:
Notice the first line (
Object Oriented interface
FFmpegPHP is build using PSR-4 standard and it's interface is purely Object Oriented. We're using standar OOP patterns to create our API.
On top of our OO interface, there is an additional one that provides full compatibility with original ffmpeg-php library.
Partnership with GoDaddy
GoDaddy started to use FFmpegPHP as part of it's services from November 2018. If you need a server with ffmpeg and FFmpegPHP installed on it contact GoDaddy and they'll do it for you as part of its "Expert Service". As author of FFmpegPHP I agreed to provide support for users coming from GoDaddy asking about FFmpegPHP. All incoming GoDaddy customers, please use GitHub issues as a support channel.