{"record":{"id":"629264e738d3cf40","repo":"subhra74/xdm","slug":"manifest-type-dynamic-is-not-supported","errorCode":null,"errorMessage":"Manifest type dynamic is not supported","messagePattern":"Manifest type dynamic is not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/XDM/XDM.Core/MediaParser/Dash/MpdParser.cs","lineNumber":35,"sourceCode":"        private static string trickModeUri = \"http://dashif.org/guidelines/trickmode\";\r\n        private static readonly Regex TemplatePattern =\r\n            new Regex(@\"\\$(RepresentationID|Time|Time%0(?<time_digits>[\\d]+)(?<time_dx>[dx])?|Number|Number%0(?<num_digits>[\\d]+)(?<num_dx>[dx])?|Bandwidth)\\$\");\r\n        //@\"\\$(RepresentationID|Time|Time(%0([\\d]+)([dx])?)?|Number|Number(%0([\\d]+)([dx])?)?|Bandwidth)\\$\");\r\n        public static IList<IList<KeyValuePair<Representation?, Representation?>>> Parse(\r\n            string[] manifestLines,\r\n            string playlistUrl)\r\n        {\r\n            using var memstream = new MemoryStream(Encoding.UTF8.GetBytes(string.Join(\"\\n\", manifestLines)));\r\n            var xmldoc = new XmlDocument();\r\n            xmldoc.Load(new XmlTextReader(memstream)\r\n            {\r\n                Namespaces = false\r\n            });\r\n\r\n            if (xmldoc.DocumentElement?.Name != \"MPD\")\r\n                throw new Exception(\"Missing MPD start tag: \" + xmldoc.DocumentElement.Name);\r\n            if (xmldoc.DocumentElement.Attributes[\"type\"]?.Value == \"dynamic\")\r\n                throw new Exception(\"Manifest type dynamic is not supported\");\r\n            if (xmldoc.DocumentElement.SelectSingleNode(\"descendant::ContentProtection\") != null)\r\n                throw new Exception(\"Encrypted manifest\");\r\n\r\n            var mediaList = new List<IList<KeyValuePair<Representation?, Representation?>>>();\r\n\r\n            var mediaPresentationDuration =\r\n                DashUtil.ParseXsDuration(xmldoc.DocumentElement.Attributes[\"mediaPresentationDuration\"]?.Value ?? \"0\");\r\n            var baseUrl = new Uri(playlistUrl);\r\n            var baseUrlNodeRoot = xmldoc.DocumentElement.SelectSingleNode(\"child::BaseURL\");\r\n            if (baseUrlNodeRoot != null)\r\n            {\r\n                baseUrl = UrlResolver.Resolve(baseUrl, baseUrlNodeRoot.InnerText);\r\n            }\r\n\r\n            var periods = xmldoc.DocumentElement.SelectNodes(\"child::Period\");\r\n            if (periods == null || periods.Count < 1) throw new Exception(\"No period found!\");\r\n            if (periods.Count > 1)\r\n            {\r","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/subhra74/xdm/blob/1ca5a25aae007826c859c81bea494e7c102e1242/app/XDM/XDM.Core/MediaParser/Dash/MpdParser.cs#L17-L53","documentation":"The MPD parser only supports static (VOD) DASH manifests. After validating the root tag, Parse reads the MPD element's \"type\" attribute and throws this error when it equals \"dynamic\", i.e. a live stream manifest. Dynamic manifests change over time and are not supported by this code path.","triggerScenarios":"Parsing an MPD whose root element carries type=\"dynamic\" — typically a live/linear DASH stream URL rather than an on-demand (type=\"static\" or no type) manifest.","commonSituations":"User pastes a live TV or live-event DASH URL expecting a download; a VOD site accidentally serves the live variant of a manifest; broadcaster periodically switches manifests during events.","solutions":["Use a static (VOD) MPD URL instead of the live one; look for the on-demand rendition of the content.","Wait until the live event finishes and grab the archived/static manifest if one is published.","Remove or adapt this check only if you genuinely need live support (requires SegmentTemplate/availabilityTimeOffset handling) — not a quick fix.","Catch the error upstream and inform the user that live DASH is not supported."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var body = await http.GetStringAsync(manifestUrl);\nif (body.Contains(\"type=\\\"dynamic\\\"\") || body.Contains(\"type='dynamic'\"))\n    throw new Exception(\"Live (dynamic) DASH manifest not supported\");","typeGuard":null,"tryCatchPattern":"try { return MpdParser.Parse(url, null); }\ncatch (Exception ex) when (ex.Message == \"Manifest type dynamic is not supported\")\n{ throw new UnsupportedStreamException(\"Live DASH streams are not supported\", ex); }","preventionTips":["Detect live streams early via MPD type attribute and reject with a clear message","Prefer VOD/archive URLs when both are offered","Document live-DASH limitation for users of the library"],"tags":["dash","live-stream","unsupported-feature","manifest-parsing"],"backgroundTag":"unsupported-operation","analyzedSha":"1ca5a25aae007826c859c81bea494e7c102e1242","analyzedAt":"2026-09-13T20:37:40.968Z","contentChangedAt":"2026-09-13T20:37:40.968Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}