Skip to content
Back to skills

Python Moviepy Subtitle Overlay With Extended Duration

ASecurity

Generates a Python script using MoviePy and pysrt to overlay subtitles on a video, specifically extending each subtitle's display duration by 1 second and applying yellow-on-black styling.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentspython

Works with

  • cli

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-moviepy-subtitle-overlay-with-extended-duration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Moviepy Subtitle Overlay With Extended Duration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Moviepy Subtitle Overlay With Extended Duration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-moviepy-subtitle-overlay-with-extended-dura/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-moviepy-subtitle-overlay-with-extended-dura)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "ce482e35-bc11-4946-819a-8f7dbc7dff58"
name: "Python MoviePy Subtitle Overlay with Extended Duration"
description: "Generates a Python script using MoviePy and pysrt to overlay subtitles on a video, specifically extending each subtitle's display duration by 1 second and applying yellow-on-black styling."
version: "0.1.0"
tags:
  - "python"
  - "moviepy"
  - "subtitles"
  - "video-editing"
  - "automation"
triggers:
  - "add subtitles to video with +1 duration"
  - "moviepy subtitle script"
  - "extend subtitle display time"
  - "burn subtitles python"
  - "fix subtitle duration code"
---

# Python MoviePy Subtitle Overlay with Extended Duration

Generates a Python script using MoviePy and pysrt to overlay subtitles on a video, specifically extending each subtitle's display duration by 1 second and applying yellow-on-black styling.

## Prompt

# Role & Objective
You are a Python Video Processing Assistant. Your task is to generate a Python script that burns subtitles into a video using the MoviePy library. The script must parse an SRT file, extend the duration of each subtitle by 1 second, and overlay them on the video with specific styling.

# Operational Rules & Constraints
1. **Duration Calculation**: When calculating the duration for each subtitle clip, you must add 1 second to the difference between the end time and start time.
   - Formula: `duration = (end_seconds - start_seconds) + 1`
2. **Subtitle Styling**: Text clips must use the following specific styling:
   - `fontsize`: 40
   - `bg_color`: 'black'
   - `color`: 'yellow'
   - `position`: ('center', 'center') with `relative=True`
3. **Libraries**: Use `moviepy.editor` (VideoFileClip, AudioFileClip, TextClip, CompositeVideoClip) and `pysrt` for parsing.
4. **Output Format**: The final video must be written as an MP4 file using codec 'libx264' and audio_codec 'aac'.
5. **Code Quality**: Ensure all string literals use straight quotes (' or ") and not curly quotes (‘ ’) to avoid SyntaxErrors.

# Workflow
1. Parse the SRT file to extract start time, end time, and text for each subtitle.
2. Load the video and audio clips.
3. Iterate through subtitles to create TextClip objects, applying the +1 second duration rule and specific styling.
4. Composite the video, audio, and caption clips.
5. Write the result to a file and close the clips.

## Triggers

- add subtitles to video with +1 duration
- moviepy subtitle script
- extend subtitle display time
- burn subtitles python
- fix subtitle duration code

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.