{"record":{"id":"913cc8e743c83dc5","repo":"nilaoda/N_m3u8DL-RE","slug":"resstring-notsupported","errorCode":null,"errorMessage":"ResString.notSupported","messagePattern":"ResString\\.notSupported","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/N_m3u8DL-RE.Parser/StreamExtractor.cs","lineNumber":93,"sourceCode":"            extractor = new DASHExtractor2(parserConfig);\n            rawType = \"mpd\";\n        }\n        else if (rawText.Contains(\"</SmoothStreamingMedia>\") && rawText.Contains(\"<SmoothStreamingMedia\"))\n        {\n            Logger.InfoMarkUp(ResString.matchMSS);\n            // extractor = new DASHExtractor(parserConfig);\n            extractor = new MSSExtractor(parserConfig);\n            rawType = \"ism\";\n        }\n        else if (rawText == ResString.ReLiveTs)\n        {\n            Logger.InfoMarkUp(ResString.matchTS);\n            extractor = new LiveTSExtractor(parserConfig);\n        }\n        else if (rawText == ResString.ReBinaryData)\n        {\n            Logger.InfoMarkUp(ResString.matchBinaryData);\n            throw new NotSupportedException(ResString.notSupported);\n        }\n        else\n        {\n            throw new NotSupportedException(ResString.notSupported);\n        }\n\n        RawFiles[$\"raw.{rawType}\"] = rawText;\n    }\n\n    /// <summary>\n    /// 开始解析流媒体信息\n    /// </summary>\n    /// <returns></returns>\n    public async Task<List<StreamSpec>> ExtractStreamsAsync()\n    {\n        try\n        {\n            await semaphore.WaitAsync();","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/nilaoda/N_m3u8DL-RE/blob/e113dee70c924ee08dae5460624909b04d84cb76/src/N_m3u8DL-RE.Parser/StreamExtractor.cs#L75-L111","documentation":"LoadSourceFromText sniffs the downloaded source text to pick a stream extractor (M3U8, DASH, TS, etc.). If the text is identified as raw binary data (rawText == ResString.ReBinaryData), there is no text-based parser that can handle it, so it throws NotSupportedException(ResString.notSupported). A second generic branch throws the same for any unrecognized content.","triggerScenarios":"LoadSourceFromUrlAsync downloads content whose body is binary (not a recognizable text playlist), or content matching none of the known formats, and LoadSourceFromText falls through to the binary-data or else branch.","commonSituations":"URL points to an actual media file (.ts/.mp4) instead of a playlist; server returns a gzip/binary blob the downloader did not decompress; content is encrypted/DRM-wrapped; URL serves a login or CAPTCHA page that is misdetected.","solutions":["Pass the playlist/manifest URL (m3u8/mpd), not the media segment URL.","Check whether the response is gzip/br compressed and decompress before parsing.","If the content is a raw TS stream, ensure the input is treated as a live TS source rather than text.","Inspect the first bytes of the response to identify the actual content type.","Catch NotSupportedException and fall back to a different extraction mode (e.g. treat as raw binary download)."],"exampleFix":"// before\nawait extractor.LoadSourceFromUrlAsync(mediaUrl); // media segment URL\n// after\nawait extractor.LoadSourceFromUrlAsync(playlistUrl); // pass the m3u8/mpd manifest URL","handlingStrategy":"validation","validationCode":"// only pass manifest URLs; verify the body looks like a text manifest first\nvar head = (await DownloadHeadAsync(url, 512));\nbool isManifest = head.Contains(\"#EXTM3U\") || head.Contains(\"<MPD\") || head.Contains(\"#EXT-X\");\nif (!isManifest) throw new InvalidOperationException($\"{url} does not look like an m3u8/mpd manifest\");","typeGuard":null,"tryCatchPattern":"try { await extractor.LoadSourceFromUrlAsync(url); }\ncatch (NotSupportedException ex) when (ex.Message == ResString.notSupported) {\n    logger.Error($\"Source at {url} is binary/unsupported content; pass the manifest URL instead\");\n}","preventionTips":["Pass m3u8/mpd URLs, not .ts/.mp4 segment URLs.","Confirm gzip/brotli decompression happens before text sniffing.","Check what the server actually returns for the URL.","Handle DRM/encrypted content separately."],"tags":["unsupported-format","parser","content-type"],"backgroundTag":"unsupported-operation","analyzedSha":"e113dee70c924ee08dae5460624909b04d84cb76","analyzedAt":"2026-09-13T02:43:21.078Z","contentChangedAt":"2026-09-13T02:43:21.078Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}