{"record":{"id":"9e5b783530c8217f","repo":"TeamNewPipe/NewPipe","slug":"error-when-generating-the-dash-manifest-of-youtube-9e5b78","errorCode":null,"errorMessage":"Error when generating the DASH manifest of YouTube OTF stream","messagePattern":"Error when generating the DASH manifest of YouTube OTF stream","errorType":"exception","errorClass":"ResolverException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java","lineNumber":494,"sourceCode":"                }\n            case DASH:\n                // If the content is not a URL, uses the DASH delivery method and if the stream\n                // type of the stream is a video stream, it means the content is an OTF stream\n                // so we need to generate the manifest corresponding to the content (which is\n                // the base URL of the OTF stream).\n\n                try {\n                    final String manifestString = YoutubeOtfDashManifestCreator\n                            .fromOtfStreamingUrl(stream.getContent(),\n                                    Objects.requireNonNull(stream.getItagItem()),\n                                    streamInfo.getDuration());\n                    return buildYoutubeManualDashMediaSource(dataSource,\n                            createDashManifest(manifestString, stream), stream, cacheKey,\n                            metadata);\n                } catch (final CreationException | IOException | NullPointerException e) {\n                    Log.e(TAG,\n                            \"Error when generating the DASH manifest of YouTube OTF stream\", e);\n                    throw new ResolverException(\n                            \"Error when generating the DASH manifest of YouTube OTF stream\", e);\n                }\n            case HLS:\n                return dataSource.getYoutubeHlsMediaSourceFactory().createMediaSource(\n                        new MediaItem.Builder()\n                                .setTag(metadata)\n                                .setUri(Uri.parse(stream.getContent()))\n                                .setCustomCacheKey(cacheKey)\n                                .build());\n            default:\n                throw new ResolverException(\"Unsupported delivery method for YouTube contents: \"\n                        + deliveryMethod);\n        }\n    }\n\n    private static DashMediaSource buildYoutubeManualDashMediaSource(\n            final PlayerDataSource dataSource,\n            final DashManifest dashManifest,","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/TeamNewPipe/NewPipe/blob/9e8be091560a69f35d44bd252eb00bc7911c977b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java#L476-L512","documentation":"Thrown by PlaybackResolver.createYoutubeMediaSourceOfVideoStreamType when generating the DASH manifest for a YouTube OTF (On-The-Fly) stream fails. The code calls YoutubeOtfDashManifestCreator.fromOtfStreamingUrl and wraps any CreationException, IOException, or NullPointerException (from a null ItagItem) into this ResolverException. Unlike the progressive path, there is no fallback here; the error is logged and rethrown.","triggerScenarios":"A YouTube OTF-channel stream (delivery method DASH with non-URL content) where manifest creation fails: ItagItem is null, the OTF URL is malformed/changed, or the creator cannot build the manifest. CreationException, IOException, or NPE in the try block all map here.","commonSituations":"The extractor did not attach an ItagItem, YouTube changed the OTF URL format so YoutubeOtfDashManifestCreator cannot parse it, or stream.getContent() is invalid/null. OTF streams are format-sensitive, so YouTube-side changes frequently break this after updates.","solutions":["Update the NewPipe extractor and YoutubeOtfDashManifestCreator to match YouTube's current OTF URL scheme.","Validate stream.getItagItem() is non-null and stream.getContent() is a valid OTF URL before manifest generation.","Retry playback on re-resolve; transient OTF failures can clear.","Fall back to an alternate itag or delivery method (e.g. HLS) for the same video."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (stream.getItagItem() == null || stream.getContent() == null) {\n    // cannot generate OTF manifest; skip or fall back\n}","typeGuard":null,"tryCatchPattern":"try {\n    return createYoutubeMediaSourceOfVideoStreamType(dataSource, stream, streamInfo, cacheKey, metadata);\n} catch (final ResolverException e) {\n    // OTF manifest generation failed; try another itag or HLS\n}","preventionTips":["Validate stream.getItagItem() is non-null before OTF manifest generation.","Keep YoutubeOtfDashManifestCreator updated as YouTube's OTF URL scheme changes.","Provide an alternate itag/delivery fallback when OTF fails."],"tags":["playback","resolver","youtube","dash","otf","media-source"],"backgroundTag":null,"analyzedSha":"9e8be091560a69f35d44bd252eb00bc7911c977b","analyzedAt":"2026-08-14T00:11:33.519Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}