Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm looking for a way to automatically convert uploaded video files using FFmpeg / avconv. An image thumbnail could also be generated as a side-benefit.
Would hook_file_presave
be a good starting point ? I'm guessing I should replace the original file with the converted one, how would I go about doing this in code?
Comments
Comment #1
le72+1
Comment #2
PascalAnimateur CreditAttribution: PascalAnimateur commentedI've created a module that exposes audio/video conversion functionnality through Rules / VBO, which can be used to achieve what I described above (thumbnail generation, conversion).
The (sandbox) module is here:
https://www.drupal.org/sandbox/pascalanimateur/2377753