> ## Documentation Index
> Fetch the complete documentation index at: https://typecast.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI로 쇼츠 영상 만들기

<Info>
  스킬 파일을 AI 에이전트에게 전달한 다음 대화를 시작하면 에이전트가 영상 제작 과정을 도와줍니다.
</Info>

## 준비할 것

타입캐스트 API 계정만 있으면 시작할 수 있습니다.

## 1. 에이전트에게 스킬 전달하기

아래 영역을 열어 스킬 원문 전체를 복사한 다음 AI 에이전트에게 전달하세요. 별도 저장소에 접근하지 않아도 이 내용만으로 실행할 수 있습니다.

<SkillCopyBlock copyLabel="전체 스킬 복사" copiedLabel="복사됨" moreLabel="더보기" lessLabel="접기" previewLines={10}>
  ````markdown
  ---
  name: create-typecast-shorts
  description: Create a captioned 9:16 short or reel from one rights-cleared local video or image using Typecast narration, timestamp output, and ffmpeg. Use when a user asks to make a short-form video, reel, vertical video, narrated social clip, or Typecast-powered short from media they own or are authorized to use.
  ---

  # Create Typecast Shorts

  Create one 1080×1920 MP4 from a local video or image, Typecast narration, and timestamp-aligned subtitles.

  ## Boundaries

  - Accept only an attached file or local file the user owns or is authorized to use.
  - If rights are unclear, ask the user to confirm them before processing.
  - Do not search for, download, scrape, or reuse third-party video, news, or social media.
  - Do not remove logos, watermarks, attribution, or embedded subtitles to conceal a source.
  - Do not upload or publish the result. Return local artifacts for user review.
  - Do not print, log, or place a Typecast API key in chat, commands, scripts, or output files.
  - Support one background video or image per run. Ask the user to choose one when several are provided.

  ## Workflow

  ### 1. Confirm inputs

  Collect:

  - Local media path
  - Topic or finished script
  - Language
  - Target duration; default to 45–60 seconds
  - Typecast voice ID, or permission to open the interactive voice picker
  - Output directory inside the current workspace

  Use these defaults unless the user specifies otherwise:

  - 1080×1920, 30 fps
  - Center crop to fill the frame
  - Discard source audio
  - White bottom-centered subtitles with a black outline

  Confirm media rights, the final script, and the voice before making the paid TTS request.

  ### 2. Check the environment

  Run:

  ```bash
  command -v cast
  command -v ffmpeg
  command -v ffprobe
  cast --help
  ffmpeg -filters 2>/dev/null | grep subtitles
  ```

  If a command or the ffmpeg `subtitles` filter is missing, explain the missing dependency. Install it only with user approval.

  After installing cast with Go, add it to the current shell without hardcoding the user's home directory:

  ```bash
  export PATH="$(go env GOPATH)/bin:$PATH"
  ```

  For cast installation, use the official options:

  ```bash
  brew install neosapience/tap/cast
  # or
  go install github.com/neosapience/cast@latest
  ```

  Authenticate with `cast login` so the key is entered in its own prompt. Never ask the user to paste the key into chat.

  ### 3. Create a clean work directory

  Create a new, explicit directory inside the current workspace. Do not overwrite an existing output.

  Keep these artifacts:

  ```text
  script.txt
  script-tts.txt
  narration.wav
  captions.srt
  preview.mp4
  final.mp4
  ```

  Work from this directory while rendering so `captions.srt` does not require platform-specific path escaping.

  ### 4. Prepare the script

  If the user supplied only a topic, draft a concise script with:

  1. Hook
  2. Main point
  3. Supporting detail
  4. Closing line

  Save the approved text as `script.txt`.

  Create `script-tts.txt` separately. Change only pronunciations that TTS may misread, such as numbers, abbreviations, URLs, symbols, or mixed-language terms. Preserve the meaning and never overwrite `script.txt`.

  ### 5. Select a voice and generate audio plus captions

  If no voice ID was provided, run:

  ```bash
  cast voices pick
  ```

  After approval, generate narration and SRT together:

  ```bash
  cast "$(cat script-tts.txt)" \
    --voice-id VOICE_ID \
    --language LANGUAGE_CODE \
    --format wav \
    --out narration.wav \
    --timestamp-out captions.srt \
    --timestamp-format srt
  ```

  Use ISO 639-3 language codes such as `kor`, `eng`, or `jpn`. For Japanese or Chinese, cast automatically selects character-level alignment; use the latest cast release if that behavior is unavailable.

  Do not fall back to Whisper merely to create timestamps. Typecast captions already returns aligned audio and subtitles without another model or dependency.

  ### 6. Inspect the source

  Run:

  ```bash
  ffprobe -v error -show_entries stream=codec_type,width,height,duration \
    -of default=noprint_wrappers=1 "SOURCE_PATH"
  ```

  Use the video command for a video source and the image command for a still image. Quote every user-provided path.

  ### 7. Render a 15-second preview

  For a video:

  ```bash
  ffmpeg -y -stream_loop -1 -i "SOURCE_PATH" -i narration.wav \
    -filter_complex "[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,setsar=1,subtitles=captions.srt:force_style='FontSize=16,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1.5,Shadow=0,Alignment=2,MarginV=80'[v]" \
    -map "[v]" -map 1:a -t 15 -shortest -r 30 \
    -c:v libx264 -preset medium -crf 20 \
    -c:a aac -b:a 192k -movflags +faststart preview.mp4
  ```

  For an image:

  ```bash
  ffmpeg -y -loop 1 -framerate 30 -i "SOURCE_PATH" -i narration.wav \
    -filter_complex "[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,setsar=1,subtitles=captions.srt:force_style='FontSize=16,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1.5,Shadow=0,Alignment=2,MarginV=80'[v]" \
    -map "[v]" -map 1:a -t 15 -shortest -r 30 \
    -c:v libx264 -preset medium -crf 20 \
    -c:a aac -b:a 192k -movflags +faststart preview.mp4
  ```

  Show the preview to the user. Check framing, subtitle readability, pronunciation, and timing before the full render.

  If center crop cuts off important content, replace the scale and crop portion with:

  ```text
  scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black
  ```

  ### 8. Render and verify the final video

  After preview approval, rerun the matching command without `-t 15`, add `-shortest`, and write `final.mp4`.

  Verify:

  ```bash
  ffprobe -v error \
    -show_entries stream=codec_name,width,height -show_entries format=duration,size \
    -of default=noprint_wrappers=1 final.mp4
  ```

  Require:

  - 1080×1920 video
  - H.264 video and AAC audio
  - Non-zero duration and size
  - Narration and subtitles ending with the video

  Return the output directory and artifact list. Remind the user to review the complete video before publishing it themselves.

  ## Failure handling

  - For 401 or 403 from cast, re-run `cast login` and verify the Global API plan without exposing the key.
  - For 402 or 429, report the billing or rate-limit response; do not retry repeatedly.
  - If timestamp flags are unavailable, update cast instead of adding a parallel transcription stack.
  - If ffmpeg cannot load subtitles, use an ffmpeg build with libass.
  - If rendering fails, preserve all existing artifacts and rerun only the failed step.
  ````
</SkillCopyBlock>

## 2. 에이전트와 대화하며 만들기

원하는 쇼츠를 편하게 설명한 다음, 아래 항목을 대화 중 자유롭게 바꿔보세요.

| 바꿀 수 있는 것 | 이렇게 말해보세요                            |
| --------- | ------------------------------------ |
| 대본과 메시지   | “도입부를 더 강하게 해줘”, “핵심 내용을 하나로 줄여줘”    |
| 목소리와 말투   | “더 밝고 활기찬 목소리로 바꿔줘”, “차분하게 읽어줘”      |
| 길이와 속도    | “30초 안으로 줄여줘”, “조금 더 빠르게 진행해줘”       |
| 자막과 화면    | “자막을 더 짧게 나눠줘”, “중요한 장면이 잘 보이게 조정해줘” |

마음에 들 때까지 에이전트와 대화하며 바로바로 다듬을 수 있습니다.

<Note>
  미디어 업로드 시 사용한 저작권 출처를 꼭 명시하세요.
</Note>

## 에이전트가 처리하는 작업

<CardGroup cols={2}>
  <Card title="환경 설정" icon="terminal">
    승인을 받은 다음 cast CLI와 ffmpeg를 확인하고 설치합니다.
  </Card>

  <Card title="내레이션" icon="microphone">
    대본을 정리하고 타입캐스트 내레이션을 안전하게 생성합니다.
  </Card>

  <Card title="자막" icon="closed-captioning">
    같은 내레이션에서 타임스탬프 기반 SRT 자막을 생성합니다.
  </Card>

  <Card title="영상" icon="film">
    검수용 미리보기와 최종 9:16 MP4를 렌더링합니다.
  </Card>
</CardGroup>

<Tip>
  사용자는 미디어, 주제, 단계별 승인만 제공하면 됩니다. 명령줄 도구 설치와 렌더링은 에이전트에게 맡기세요.
</Tip>