Loading...
Loading...
Download YouTube video subtitles. Use when user wants to get captions or subtitles from a video.
npx skill4agent add kouko/monkey-knowledge-youtube-skills mk-youtube-get-caption/mk-youtube-get-caption <URL> [language|auto] [--force]/mk-youtube-get-caption https://youtube.com/watch?v=xxx/mk-youtube-get-caption https://youtube.com/watch?v=xxx auto/mk-youtube-get-caption https://youtube.com/watch?v=xxx ja/mk-youtube-get-caption https://youtube.com/watch?v=xxx "zh-TW,en"| Parameter | Required | Default | Description |
|---|---|---|---|
| URL | Yes | - | YouTube video URL |
| language | No | auto | Language code or priority list |
| --force | No | false | Force re-download even if cached file exists |
| Value | Behavior |
|---|---|
| (empty) | Auto-detect video's original language |
| Same as empty |
| Specific language code |
| Comma-separated priority list |
{baseDir}/scripts/caption.sh "<URL>" "<language>"{
"status": "success",
"file_path": "{baseDir}/data/20091025__VIDEO_ID.en.srt",
"text_file_path": "{baseDir}/data/20091025__VIDEO_ID.en.txt",
"language": "en",
"subtitle_type": "manual",
"char_count": 30287,
"line_count": 1555,
"text_char_count": 25000,
"text_line_count": 800,
"cached": false,
"video_id": "dQw4w9WgXcQ",
"title": "Video Title",
"channel": "Channel Name",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}{
"status": "success",
"file_path": "{baseDir}/data/20091025__VIDEO_ID.en.srt",
"subtitle_type": "cached",
"cached": true,
...
}{
"status": "error",
"message": "No subtitles found (this video may not have subtitles)"
}| Field | Description |
|---|---|
| Absolute path to the downloaded SRT file |
| Absolute path to plain text file (no timestamps) |
| Detected language code of the downloaded subtitle |
| |
| Number of characters in the SRT file |
| Number of lines in the SRT file |
| Number of characters in the plain text file |
| Number of lines in the plain text file |
| YouTube video ID |
| Video title |
| Channel name |
| Full video URL |
{YYYYMMDD}__{video_id}.{lang}.{ext}20091025__dQw4w9WgXcQ.en.srtcached: true--force/mk-youtube-transcript-summarizetext_file_path/mk-youtube-transcript-summarize <text_file_path>/mk-youtube-transcript-summarize