# Send M3U8 Downloader to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "m3u8-downloader",
    "name": "M3U8 Downloader",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/EasonC13/m3u8-downloader",
    "canonicalUrl": "https://clawhub.ai/EasonC13/m3u8-downloader",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/m3u8-downloader",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=m3u8-downloader",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/download.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "m3u8-downloader",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T04:54:16.676Z",
      "expiresAt": "2026-05-12T04:54:16.676Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=m3u8-downloader",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=m3u8-downloader",
        "contentDisposition": "attachment; filename=\"m3u8-downloader-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "m3u8-downloader"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/m3u8-downloader"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/m3u8-downloader",
    "downloadUrl": "https://openagent3.xyz/downloads/m3u8-downloader",
    "agentUrl": "https://openagent3.xyz/skills/m3u8-downloader/agent",
    "manifestUrl": "https://openagent3.xyz/skills/m3u8-downloader/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/m3u8-downloader/agent.md"
  }
}
```
## Documentation

### M3U8 Video Downloader

Download HLS/m3u8 videos with parallel segment downloads and automatic decryption.

### Prerequisites

aria2c (install: brew install aria2)
ffmpeg (install: brew install ffmpeg)

### Step 1: Extract m3u8 URL from webpage

If given a webpage URL (not a direct m3u8), use browser automation to find the stream URL:

// In browser console or via browser tool evaluate
(() => {
  // Check HLS.js player instance
  if (window.hls && window.hls.url) return window.hls.url;
  if (window.player && window.player.hls && window.player.hls.url) return window.player.hls.url;
  
  // Search window objects for m3u8 URLs
  const allVars = Object.keys(window).filter(k => {
    try {
      return window[k] && typeof window[k] === 'object' && 
             window[k].url && window[k].url.includes('m3u8');
    } catch(e) { return false; }
  });
  return allVars.length > 0 ? allVars.map(k => window[k].url) : 'not found';
})()

Use profile=openclaw (isolated browser) to avoid browser history.

### Step 2: Handle Master Playlist (Multi-Quality)

Master playlists list quality variants, not segments:

curl -s "https://example.com/playlist.m3u8"
# Output example:
# #EXT-X-STREAM-INF:BANDWIDTH=8247061,RESOLUTION=1920x1080
# 1080p/video.m3u8
# #EXT-X-STREAM-INF:BANDWIDTH=4738061,RESOLUTION=1280x720
# 720p/video.m3u8

Pick the highest quality (e.g., 1080p) and fetch that sub-playlist:

BASE_URL="https://example.com"
curl -s "${BASE_URL}/1080p/video.m3u8"

### Step 3: Extract Segment URLs

Segments may have non-standard extensions (e.g., .jpeg instead of .ts):

mkdir -p /tmp/video_download && cd /tmp/video_download

BASE_URL="https://example.com/1080p"
curl -s "${BASE_URL}/video.m3u8" | grep -E "^[^#]" | while read seg; do
  echo "${BASE_URL}/${seg}"
done > urls.txt

# Count segments
wc -l urls.txt

### Step 4: Parallel Download with aria2c

aria2c -i urls.txt -j 16 -x 16 -s 16 --file-allocation=none -c true \\
  --console-log-level=warn --summary-interval=30

-j 16: 16 concurrent downloads
-x 16: 16 connections per file
-c true: continue partial downloads

### Step 5: Merge with ffmpeg

# Get segment count
NUM_SEGMENTS=$(wc -l < urls.txt)

# Generate file list (adjust filename pattern as needed)
for i in $(seq 0 $((NUM_SEGMENTS-1))); do
  echo "file 'video${i}.jpeg'"  # or video${i}.ts
done > filelist.txt

# Merge (copy streams, no re-encoding)
ffmpeg -y -f concat -safe 0 -i filelist.txt -c copy ~/Downloads/output.mp4

### Step 6: Cleanup

rm -rf /tmp/video_download

### Quick Script Usage

~/clawd/skills/m3u8-downloader/scripts/download.sh "https://example.com/video.m3u8" "output_name"

Note: The script may not handle all edge cases (master playlists, non-standard extensions). Use manual process above for complex streams.

### Handling Encrypted Streams (AES-128)

Look for #EXT-X-KEY:METHOD=AES-128,URI="enc.key" in the playlist:

curl -s "https://example.com/path/enc.key" -o enc.key
ffmpeg -allowed_extensions ALL -i local_playlist.m3u8 -c copy output.mp4

### Output

Final video saved as ~/Downloads/<output_name>.mp4
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: EasonC13
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T04:54:16.676Z
- Expires at: 2026-05-12T04:54:16.676Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/m3u8-downloader)
- [Send to Agent page](https://openagent3.xyz/skills/m3u8-downloader/agent)
- [JSON manifest](https://openagent3.xyz/skills/m3u8-downloader/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/m3u8-downloader/agent.md)
- [Download page](https://openagent3.xyz/downloads/m3u8-downloader)