From ebbfe7f6d4dfd03a2f88367b33734989512b0181 Mon Sep 17 00:00:00 2001 From: wb9688 Date: Tue, 29 Sep 2020 10:48:02 +0200 Subject: [PATCH] Skip YouTube's OTF streams --- .../youtube/extractors/YoutubeStreamExtractor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index b5c6c796a..0b18c4c27 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -957,6 +957,13 @@ public class YoutubeStreamExtractor extends StreamExtractor { try { ItagItem itagItem = ItagItem.getItag(itag); if (itagItem.itagType == itagTypeWanted) { + // Ignore streams that are delivered using YouTube's OTF format, + // as those only work with DASH and not with progressive HTTP. + if (formatData.getString("type", EMPTY_STRING) + .equalsIgnoreCase("FORMAT_STREAM_TYPE_OTF")) { + continue; + } + String streamUrl; if (formatData.has("url")) { streamUrl = formatData.getString("url");