xiaohongshu
xiaohongshu
ppt-to-video-workflow
PPT/슬라이드를 나레이션과 자막이 포함된 영상으로 변환합니다. PPTX 파일 또는 slides.json에서 슬라이드 이미지를 추출/렌더링하고, TTS로 나레이션을 생성하며, 자막을 추가하여 최종 MP4 영상을 만듭니다. "PPT를 영상으로 만들어줘", "발표 영상 생성", "자막 포함 영상 만들기" 요청 시 사용합니다.
Full skill instructions
PPT/슬라이드를 나레이션과 자막이 포함된 영상으로 변환하는 종합 스킬입니다.
다음과 같은 요청 시 이 스킬을 사용합니다:
┌─────────────────────────────────────────────────────────────────────┐
│ 입력 소스 (택1) │
├─────────────────────────────────────────────────────────────────────┤
│ [PPTX 파일] 또는 [slides.json] │
│ │ │ │
│ ▼ ▼ │
│ 이미지 추출 (python-pptx) 슬라이드 렌더링 (Pillow) │
│ │ │ │
│ └───────────────┬───────────────────────┘ │
│ ▼ │
│ slide_01.png, slide_02.png, ... │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 나레이션 생성 │
├─────────────────────────────────────────────────────────────────────┤
│ [slides.json + reference_audio.wav] │
│ │ │
│ ▼ │
│ Chatterbox TTS API (슬라이드별 음성 생성) │
│ │ │
│ ▼ │
│ narration_01.mp3, narration_02.mp3, ... + timing.json │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 자막 생성 (선택) │
├─────────────────────────────────────────────────────────────────────┤
│ [timing.json] │
│ │ │
│ ▼ │
│ 문장 분할 + ASS 자막 생성 │
│ │ │
│ ▼ │
│ subtitle.ass │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 영상 합성 │
├─────────────────────────────────────────────────────────────────────┤
│ [slide_*.png + narration_*.mp3 + subtitle.ass] │
│ │ │
│ ▼ │
│ FFmpeg (페이드 전환 + 자막 하드코딩) │
│ │ │
│ ▼ │
│ final_video.mp4 │
└─────────────────────────────────────────────────────────────────────┘
기존 PPTX 파일에서 슬라이드 이미지를 추출합니다.
from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE_TYPE
from PIL import Image
import io
prs = Presentation("presentation.pptx")
for i, slide in enumerate(prs.slides):
for shape in slide.shapes:
if shape.shape_type == MSO_SHAPE_TYPE.PICTURE:
image = Image.open(io.BytesIO(shape.image.blob))
image.save(f"slide_{i+1:02d}.png")
구조화된 JSON에서 슬라이드를 렌더링합니다.
{
"slides": [
{
"slide": 1,
"title": "슬라이드 제목",
"content": ["항목1", "항목2", "항목3"],
"narration": "이 슬라이드에서 읽을 전체 대본 텍스트입니다."
}
]
}
slides.json을 1920x1080 이미지로 렌더링합니다.
# Academic 테마 (기본, 흰색 배경)
python scripts/render_slides.py slides.json -i generated_images/ -o rendered_slides/
# RDF 다크 테마 (골드/청록 강조)
python scripts/render_slides.py slides.json -i generated_images/ -o rendered_slides/ -t rdf
옵션:
-i, --images: AI 생성 이미지 디렉토리-o, --output: 출력 디렉토리-t, --theme: 테마 선택 (academic 또는 rdf)출력: rendered_slides/slide_01.png, slide_02.png, ...
슬라이드별 TTS 음성을 생성합니다.
python scripts/generate_narration.py slides.json reference_audio.wav -o narrations/
옵션:
-o, --output: 출력 디렉토리-l, --language: 언어 코드 (기본: ko)출력:
narrations/narration_01.mp3, narration_02.mp3, ...narrations/timing.json (시간 정보 + 전체 텍스트)timing.json 구조:
{
"total_slides": 17,
"total_duration": 374.96,
"slides": [
{
"slide": 1,
"audio_file": "narrations/narration_01.mp3",
"duration": 11.76,
"text": "전체 나레이션 텍스트..."
}
]
}
timing.json에서 ASS 자막 파일을 생성합니다.
python scripts/generate_subtitles.py narrations/timing.json -o subtitle.ass
자막 분할 규칙:
출력: subtitle.ass
이미지와 나레이션을 합성하여 영상을 생성합니다.
# 기본 (자막 없음)
python scripts/create_video.py rendered_slides/ narrations/ -o final_video.mp4
# 자막 포함
python scripts/create_video.py rendered_slides/ narrations/ -o final_video.mp4 --subtitle
# 페이드 효과 없이
python scripts/create_video.py rendered_slides/ narrations/ -o final_video.mp4 --no-fade
옵션:
-o, --output: 출력 파일명--subtitle: 자막 포함 (ASS 파일 자동 생성)--no-fade: 페이드 전환 효과 비활성화출력:
final_video.mp4final_video.ass (--subtitle 사용 시)# 1. 슬라이드 렌더링
python ~/.claude/skills/ppt-to-video-workflow/scripts/render_slides.py \
slides.json -i generated_images/ -o rendered_slides/ -t rdf
# 2. 나레이션 생성
python ~/.claude/skills/ppt-to-video-workflow/scripts/generate_narration.py \
slides.json reference_audio.wav -o narrations/
# 3. 영상 합성 (자막 포함)
python ~/.claude/skills/ppt-to-video-workflow/scripts/create_video.py \
rendered_slides/ narrations/ -o presentation.mp4 --subtitle
# 1. PPTX에서 이미지 추출
from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE_TYPE
from PIL import Image
import io, os
os.makedirs("pptx_slides", exist_ok=True)
prs = Presentation("presentation.pptx")
for i, slide in enumerate(prs.slides):
for shape in slide.shapes:
if shape.shape_type == MSO_SHAPE_TYPE.PICTURE:
img = Image.open(io.BytesIO(shape.image.blob))
img = img.resize((1920, 1080), Image.LANCZOS)
img.save(f"pptx_slides/slide_{i+1:02d}.png")
break
# 2. 나레이션 생성 (slides.json 필요)
python ~/.claude/skills/ppt-to-video-workflow/scripts/generate_narration.py \
slides.json audio.wav -o narrations/
# 3. 영상 합성
python ~/.claude/skills/ppt-to-video-workflow/scripts/create_video.py \
pptx_slides/ narrations/ -o output.mp4 --subtitle
# 1. 자막 파일 생성
python ~/.claude/skills/ppt-to-video-workflow/scripts/generate_subtitles.py \
narrations/timing.json -o subtitle.ass
# 2. FFmpeg로 자막 하드코딩
ffmpeg -i input.mp4 -vf "ass=subtitle.ass" -c:a copy output_with_subtitle.mp4
| 항목 | 값 |
|---|---|
| 해상도 | 1920x1080 (Full HD) |
| FPS | 30 |
| 영상 형식 | MP4 (H.264 + AAC) |
| 전환 효과 | 페이드 (0.5초) |
| 한글 폰트 | AppleSDGothicNeo, NanumGothic |
| 테마 | academic, rdf |
| 자막 형식 | ASS (Advanced SubStation Alpha) |
| 자막 폰트 | AppleSDGothicNeo-Medium (42pt) |
| 자막 위치 | 하단 중앙 |
| 자막 배경 | 반투명 검정 (50% opacity) |
pip install pillow pydub gradio-client python-pptx
ppt-to-video-workflow/
├── SKILL.md # 이 문서
└── scripts/
├── render_slides.py # 슬라이드 → 이미지 렌더링
├── generate_narration.py # TTS 나레이션 생성
├── generate_subtitles.py # ASS 자막 생성
└── create_video.py # 영상 합성
academic-ppt-generator: slides.json 생성 및 PPTX 변환chatterbox-tts-workflow: TTS 생성 (단일 파일)입력:
slides.json (제목, 내용, 나레이션)reference_audio.wav (참조 음성)출력:
slide_*.png (슬라이드 이미지들)narration_*.mp3 (슬라이드별 음성)timing.json (타이밍 정보)subtitle.ass (자막 파일)final_video.mp4 (최종 영상)xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience