This project is an API module that integrate with the PHP FFmpeg library. This module doesn't do anything by itself and is usually extended by other projects that do something useful with FFmpeg.

Installation

Follow the standard module installation guide (for Drupal 7 or Drupal 8) to install the PHP FFmpeg module. This module has a composer dependency (php-ffmpeg/php-ffmpeg). The Drupal 7 version depends on the Composer Manager module, so follow the instructions on its project page to install the third-party libraries that this module requires. See https://www.drupal.org/node/2404989 for for more information when using Drupal 8.

Usage

The module provides an administrative UI for the various configuration options exposed by the PHP FFmpeg library. To instantiate the PHP FFmpeg classes populated with the configuration options, call $ffmpeg = Drupal::service('php_ffmpeg'); or $ffprobe = Drupal::service('php_ffmpeg_probe'); (or $ffmpeg = php_ffmpeg(); and $ffprobe = php_ffmpeg_probe(); in Drupal 7) in your module. Refer to the PHP FFmpeg library's documentation for details on how to use the library.

The PHP FFMpeg library uses ffmpeg and ffprobe CLI executables, all its method accepting file paths expect paths usable are arguments for these executables. When using the library to process Drupal managed files, developer have to ensure
usage of local files paths or URL supported by ffmpeg and ffprobe as sources, and local file paths as destinations.

In Drupal 7, adapters are provided so the PHP FFmpeg library will use Drupal's logging and caching mechanisms. The Monolog module is also supported as an alternative logging solution.

Supporting organizations: 
Module development
Module development

Project Information

Downloads