
embed-subtitles
Burn subtitles onto videos using FFmpeg. Use for: hardcode subtitles, embed captions, video subtitling.
- Installs
- 72
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/aviz85/claude-skills-library --skill embed-subtitles- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads embed-subtitles automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Embed Subtitles
Burn SRT subtitles into video files using FFmpeg.
Prerequisites
No SRT file? Use the transcribe skill first to generate subtitles from audio/video.
Need translation? After transcribing, read the SRT, translate each entry preserving timestamps, write new SRT file. No API needed.
Quick Start
cd ~/.claude/skills/embed-subtitles/scripts
# Burn SRT into video
npx ts-node embed-subtitles.ts -i video.mp4 -s subtitles.srt -o output.mp4
# Custom styling
npx ts-node embed-subtitles.ts -i video.mp4 -s subtitles.srt -o output.mp4 \
--font-size 24 --position bottom --margin 40
# Add credit text overlay at end
npx ts-node embed-subtitles.ts -i video.mp4 -s subtitles.srt -o output.mp4 \
--credit "Your Name" --credit-position top
Options
| Option | Short | Default | Description |
|---|---|---|---|
--input | -i | (required) | Input video file |
--subtitles | -s | (required) | SRT subtitle file |
--output | -o | (required) | Output video file |
--font-size | 20 | Font size in pixels | |
--font-name | Arial | Font family name | |
--position | bottom | Subtitle position: top, center, bottom | |
--margin | 25 | Margin from edge in pixels | |
--color | white | Text color | |
--outline | 2 | Outline thickness | |
--shadow | 1 | Shadow depth | |
--credit | Credit text to show at end | ||
--credit-position | top | Credit position: top, bottom | |
--credit-duration | 2.5 | Credit display duration in seconds | |
--extract-frame | Extract frame at specified second for verification |
Position Values
top- Near top of video (good for credits, avoids bottom burned-in text)center- Middle of videobottom- Near bottom of video (traditional subtitle position)
Dependencies
- FFmpeg (must be installed and in PATH)
RTL Auto-Detection & Fix (CRITICAL)
Before embedding ANY SRT file, Claude MUST check if the content is RTL.
Detection
Read the SRT file and check if the majority of text lines contain Hebrew/Arabic/Farsi characters:
- Hebrew range:
\u0590-\u05FF - Arabic range:
\u0600-\u06FF - Farsi additional:
\u0750-\u077F
If RTL content is detected, apply the fix BEFORE passing to FFmpeg.
RTL Fix
Wrap each text line (not index numbers, not timestamps) with Unicode directional marks:
python3 -c "
import re
with open('SRT_FILE_PATH', 'r', encoding='utf-8') as f:
content = f.read()
lines = content.split('\n')
result = []
for line in lines:
stripped = line.strip()
if stripped and not re.match(r'^\d+$', stripped) and not re.match(r'\d{2}:\d{2}:\d{2}', stripped):
line = '\u202B' + line + '\u202C'
result.append(line)
with open('SRT_FILE_PATH', 'w', encoding='utf-8') as f:
f.write('\n'.join(result))
"
- U+202B (RLE - Right-to-Left Embedding): forces RTL paragraph direction
- U+202C (PDF - Pop Directional Formatting): closes the embedding
This fixes: English words at line start, periods/commas on wrong side, mixed bidi text.
When to apply
Claude should analyze the SRT content intelligently:
- If most text is Hebrew/Arabic/Farsi → apply RTL fix
- If mixed but predominantly RTL → apply RTL fix
- If LTR (English, Spanish, etc.) → skip
- No flag needed from the user - detect automatically
Notes
- For Arabic credits, use English text due to FFmpeg drawtext RTL limitations
- Use
--extract-frameto verify subtitle positioning before final render
FAQ
What does the embed-subtitles skill do?
Burn subtitles onto videos using FFmpeg. Use for: hardcode subtitles, embed captions, video subtitling.
How do I install embed-subtitles?
Run npx skills add https://github.com/aviz85/claude-skills-library --skill embed-subtitles in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/embed-subtitles/ (personal) or .claude/skills/embed-subtitles/ (project).
Which AI agents can use embed-subtitles?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is embed-subtitles safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains embed-subtitles?
It is published by aviz85 in aviz85/claude-skills-library. It has 72 recorded installs.
More from aviz85/claude-skills-library
html-to-pdf
aviz85/claude-skills-library
Convert HTML to PDF with pixel-perfect rendering and excellent Hebrew/RTL support. Use when the user asks to 'convert HTML to PDF', 'generate PDF from HTML', 'create PDF from webpage', 'export to PDF', or needs PDF generation with Hebrew text support.
youtube-uploader
aviz85/claude-skills-library
Upload videos to YouTube with title, description, tags. Use for: youtube upload, publish video, share on youtube.
gh-pages-deploy
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
presentation-architect
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
music-generator
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
wordpress-publisher
aviz85/claude-skills-library
Publish posts to WordPress. Use for: publish blog post, upload to WordPress, פרסם בבלוג.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image