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

le72’s picture

+1

PascalAnimateur’s picture

I'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