Skip to main content
Skip to main content

Drupal AI

Improve Media #3

Ask OpenAI to describe a video in Drupal Media, using keyframe grids and a Whisper transcript so it can both see and hear it.

About this video

This video is a little bit sloppy, but it's about a development feature - it will be in a release soon.

I just did some videos about how to set up the AI Interpolator to generate extra media data for the Media module for image, document and audio types.

This got me thinking about a way to do video as well, and I spent some hours last night coding this. It's currently available in the development version of the module, but hopefully it will also soon be available in the next release.

What this does is rasterize all the scene cuts/keyframes from the video onto multiple images. Then it also extracts the audio and sends that to OpenAI Whisper to get a transcription.

Then your prompt is sent together with these two components as context, for it to be able to "see" and "hear" the video.

Note that this only works with FFmpeg installed on your server.

This video is from before the AI Interpolator module became AI Automators, part of the AI module. Module and menu names have changed since, and some steps look different today.

Watch the video

0:00

Transcript

YouTube's automatic captions, lightly corrected. Click a line to jump to that moment in the video.

Chapters

Updated 2 min read

Other ways to consume this

Filed under Workflows Drupal AI
AI modified

Parts of this content were produced by AI.

How was AI used?

The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions.