0

I am building a website that people upload a video and then they can cut a piece of the video. I am using FFMPEG.

I know how to do this using pure PHP, but since my website is based on Drupal, I prefer to use the Drupal modules.

I saw PHP FFmpeg and FFmpeg Wrapper modules that work with FFMPEG. I would like to know is there any advantage in using these modules or using the pure PHP is preferable? Can these modules save the clipped videos as a node or not?

Thanks in advance.

1

The only advantage these modules is assistance in managing your dependency on FFMPEG and how you want interface it in PHP code.

  • PHP FFMPEG is a helper module for managing a dependency on the PHP FFmpeg library. If you want to use the PHP FFmpeg library, and require a Drupal module that will ensure your module has FFMPEG available to it, this module will help.
  • FFmpeg Wrapper is a handful of custom functions that interface with FFMPEG via PHP's passthru() function. If your PHP environment can execute passthru() and you want some basic functions to execute some ffmpeg console commands, this module will help.

Both are API modules that don't provide any other integration with Drupal.

| improve this answer | |
  • Thank you for your response. What functionalities are these modules APIs provide? For example consider this code exec("ffmpeg -i yellowstone.mp4 -ss 00:03:07.5 -to 00:00:15 -c copy yellowstone_cut.mp4");, which cuts some section of a video file. Is there any special function in these modules that does this? or I still need to use this pure PHP&FFMPEG code? I couldn't find any tutorial for these modules I would be appreciated for any tutorial link. Thanks. – M a m a D Jul 7 '16 at 5:11
  • 1
    Browse the source & docs to find the answer to that. Both are wrappers around the FFPEG binary; if it's supported you should find -ss, -to and other argument strings that get passed to the binary. PHP-FFMpeg appears to have a clip() method which looks like what you need. FFmpeg Wrapper is a pretty thin wrapper so it should be easier to find what options it supports than with PHP-FFMpeg's OOD. – Shawn Conn Jul 7 '16 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.