{
  "title": "Automatic video editor",
  "video_id": "NNfYVNCjvUE",
  "published": "2024-02-28T12:48:22+0000",
  "complexity": "Normal",
  "old_url": "https://workflows-of-ai.com/workflow/automatic-video-editor",
  "description": "Cut video clips by prompt in Drupal: AI Interpolator OpenAI uses FFmpeg, OpenAI Vision and Whisper to find scenes by what is seen or said.",
  "subtitle": "Write what you want cut out of a video, like every shot with a pizza, and get the clips back from Drupal.",
  "summary": "A prompt cuts every pizza shot out of Ed Sheeran's Perfect video using the images, and Bill Clinton's denial out of a news clip using the audio. Keyframes go into image grids with timestamps, Whisper adds a timed transcript, and FFmpeg cuts the parts OpenAI points to. The setup from scratch on DDEV uses AI Interpolator OpenAI, the Token module and a content type, tested on Baby Shark.",
  "categories": [
    "Drupal AI"
  ],
  "intro_html": "<p>In this workflow we will use the AI Interpolator OpenAI module in Drupal to take a video and a prompt for what you want to extract from the video, and extract that into one concatenated file or multiple snippet files.</p><p>That way you can take a long video and say something like \"Extract all the places where he talks about Microsoft\" or \"Get me all the scenes where there is a person with a flag in their hand\" and you get video snippets back.</p><p>This is using FFmpeg together with OpenAI Vision and OpenAI Whisper to be able to read the videos. Then it asks for timestamps in the video and uses FFmpeg to extract this and save it back.</p><p>In the end we have created a search function for video, both on the audio and the visual part. Neat, isn't it?</p><p>The OpenAI cost for a 5 minute video is around 10 cents.</p>",
  "intro_added": false,
  "chapters": [
    "0:00 Pizza scenes from a prompt",
    "0:46 Drupal and the AI Interpolator",
    "2:17 Cutting Bill Clinton's denial",
    "3:41 How it sees and hears video",
    "5:00 Local setup with DDEV and FFmpeg",
    "6:25 Installing modules and OpenAI key",
    "8:52 The video extractor content type",
    "11:39 The OpenAI video extraction rule",
    "13:03 Testing it on Baby Shark",
    "14:30 Planned mobile reframing"
  ],
  "corrections": [
    [
      "Ed share on",
      "Ed Sheeran"
    ],
    [
      "Monica Linsky",
      "Monica Lewinsky"
    ],
    [
      "lnky",
      "Lewinsky"
    ],
    [
      "AI inator",
      "AI Interpolator"
    ],
    [
      "requires FFM",
      "requires FFmpeg"
    ],
    [
      "with DV",
      "with DDEV"
    ],
    [
      "running DV",
      "running DDEV"
    ],
    [
      "Json API",
      "JSON:API"
    ],
    [
      "graphql",
      "GraphQL"
    ],
    [
      "open AI",
      "OpenAI"
    ],
    [
      "open Ai",
      "OpenAI"
    ],
    [
      "Ai interpolator",
      "AI Interpolator"
    ],
    [
      "AI interpolator",
      "AI Interpolator"
    ],
    [
      "druple",
      "Drupal"
    ],
    [
      "workflows of ai.com",
      "workflows-of-ai.com"
    ],
    [
      "Premier Pro",
      "Premiere Pro"
    ],
    [
      "wi wig",
      "WYSIWYG"
    ],
    [
      "lamb server",
      "LAMP server"
    ],
    [
      "lamp server",
      "LAMP server"
    ]
  ],
  "ai_note": "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."
}