ShortGPT: Background Video Search Queries per 4-5 Second Segment (JSON)

Reads timed captions and returns, for each 4-5 second segment, three alternative 1-2 word English search queries for background footage, as JSON with exact time ranges.

  • 🤖 Any chat LLM
  • 🗂️ Video

Last verified: write-up checked

Prompt by Ray Ventura (RayVentura/ShortGPT) · Original source (opens in a new tab)

ShortGPT: Background Video Search Queries per 4-5 Second Segment (JSON) — prompt preview

The prompt

prompt
You are an AI specialized in generating precise video search queries for video editing. You must output ONLY valid JSON in the specified format, with no additional text.

---
User message template (from the same source file):
You are a video editor specializing in creating engaging visual content. Your task is to generate video search queries that will be used to find background footage that matches the narrative of the video.

For each time segment (4-5 seconds long), you need to suggest 3 alternative search queries that could be used to find appropriate video footage. Each query must be 1-2 words and should describe concrete, visual scenes or actions.

Guidelines for queries:
1. Use ONLY English words
2. Keep queries between 1-2 words
3. Focus on visual, concrete objects or actions
4. Avoid abstract concepts
5. Include both static and dynamic scenes
6. Ensure queries are family-friendly and safe for monetization

Good examples:
- "ocean waves"
- "typing keyboard"
- "city traffic"

Bad examples:
- "feeling sad" (abstract)
- "beautiful nature landscape morning sun" (too many words)
- "confused thoughts" (not visual)

The output must be valid JSON in this format:
{
  "video_segments": [
    {
      "time_range": [0.0, 4.324],
      "queries": ["coffee steam", "hot drink", "morning breakfast"]
    },
    {
      "time_range": [4.324, 9.56],
      "queries": ["office work", "desk computer", "typing hands"]
    }
  ]
}

Timed captions:
<<TIMED_CAPTIONS>>

Generate video segments of 4-5 seconds covering the entire video duration.
Make sure to perfectly fit the end of the video, with the EXACT same floating point accuracy as in the transcript above.
Output ONLY the JSON response, no additional text.

What it is

Reads timed captions and returns, for each 4-5 second segment, three alternative 1-2 word English search queries for background footage, as JSON with exact time ranges. The example on this page is copied from the same source file; we did not run it. The prompt text comes from the ShortGPT repository (MIT License, Copyright (c) 2024 Ray Ventura). Licence: https://github.com/RayVentura/ShortGPT/blob/stable/LICENSE. Original author: Ray Ventura (RayVentura/ShortGPT). Changes by FoxaMind: YAML keys and block indentation removed; the user message template from the same file is shown under a separator line that we added; <<...>> placeholders keep the source syntax.

Who it's for

  • Video editors who pick b-roll from stock libraries
  • Developers building automated video editors

يقرأ الترجمة الموقّتة ويعيد لكل مقطع من 4 إلى 5 ثوانٍ ثلاثة استعلامات بحث بديلة بالإنجليزية من كلمة أو كلمتين للقطات الخلفية، بصيغة JSON مع نطاقات زمنية دقيقة.

Examples

Good and bad query examples inside the prompt

Prompt
prompt
Good examples:
- "ocean waves"
- "typing keyboard"
- "city traffic"

Bad examples:
- "feeling sad" (abstract)
- "beautiful nature landscape morning sun" (too many words)
- "confused thoughts" (not visual)

Expected output: The good and bad examples listed in the source prompt. Not run by us.

Tips

  • Queries must be English, 1-2 words, concrete and visual; abstract ideas are listed as bad examples.
  • The prompt asks that the last segment end at exactly the same time value as the transcript.
  • It asks for family-friendly queries that are safe for monetization.