This module handles video processing within Drupal, automatically converting uploaded videos into various formats, generating thumbnails, and creating adaptive streams. It integrates seamlessly with the Media Library and allows for flexible configuration through profiles and plugins, offering features like transcription and extensibility for developers.
FFmpeg Media converts the videos in Drupal Media with FFmpeg 8 or 9. Uploads stay in Drupal's own Media workflows: Media Library, Media forms and any entity form that embeds a media or file field. After a Media item is saved, queued conversions produce progressive files, HLS and DASH streams, thumbnails and other derived assets, and a player or your own formatter serves them.
The current release is 1.0.0-beta2, a pre-release. It is not covered by Drupal's security advisory policy, and configuration, admin UI and storage layout may still change. The extension API named in ffmpeg_media.api.php is the exception and keeps its compatibility promise for all of 1.x.
Features
- Queue-based conversion on Advanced Queue: every video waits in one conversion queue that one worker command (
drush ffmpeg:worker) converts, with retry with backoff, a dead-letter list, stuck-process recovery and recovery of conversions whose worker was lost. Uploads are always queued, and workers wait instead of failing when the disk is too full. - Conversion profiles as config entities (
ffmpeg_media.profile.*): containers, codecs, quality and processors, validated on save and on configuration import. Fourteen profiles ship, five of them adaptive with the streaming submodule. H.264 / AAC (MP4 or HLS) is the default for new sites; AV1 and VP9 stay available. - Per-field configuration in Manage Display: each video field chooses its own profile and whether new uploads convert automatically. Single Media items can also be converted on demand.
- 8 codecs: H.264, HEVC, AV1, VP9, VVC (experimental), Apple ProRes, FFV1 and JPEG XL.
- 7 outputs: MP4, WebM, MKV, FLV and a JPEG XL still of one representative frame; HLS and DASH with the streaming submodule. Live streaming (RTP, WHIP) is not supported.
- 13 processors: video metadata, audio normalization, multi-language audio tracks and manifests in the base module; thumbnails, GIFs, segment thumbnails and segment GIFs in the image submodule; HDR passthrough or tone mapping to SDR, watermarks, subtitle burn-in and soundtrack normalization in the advanced submodule; Whisper transcription in the Whisper submodule.
- Hardware acceleration with auto-detection of NVENC, VAAPI, QSV, AMF and Vulkan on supported Linux hosts, a circuit breaker, and software fallback that a profile can forbid. An encoder is used only after FFmpeg encoded test frames with it.
- Private delivery: outputs of a private source are stored under
private://and served only after Drupal checks view access on the owning Media item. Every HLS and DASH playlist, segment and subtitle request is authorized the same way. Private HLS and DASH keep playing after a backup restore or a storage move. Web-server delivery (nginxX-Accel-Redirect, ApacheX-Sendfile) and signed segment URLs are optional. - Subtitles and audio: multi-language WebVTT tracks for HLS and DASH, one embedded HLS subtitle track, and multi-language audio renditions.
- Third-party players: converted sources and posters are injected into the Video.js and Plyr formatters. Custom formatters use
VideoSourceResolverInterface. - Operations: status-report checks for FFmpeg, FFprobe, queues, workers and storage; liveness and readiness probes that can require a token; metrics in Prometheus and JSON format; progress endpoints; conversion lifecycle events; 30 Drush commands.
Submodules
Enable only what you need. The base module converts and stores outputs on its own.
ffmpeg_media_streaming: HLS and DASH outputs, representation ladders, optional per-title bitrate analysis and GOP alignment.ffmpeg_media_player: a Vidstack player for MP4, WebM, HLS and DASH. Its local mode serves Vidstack, HLS.js and DASH.js from the module without third-party asset requests.ffmpeg_media_ui: admin dashboard, conversion actions, poster selection, progress display and the dead-letter list. Requiresffmpeg_media_image.ffmpeg_media_image: thumbnail, animated GIF, segment-thumbnail and segment-GIF processors.ffmpeg_media_advanced: HDR, two-pass encoding, watermark, subtitle burn-in and normalization processors.ffmpeg_media_whisper: VTT and SRT transcripts with the whisper.cpp CLI (whisper-cli). Transcription runs on your own host; no audio or transcript is sent to an external service. The CLI and model are not bundled.ffmpeg_media_cdn: upload of converted outputs to AWS S3 or an S3-compatible provider, CDN URL rewriting, CloudFront invalidation and remote cleanup. Credentials are read from environment variables, a Key module reference or Drupal's State storage, never from exported configuration.
Requirements
Drupal 11.3 and later 11.x are declared; the release gates run 11.4.10, and 11.3 itself is not tested. Drupal 12 is experimental, tested on 12.0.0-beta2. PHP 8.5 or later. FFmpeg FFmpeg and FFprobe 8.x or 9.x on every web, cron and queue-worker host. Not bundled. The shipped software AV1 profiles need an FFmpeg build withlibsvtav1.
Database
Any database Drupal core supports. Production use is tested on MariaDB and MySQL only.
Advanced Queue
1.7 (~1.7.0), installed by Composer. The module declares the compatibility patch itself, so Composer Patches 2.x applies it. It is required on Drupal 12 and removes deprecations on Drupal 11.
Other patches
Robo on Drush-based projects; Plyr and Video.js only on sites that run them. Drupal 12 also needs composer-drupal-lenient, Drush 14 and, for the optional Symfony 8.1 core patch, a source install of Core.
Security advisories
Not covered. Beta 2 is a pre-release.
Installation
Install cweagans/composer-patches:^2.0 in your root project before requiring the module; nothing is patched without it. The module declares its Advanced Queue patch itself. The installation guide has the composer.json entries for the other patches a site needs, the download commands and their SHA-256 checksums. Then:
composer require 'drupal/ffmpeg_media:^1.0@beta' composer patches-relock composer reinstall drupal/core drupal/advancedqueue --prefer-dist drush en ffmpeg_media -y drush cr drush ffmpeg:status
Check /admin/reports/status afterwards. It reports FFmpeg, FFprobe, queue workers and storage. Uploads wait in the queue until a worker runs: start drush ffmpeg:worker and keep it running as a systemd service, as queue processing shows.
Quick start
Two recipes create a ready video media type with auto-conversion, the Vidstack player, the conversion profiles and the queue:
drush recipe web/modules/contrib/ffmpeg_media/recipes/ffmpeg_media_quickstart drush recipe web/modules/contrib/ffmpeg_media/recipes/ffmpeg_media_streaming_quickstart
The second one also enables HLS streaming. To set up an existing media type instead: choose the Converted Video formatter for its video field in the Default view display, pick a profile and enable auto-convert. Profiles are managed at /admin/config/media/ffmpeg-media/profiles, settings at /admin/config/media/ffmpeg-media.
Upload a video at /media/add/video and run drush ffmpeg:worker --stop-when-empty once to convert it. New conversion queues default to the Drush worker; for production keep one supervised worker running, see queue processing.
Updating
From 1.0.0-beta1: read the upgrade guide first. In short:
- Stop new input, let the FFmpeg Media queues empty, stop cron and every conversion worker, and back up the database, source files and output storage as one unit.
- Deploy the complete module tree and clear the compiled container before the first full bootstrap,
drush updbincluded (the guide gives the database-specific command). - Run
drush cr,drush updb -yanddrush cr, thendrush ffmpeg:status. - Replace the two worker units by one
drush ffmpeg:worker, choose an H.264 default if you want one, and export your configuration.
From an alpha release: update to 1.0.0-beta1 first and run all its database updates, then update to the current release. The update hooks of the alpha releases are no longer included, and the database update refuses a direct jump from an alpha.
Known limitations
- Hardware encoding: this release's evidence has no positive run on real GPU hardware (Beta 1 was tested with NVIDIA NVENC only).
- CDN delivery was tested against MinIO only.
- PostgreSQL and SQLite are untested for production use. Playback was not verified on real Apple devices.
- Mutation testing is advisory in this release and did not reach its 90 % goal (last complete local campaign: 85.6 % over 38 of 40 shards); it becomes blocking again in 1.0.0-beta3.
- The player offers only the formats of the display's profile. MKV, FLV and JPEG XL are stored but not offered for browser playback.
- Transcriptions run from a Drupal core queue; run it in a supervised worker for long recordings.
The complete list is in the changelog.
Documentation
- README and documentation index
- Drush commands
- FFmpeg features and hardware matrix
- Whisper setup
- Security model and architecture and extension points
FFmpeg and codec licensing
The module runs an external FFmpeg binary and bundles no codec. The license of an FFmpeg build and any codec patent obligations depend on that build and on your use; review them for your deployment.
Ask your assistant about FFmpeg Media
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta2 | Pre-release | 11 | PHP 8.5 | Oct 18, 2026 | |
| 1.0.0-beta1 | Pre-release | 11 | PHP 8.5 | Sep 19, 2026 | |
| 1.0.0-alpha11 | Pre-release | 11 | Jul 3, 2026 | ||
| 1.0.0-alpha10 | Pre-release | 11 | Jul 2, 2026 | ||
| 1.0.0-alpha9 | Pre-release | 11 | May 31, 2026 | ||
| 1.0.0-alpha8 | Pre-release | 11 | May 6, 2026 | ||
| 1.0.0-alpha7 | Pre-release | 11 | Mar 20, 2026 | ||
| 1.0.0-alpha6 | Pre-release | 11 | Mar 8, 2026 | ||
| 1.0.0-alpha5 | Pre-release | 11 | Mar 6, 2026 | ||
| 1.0.0-alpha4 | Pre-release | 11 | Mar 2, 2026 |