VideoLingo: Shorten a Subtitle That Is Too Long for Its Voiceover Slot

Given a subtitle and its duration in seconds, slightly shortens the line by dropping filler words and unneeded modifiers while keeping meaning and structure, and returns a short analysis plus the result as JSON.

  • 🤖 Any chat LLM
  • 🗂️ Video

Last verified: write-up checked

Prompt by Huanshere (Huanshere/VideoLingo) · Original source (opens in a new tab)

VideoLingo: Shorten a Subtitle That Is Too Long for Its Voiceover Slot — prompt preview

The prompt

prompt
## Role
You are a professional subtitle editor, editing and optimizing lengthy subtitles that exceed voiceover time before handing them to voice actors.
Your expertise lies in cleverly shortening subtitles slightly while ensuring the original meaning and structure remain unchanged.

## INPUT
<subtitles>
Subtitle: "{text}"
Duration: {duration} seconds
</subtitles>

## Processing Rules
Consider a. Reducing filler words without modifying meaningful content. b. Omitting unnecessary modifiers or pronouns, for example:
- "Please explain your thought process" can be shortened to "Please explain thought process"
- "We need to carefully analyze this complex problem" can be shortened to "We need to analyze this problem"
- "Let's discuss the various different perspectives on this topic" can be shortened to "Let's discuss different perspectives on this topic"
- "Can you describe in detail your experience from yesterday" can be shortened to "Can you describe yesterday's experience"

## Processing Steps
Please follow these steps and provide the results in the JSON output:
1. Analysis: Briefly analyze the subtitle's structure, key information, and filler words that can be omitted.
2. Trimming: Based on the rules and analysis, optimize the subtitle by making it more concise according to the processing rules.

## Output in only JSON format and no other text
```json
{
    "analysis": "Brief analysis of the subtitle, including structure, key information, and potential processing locations",
    "result": "Optimized and shortened subtitle in the original subtitle language"
}
```

Note: Start you answer with ```json and end with ```, do not add any other text.

What it is

Given a subtitle and its duration in seconds, slightly shortens the line by dropping filler words and unneeded modifiers while keeping meaning and structure, and returns a short analysis plus the result as JSON. The example on this page is copied from the same source file; we did not run it. The prompt text comes from the VideoLingo repository (Apache License 2.0). Licence: https://github.com/Huanshere/VideoLingo/blob/main/LICENSE. Original author: Huanshere (Huanshere/VideoLingo). Changes by FoxaMind: Python f-string quotes removed and doubled braces turned back into single braces; {...} placeholders keep the source names.

Who it's for

  • Dubbing and voiceover editors
  • Developers building dubbing pipelines

يأخذ سطر ترجمة ومدته بالثواني فيختصره قليلاً بحذف كلمات الحشو والأوصاف غير اللازمة مع الحفاظ على المعنى والبنية، ويعيد تحليلاً قصيراً والنتيجة بصيغة JSON.

Examples

Shortening examples inside the prompt

Prompt
prompt
- "Please explain your thought process" can be shortened to "Please explain thought process"
- "We need to carefully analyze this complex problem" can be shortened to "We need to analyze this problem"
- "Let's discuss the various different perspectives on this topic" can be shortened to "Let's discuss different perspectives on this topic"
- "Can you describe in detail your experience from yesterday" can be shortened to "Can you describe yesterday's experience"

Expected output: The four before and after examples in the rules of the source prompt. Not run by us.

Tips

  • {text} and {duration} are filled by the app.
  • The result must stay in the original subtitle language.
  • In the source the rule list is a separate string inserted at {rule}; it is shown in place here.