计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
shorts-generator【效率与协作】Create vertical short videos with captions from selected clips. Handles video formatting, subtitle styling, and export.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
This skill creates polished, vertical short videos with captions from your selected clips.
Create a short video from 02:34 to 03:15 of VIDEO_ID
Create a short with Chinese captions from clip 1
Create shorts from all recommended clips
# Extract video segment
ffmpeg -i "./output/downloads/VIDEO_ID.mp4" \
-ss 00:02:34 -to 00:03:15 \
-c:v libx264 -c:a aac \
"./temp/clip_raw.mp4"
Option A: Crop Center (for horizontal video)
ffmpeg -i "./temp/clip_raw.mp4" \
-vf "crop=ih*9/16:ih,scale=1080:1920" \
-c:a copy \
"./temp/clip_vertical.mp4"
Option B: Add Blur Background (preserves full frame)
ffmpeg -i "./temp/clip_raw.mp4" \
-vf "[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,boxblur=20[bg];[0:v]scale=1080:-1[fg];[bg][fg]overlay=(W-w)/2:(H-h)/2" \
-c:a copy \
"./temp/clip_vertical.mp4"
From the full SRT, extract only the relevant portion and adjust timestamps:
# Use ffmpeg to extract subtitle segment
ffmpeg -i "./output/transcripts/VIDEO_ID.srt" \
-ss 00:02:34 -to 00:03:15 \
"./temp/clip_subtitles.srt"
ffmpeg -i "./temp/clip_vertical.mp4" \
-vf "subtitles=./temp/clip_subtitles.srt:force_style='FontName=Arial Bold,FontSize=24,PrimaryColour=&HFFFFFF,OutlineColour=&H000000,Outline=2,Alignment=2,MarginV=50'" \
-c:a copy \
"./temp/clip_captioned.mp4"
Caption Style Options:
ffmpeg -i "./temp/clip_captioned.mp4" \
-af "loudnorm=I=-16:TP=-1.5:LRA=11" \
-c:v copy \
"./output/shorts/short_001.mp4"
# Extract frame at 1 second for thumbnail
ffmpeg -i "./output/shorts/short_001.mp4" \
-ss 00:00:01 -vframes 1 \
"./output/shorts/short_001_thumbnail.jpg"
## ✅ Short Video Created!
**File**: ./output/shorts/short_001.mp4
**Duration**: 41 seconds
**Format**: 1080x1920 (9:16 vertical)
**Captions**: Burned in (White + Black outline)
**Thumbnail**: ./output/shorts/short_001_thumbnail.jpg
### Preview Info
- **Resolution**: 1080x1920
- **Frame Rate**: 30 fps
- **Audio**: AAC, normalized
- **File Size**: XX MB
### Platform Compatibility
- ✅ TikTok (ready to upload)
- ✅ YouTube Shorts (ready to upload)
- ✅ Instagram Reels (ready to upload)
- ✅ 抖音 (ready to upload)
**Next steps**:
1. Review the video in ./output/shorts/
2. Create more shorts from other clips
3. Adjust caption style if needed
./output/shorts/short_XXX.mp4./output/shorts/short_XXX_thumbnail.jpgFontName=Arial Bold
FontSize=24
PrimaryColour=&HFFFFFF (White)
OutlineColour=&H000000 (Black)
Outline=2
FontName=Montserrat Bold
FontSize=28
PrimaryColour=&H00FFFF (Yellow)
BackColour=&H80000000 (Semi-transparent black)
BorderStyle=4
FontName=Helvetica
FontSize=18
PrimaryColour=&HFFFFFF
Outline=1
MarginV=30