garrytan/gstack · error · Error

This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptiv

Error message

This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptive stream downloads.

What it means

Error "This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptive stream downloads." thrown in garrytan/gstack.

Source

Thrown at browse/src/write-commands.ts:1177

        if (tagName === 'img') {
          url = await locator.evaluate(el => {
            const img = el as HTMLImageElement;
            return img.currentSrc || img.src || img.getAttribute('data-src') || '';
          });
        } else if (tagName === 'video') {
          url = await locator.evaluate(el => (el as HTMLVideoElement).currentSrc || (el as HTMLVideoElement).src || '');
        } else if (tagName === 'audio') {
          url = await locator.evaluate(el => (el as HTMLAudioElement).currentSrc || (el as HTMLAudioElement).src || '');
        } else {
          // Try src attribute on any element
          url = await locator.evaluate(el => el.getAttribute('src') || '');
        }
        if (!url) throw new Error(`Could not extract URL from ${filteredArgs[0]} (${tagName})`);
      }

      // Check for HLS/DASH
      if (url.includes('.m3u8') || url.includes('.mpd')) {
        throw new Error('This is an HLS/DASH stream. Use yt-dlp or ffmpeg for adaptive stream downloads.');
      }

      // Determine output path and extension
      const page = bm.getPage();
      let contentType = 'application/octet-stream';
      let buffer: Buffer;

      if (url.startsWith('blob:')) {
        // Strategy 3: Blob URL -- in-page fetch + base64
        const dataUrl = await page.evaluate(async (blobUrl) => {
          try {
            const resp = await fetch(blobUrl);
            const blob = await resp.blob();
            if (blob.size > 100 * 1024 * 1024) return 'ERROR:TOO_LARGE';
            return new Promise<string>((resolve, reject) => {
              const reader = new FileReader();
              reader.onloadend = () => resolve(reader.result as string);
              reader.onerror = () => reject('Failed to read blob');

View on GitHub (pinned to 94993f7401)

When it happens

Trigger: Thrown at browse/src/write-commands.ts:1177 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12). Data as JSON: /api/errors/5352e949fa669d6e. Report an issue: GitHub.