Video (mp4) preview in panel

I had the same problem and thanks to your plugin, I got his to work.

I solved it with the exec() command just using ffmpeg.
For reference, here is the hook command I set up (extracting a thumbnail from the frame at 3 seconds):

  'hooks' => [
    'file.create:after' => function ($file) {
      if($file->type() === 'video') {
        exec('ffmpeg -y -i ' . $file->root() . ' -ss 3 -t 1 ' . $file->parent()->root() . '/' . F::name($file->filename()) . '.jpg');
      }
    }
  ]

So, this results in a card section like this (images and videos side by side):

Nice! However, the preview section in the file’s page is still empty:

20190722-133855_Screenshot_GoogleChrome

Is there any way to easily feed the already generated thumb into this preview section somehow? Via the file blueprint perhaps?

Thanks!

3 Likes