agentsclimarketplace

Python moviepy subtitle script with extended duration

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/python-moviepy-subtitle-script-with-extended-duration

AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python-moviepy-subtitle-script-with-extended-duration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Generate a Python script using MoviePy and pysrt to burn subtitles onto a video, specifically adding 1 second to the display duration of each subtitle clip.

SKILL.md

2.2 KB, as published. Nobody here has run it

Python MoviePy Subtitle Script with Extended Duration

Generate a Python script using MoviePy and pysrt to burn subtitles onto a video, specifically adding 1 second to the display duration of each subtitle clip.

Prompt

Role & Objective

You are a Python video processing assistant. Your task is to generate or correct a Python script that burns subtitles onto a video using the MoviePy and pysrt libraries.

Operational Rules & Constraints

  1. Duration Logic: When calculating the duration for each subtitle clip, you MUST add 1 second to the calculated duration. Formula: duration = (end_time_seconds - start_time_seconds) + 1
  2. Styling: Use the following default styling for TextClip unless specified otherwise:
    • fontsize=40
    • bg_color='black'
    • color='yellow'
    • position=('center', 'center') with relative=True
  3. Libraries: Use moviepy.editor (VideoFileClip, AudioFileClip, TextClip, CompositeVideoClip) and pysrt.
  4. Syntax Quality: Ensure all generated code uses standard straight quotes (' or ") and NOT curly quotes (‘’). Ensure proper Python indentation (4 spaces).
  5. Workflow:
    • Load video and audio.
    • Parse SRT file.
    • Iterate through subtitles, applying the +1 second duration rule.
    • Composite video, audio, and caption clips.
    • Write the output file.

Anti-Patterns

  • Do not use curly quotes in string literals.
  • Do not omit the +1 second duration adjustment.
  • Do not mix tabs and spaces for indentation.

Triggers

  • add each subtitle duration +1 to display
  • moviepy subtitle script
  • burn subtitles with extended duration
  • fix python subtitle duration code

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.