{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/m3u8-downloader",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=m3u8-downloader",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/download.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/m3u8-downloader",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "M3U8 Video Downloader",
        "body": "Download HLS/m3u8 videos with parallel segment downloads and automatic decryption."
      },
      {
        "title": "Prerequisites",
        "body": "aria2c (install: brew install aria2)\nffmpeg (install: brew install ffmpeg)"
      },
      {
        "title": "Step 1: Extract m3u8 URL from webpage",
        "body": "If given a webpage URL (not a direct m3u8), use browser automation to find the stream URL:\n\n// In browser console or via browser tool evaluate\n(() => {\n  // Check HLS.js player instance\n  if (window.hls && window.hls.url) return window.hls.url;\n  if (window.player && window.player.hls && window.player.hls.url) return window.player.hls.url;\n  \n  // Search window objects for m3u8 URLs\n  const allVars = Object.keys(window).filter(k => {\n    try {\n      return window[k] && typeof window[k] === 'object' && \n             window[k].url && window[k].url.includes('m3u8');\n    } catch(e) { return false; }\n  });\n  return allVars.length > 0 ? allVars.map(k => window[k].url) : 'not found';\n})()\n\nUse profile=openclaw (isolated browser) to avoid browser history."
      },
      {
        "title": "Step 2: Handle Master Playlist (Multi-Quality)",
        "body": "Master playlists list quality variants, not segments:\n\ncurl -s \"https://example.com/playlist.m3u8\"\n# Output example:\n# #EXT-X-STREAM-INF:BANDWIDTH=8247061,RESOLUTION=1920x1080\n# 1080p/video.m3u8\n# #EXT-X-STREAM-INF:BANDWIDTH=4738061,RESOLUTION=1280x720\n# 720p/video.m3u8\n\nPick the highest quality (e.g., 1080p) and fetch that sub-playlist:\n\nBASE_URL=\"https://example.com\"\ncurl -s \"${BASE_URL}/1080p/video.m3u8\""
      },
      {
        "title": "Step 3: Extract Segment URLs",
        "body": "Segments may have non-standard extensions (e.g., .jpeg instead of .ts):\n\nmkdir -p /tmp/video_download && cd /tmp/video_download\n\nBASE_URL=\"https://example.com/1080p\"\ncurl -s \"${BASE_URL}/video.m3u8\" | grep -E \"^[^#]\" | while read seg; do\n  echo \"${BASE_URL}/${seg}\"\ndone > urls.txt\n\n# Count segments\nwc -l urls.txt"
      },
      {
        "title": "Step 4: Parallel Download with aria2c",
        "body": "aria2c -i urls.txt -j 16 -x 16 -s 16 --file-allocation=none -c true \\\n  --console-log-level=warn --summary-interval=30\n\n-j 16: 16 concurrent downloads\n-x 16: 16 connections per file\n-c true: continue partial downloads"
      },
      {
        "title": "Step 5: Merge with ffmpeg",
        "body": "# Get segment count\nNUM_SEGMENTS=$(wc -l < urls.txt)\n\n# Generate file list (adjust filename pattern as needed)\nfor i in $(seq 0 $((NUM_SEGMENTS-1))); do\n  echo \"file 'video${i}.jpeg'\"  # or video${i}.ts\ndone > filelist.txt\n\n# Merge (copy streams, no re-encoding)\nffmpeg -y -f concat -safe 0 -i filelist.txt -c copy ~/Downloads/output.mp4"
      },
      {
        "title": "Step 6: Cleanup",
        "body": "rm -rf /tmp/video_download"
      },
      {
        "title": "Quick Script Usage",
        "body": "~/clawd/skills/m3u8-downloader/scripts/download.sh \"https://example.com/video.m3u8\" \"output_name\"\n\nNote: The script may not handle all edge cases (master playlists, non-standard extensions). Use manual process above for complex streams."
      },
      {
        "title": "Handling Encrypted Streams (AES-128)",
        "body": "Look for #EXT-X-KEY:METHOD=AES-128,URI=\"enc.key\" in the playlist:\n\ncurl -s \"https://example.com/path/enc.key\" -o enc.key\nffmpeg -allowed_extensions ALL -i local_playlist.m3u8 -c copy output.mp4"
      },
      {
        "title": "Output",
        "body": "Final video saved as ~/Downloads/<output_name>.mp4"
      }
    ],
    "body": "M3U8 Video Downloader\n\nDownload HLS/m3u8 videos with parallel segment downloads and automatic decryption.\n\nPrerequisites\naria2c (install: brew install aria2)\nffmpeg (install: brew install ffmpeg)\nFull Workflow (From Webpage to MP4)\nStep 1: Extract m3u8 URL from webpage\n\nIf given a webpage URL (not a direct m3u8), use browser automation to find the stream URL:\n\n// In browser console or via browser tool evaluate\n(() => {\n  // Check HLS.js player instance\n  if (window.hls && window.hls.url) return window.hls.url;\n  if (window.player && window.player.hls && window.player.hls.url) return window.player.hls.url;\n  \n  // Search window objects for m3u8 URLs\n  const allVars = Object.keys(window).filter(k => {\n    try {\n      return window[k] && typeof window[k] === 'object' && \n             window[k].url && window[k].url.includes('m3u8');\n    } catch(e) { return false; }\n  });\n  return allVars.length > 0 ? allVars.map(k => window[k].url) : 'not found';\n})()\n\n\nUse profile=openclaw (isolated browser) to avoid browser history.\n\nStep 2: Handle Master Playlist (Multi-Quality)\n\nMaster playlists list quality variants, not segments:\n\ncurl -s \"https://example.com/playlist.m3u8\"\n# Output example:\n# #EXT-X-STREAM-INF:BANDWIDTH=8247061,RESOLUTION=1920x1080\n# 1080p/video.m3u8\n# #EXT-X-STREAM-INF:BANDWIDTH=4738061,RESOLUTION=1280x720\n# 720p/video.m3u8\n\n\nPick the highest quality (e.g., 1080p) and fetch that sub-playlist:\n\nBASE_URL=\"https://example.com\"\ncurl -s \"${BASE_URL}/1080p/video.m3u8\"\n\nStep 3: Extract Segment URLs\n\nSegments may have non-standard extensions (e.g., .jpeg instead of .ts):\n\nmkdir -p /tmp/video_download && cd /tmp/video_download\n\nBASE_URL=\"https://example.com/1080p\"\ncurl -s \"${BASE_URL}/video.m3u8\" | grep -E \"^[^#]\" | while read seg; do\n  echo \"${BASE_URL}/${seg}\"\ndone > urls.txt\n\n# Count segments\nwc -l urls.txt\n\nStep 4: Parallel Download with aria2c\naria2c -i urls.txt -j 16 -x 16 -s 16 --file-allocation=none -c true \\\n  --console-log-level=warn --summary-interval=30\n\n-j 16: 16 concurrent downloads\n-x 16: 16 connections per file\n-c true: continue partial downloads\nStep 5: Merge with ffmpeg\n# Get segment count\nNUM_SEGMENTS=$(wc -l < urls.txt)\n\n# Generate file list (adjust filename pattern as needed)\nfor i in $(seq 0 $((NUM_SEGMENTS-1))); do\n  echo \"file 'video${i}.jpeg'\"  # or video${i}.ts\ndone > filelist.txt\n\n# Merge (copy streams, no re-encoding)\nffmpeg -y -f concat -safe 0 -i filelist.txt -c copy ~/Downloads/output.mp4\n\nStep 6: Cleanup\nrm -rf /tmp/video_download\n\nQuick Script Usage\n~/clawd/skills/m3u8-downloader/scripts/download.sh \"https://example.com/video.m3u8\" \"output_name\"\n\n\nNote: The script may not handle all edge cases (master playlists, non-standard extensions). Use manual process above for complex streams.\n\nHandling Encrypted Streams (AES-128)\n\nLook for #EXT-X-KEY:METHOD=AES-128,URI=\"enc.key\" in the playlist:\n\ncurl -s \"https://example.com/path/enc.key\" -o enc.key\nffmpeg -allowed_extensions ALL -i local_playlist.m3u8 -c copy output.mp4\n\nOutput\n\nFinal video saved as ~/Downloads/<output_name>.mp4"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/EasonC13/m3u8-downloader",
    "publisherUrl": "https://clawhub.ai/EasonC13/m3u8-downloader",
    "owner": "EasonC13",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}