{"record":{"id":"5352e949fa669d6e","repo":"garrytan/gstack","slug":"this-is-an-hls-dash-stream-use-yt-dlp-or-ffmpeg-f","errorCode":null,"errorMessage":"This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptive stream downloads.","messagePattern":"This is an HLS/DASH stream\\. Use yt-dlp or ffmpeg for adaptive stream downloads\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"browse/src/write-commands.ts","lineNumber":1177,"sourceCode":"        if (tagName === 'img') {\n          url = await locator.evaluate(el => {\n            const img = el as HTMLImageElement;\n            return img.currentSrc || img.src || img.getAttribute('data-src') || '';\n          });\n        } else if (tagName === 'video') {\n          url = await locator.evaluate(el => (el as HTMLVideoElement).currentSrc || (el as HTMLVideoElement).src || '');\n        } else if (tagName === 'audio') {\n          url = await locator.evaluate(el => (el as HTMLAudioElement).currentSrc || (el as HTMLAudioElement).src || '');\n        } else {\n          // Try src attribute on any element\n          url = await locator.evaluate(el => el.getAttribute('src') || '');\n        }\n        if (!url) throw new Error(`Could not extract URL from ${filteredArgs[0]} (${tagName})`);\n      }\n\n      // Check for HLS/DASH\n      if (url.includes('.m3u8') || url.includes('.mpd')) {\n        throw new Error('This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptive stream downloads.');\n      }\n\n      // Determine output path and extension\n      const page = bm.getPage();\n      let contentType = 'application/octet-stream';\n      let buffer: Buffer;\n\n      if (url.startsWith('blob:')) {\n        // Strategy 3: Blob URL -- in-page fetch + base64\n        const dataUrl = await page.evaluate(async (blobUrl) => {\n          try {\n            const resp = await fetch(blobUrl);\n            const blob = await resp.blob();\n            if (blob.size > 100 * 1024 * 1024) return 'ERROR:TOO_LARGE';\n            return new Promise<string>((resolve, reject) => {\n              const reader = new FileReader();\n              reader.onloadend = () => resolve(reader.result as string);\n              reader.onerror = () => reject('Failed to read blob');","sourceCodeStart":1159,"sourceCodeEnd":1195,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/write-commands.ts#L1159-L1195","documentation":"Error \"This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptive stream downloads.\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at browse/src/write-commands.ts:1177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}