The PHP-Army-Knife-for-Video

The phpffmpeg class is a PHP wrapper around FFmpeg, but it also joins the combined functionality of other video commandline tools together such as mencoder, flvtool2, etc. all into one, easy to use wrapper class.

Note that this is the PHP-only class, not to be confused with the ffmpeg-php PHP extension.

It can perform video format conversion, extract video frames into separate image files, and assemble a video stream from a set of separate video images.
The output video file format, video and audio bit rate and sample rate, video dimensions, and aspect ratio can be set. Information about the media file such as duration, bit rate, frame rate, format, dimensions, display aspect ratio, pixel aspect ratio, audio stereo, audio frequency, and audio format can be extracted without any other additional libraries such as ffmpeg-php.



Download and SVN

The package comes with a bunch of examples such as:

  • how to configure the class
  • how to extract thumbnails from a video
  • how to convert uploaded video to FLV
  • how to convert an image sequence to a MPEG file

Support This Project