FFmpeg Integration or Native PHP Extension for Media Processing #16
gavriel-adi
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
@gavriel-adi, afaik, many php develoeprs rely on https://github.com/PHP-FFMpeg/PHP-FFMpeg and it solves the tasks in most cases. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Video processing is a heavy task (it may take a while). It shouldn't be done in context of PHP HTTP request, but should be offloaded. This may be done using commercial products (like "Zend Job Queue") or "manually" implementing similar solution. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Many modern PHP applications (news platforms, social apps, media galleries) rely heavily on server-side media processing, especially for video and audio. Currently, most projects depend on system calls to ffmpeg, often using exec() or similar, which is fragile, platform-dependent, and security-sensitive.
Proposal: Introduce native support for common media-processing tasks in PHP — either by integrating a simplified subset of FFmpeg as an official extension, or by defining a standardized FFI/extension wrapper that is easy to install and use across environments.
Key features:
Generate video thumbnails
Transcode audio/video formats
Extract metadata (duration, resolution, codecs)
Normalize audio or trim videos
Benefits:
Removes the need for shell access and external binaries
Safer, more portable, and performance-optimized
Enhances use cases for CMSs, video platforms, and audio podcast tools written in PHP
Easier for shared hosting or restricted environments
Would love to see this as part of the broader effort to modernize PHP's media capabilities.
Beta Was this translation helpful? Give feedback.
All reactions