Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffering video unrelated to connection #6510

Closed
n0rder opened this issue Jun 17, 2021 · 109 comments · Fixed by #6792
Closed

Buffering video unrelated to connection #6510

n0rder opened this issue Jun 17, 2021 · 109 comments · Fixed by #6792
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug requires extractor change This issue requires a change to the extractor youtube Service, https://www.youtube.com/

Comments

@n0rder
Copy link

n0rder commented Jun 17, 2021

Screen recording

As you can see in the screen record videos randomly buffer when in video mode, however in background mode the audio plays fine.

This issue is limited to newpipe and other video apps work fine.

Samsung galaxy s10+ android 11

Reinstalling newpipe doesn't work
Changing Internet connection doesn't work

@matheusAMDS
Copy link

I can't visualize the link you shared, but i'm having problems with my videos infinitely loading. Maybe its something related?

@LauriKat
Copy link

LauriKat commented Jun 18, 2021

I am having same issue as OP.
Thought new version would solve it had something buffering related improvements but I still have this problem

Redmi Note 8 pro
Android 10

@botistreamer
Copy link

I am also having same issue in 0.21.5 on some videos randomly.
Poco X3 - Android 11

@djuarezr
Copy link

Same here, even though with version 0.21.5 the problem has been mitigated a lot. If logs are needed just let me know.

Xiaomi Mi 9T - Miui 12.0.5 - Android 10

@Redirion
Copy link
Member

please try this apk: TeamNewPipe/NewPipeExtractor#604

if the problem also happens with that apk, please collect the adb logcat logs from the issue

@triallax
Copy link
Contributor

For all those facing this issue, using external players will probably not have this issue.

@triallax triallax added ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug player Issues related to any player (main, popup and background) labels Jun 18, 2021
@djuarezr
Copy link

It is the first time I try to get a logcat so I do not know whether it is what you need, but I got it. The logcat is from TeamNewPipe/NewPipeExtractor#604. Video starts at line 12, and after 30 seconds it starts the continuous buffering.

Hope this helps.

NewPipe_YoutubeI_Api.log

@Redirion
Copy link
Member

thanks. A quick glance shows these log lines demand further inspection as they might be the cause (but not the root cause) of the issue:

AudioTrack: getTimestamp_l(417): retrograde timestamp time corrected
AudioTrack: getTimestamp_l(417): device stall time corrected using current time

@Redirion
Copy link
Member

@djuarezr could you try if the issue also happens with Media Tunneling disabled? You find the option to disable that in the debug options.

@djuarezr
Copy link

First I should have mentioned before that the log that I posted before is from a video at 1.5x speed. So far it also happens when tunneling is disabled. But I could not replicate the issue with the same video anymore. Thus, to be more precise, here is a more fair comparison I made. Every log is from a clean app, 1080p webM video, and the smartphone at the exact same distance to WiFi:

Hope all these logs could help to decrypt the issue.

@B0pol B0pol pinned this issue Jun 18, 2021
@lordkitsuna
Copy link

ill throw my hat in. i am having issues with newpipe buffering super slowly initially on a 1Gbps connection (530Mbps verified as possible on wifi locally with iperf3) video at any quality stalls for upwards of 30 seconds, after that they play fine unless i seek out far then it happens again. fresh install of lineageos, tons of free space, no gapps or anything so cpu is pretty quiet.

happy to provide any info i can just let me know what you need

@Taratect
Copy link

Taratect commented Jun 18, 2021

I used to have this problem till the version 0.21.5 came out. So far there hasn't been any buffering.
Hope if updating helps n I'll update if I face buffering while using the latest version atm.

Also I'd like to let I know as @djuarezr pointed, I also watch my vids by increasing playback speed of this is somehow related.

Edit: Now I'm suffering from buffering regardless of good internet connection

@stoneubi
Copy link

Same here. Since two or three versions this buffering problem occurs. Before that, everything worked perfectly. Latest version hasn't fixed this. Realme 6. Hope this issue will be fixed as for now newpipe cannot play every video.

@nikhilCad
Copy link

I do not know whether it is related to this issue or not but loading large videos like 10hr+ take a very long time as compared to the normal 10-15 minute videos.

@TheGrigoryans
Copy link

exactly, same problem 2 smartphones, redmi 8note, redmi 9t, version 0.21.5

@dankxylese
Copy link

dankxylese commented Jun 20, 2021

I'll add some of my experience with this bug.

Killing the app and restarting it fixes the problem for me (I have long press back bind to kill apps).

It will usually hover over 250-280KB/s for me when it's stuck in that bugged state. After killing and restarting the app, going to history and playing the same video, it instantly peeks to 4-6MB/s and nicely loads the video.

My guess would be that it might be YouTube figuring out the client is "not official" and throttling the connection. Or maybe there are slow servers that NewPipe is connecting to, since just killing the app, no cache clear or anything fixes the issue for me.

Android 10 AICP (AOSP based).
Rooted + Magisk and Xposed modules loaded.
OnePlus 5T.

I'll make sure to grab a logcat when it happens next time for me, so I can try and capture the before and after killing the app. Maybe it'll help lead to the issue.

Edit: also I'm still on 0.21.4 and experiencing this so definitely wasn't from 0.21.5 alone

@dankxylese
Copy link

dankxylese commented Jun 20, 2021

First I should have mentioned before that the log that I posted before is from a video at 1.5x speed. So far it also happens when tunneling is disabled. But I could not replicate the issue with the same video anymore. Thus, to be more precise, here is a more fair comparison I made. Every log is from a clean app, 1080p webM video, and the smartphone at the exact same distance to WiFi

In my case it enters this state one to 3-4 times a day, usually when Newpipe has been left in sleep for a while, or is a cold start (OnStart()/OnResume())?

Or could be YouTube breaking things again. Building an apk with the old exoplayer should rule that one out.

@triallax
Copy link
Contributor

Or could be YouTube breaking things again. Building an apk with the old exoplayer should rule that one out.

That's precisely what #6524 is.

@bzp99
Copy link

bzp99 commented Jun 20, 2021

Same issue here, although I haven’t tried with v0.21.5 yet. Even on extremely low quality (say 360p), videos keep buffering every few seconds, making them impossible to watch. The network speed is fine, on another phone with the official app, there is no problem. Soft restarting or killing the app does not help. I am not sure, but I think this only happens with some videos.

@opusforlife2
Copy link
Collaborator

opusforlife2 commented Jun 20, 2021

Everyone facing the buffering issue, please test the APK in #6542. We wish to confirm that it fixes the problem.

@djuarezr
Copy link

I tried the APK in #6524 (could not get logs yet) and looks like the bug is gone. I had to play videos at greater than 2x speed to force some buffering. But I want other people to try the APK to compare.

Btw, I configured the APK to play videos at 1080p60 by default. Some videos I tried are not available at 1080p in youtube (just 720p or below), but newpipe allows me to play that video at 1080p60. Is there any rendering to upscale the resolution that could lead to this buffering issue?

@ghost
Copy link

ghost commented Jun 21, 2021

Similar issue. Sometimes the bandwidth stays around 50-100KB/s 1080p and the video buffers, plays 0.5 seconds, then repeat. Cache wipe or app reset usually solves issue.

@infinitewaveparticle

This comment has been minimized.

@BoldyPlays
Copy link

Thanks pythonInRelay. Clearing cache temporarily resolves the issue. Galaxy note 10+ (SM-N975F) Android 11 with Newpipe 0.21.7

@AudricV AudricV mentioned this issue Jul 21, 2021
4 tasks
@deadcombo
Copy link

The apk labeled as youtubei-api fixed the issue for me. Testing for over a week.

@AudricV
Copy link
Member

AudricV commented Jul 27, 2021

Can you try this APK and check if the issue is fixed? It's based on TeamNewPipe/NewPipeExtractor@d13f531 and on the 0.21.6 version (the only change I made in the app is the extractor version).

app-debug.zip

Thank you in advance.

@bibin-v2020
Copy link

Can you try this APK and check if the issue is fixed? It's based on TeamNewPipe/NewPipeExtractor@d13f531 and on the 0.21.6 version (the only change I made in the app is the extractor version).

app-debug.zip

Thank you in advance.

Seems issue fixed on this apk! I've tested it for some hour's, till now no buffering issue reported

@XiangRongLin
Copy link
Collaborator

Can you guys test out the apk inside #6673 for a few days and report back in that PR. I will not be responding to an y comments here.

This got finalized with some help of the other members. See the apk in the new PR #6792

@BedHedd
Copy link

BedHedd commented Jul 29, 2021

If buffering start. Go to comments. Then scroll comments until comments need to download new lines. Back to video, no more buffering.

I found this solution to work on Newpipe 0.21.7.
Realme XT - Android 10

Even if I get #6744, clicking the retry seems to work. I get the buffering issues more for longer videos. My gut is saying it's a placebo, so I'll update if this continues to work.
Examples
https://www.youtube.com/watch?v=pkuxIy3kFZM
https://www.youtube.com/watch?v=eoAzGg-Si2Q

@ksapp-dell
Copy link

ksapp-dell commented Jul 29, 2021

Hi, i tried both above links with 21.7 and there is no buffering (also with 1080 - no problem) - only the app doesn't load comments. Just an error and two buttons (reload and report).

P.s. - may be that's a hint. I started another video an it was buffering. I disabled ,load comments and description' and buffering went away ?

Exception

  • User Action: requested comments
  • Request: Start loading: https://www.youtube.com/watch?v=eoAzGg-Si2Q
  • Content Country: DE
  • Content Language: de-DE
  • App Language: de_DE
  • Service: YouTube
  • Version: 0.21.7
  • OS: Linux Android 8.0.0 - 26
Crash log

org.schabi.newpipe.extractor.exceptions.ParsingException: Could not parse json data for comments
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeCommentsExtractor.getPage(YoutubeCommentsExtractor.java:100)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeCommentsExtractor.getInitialPage(YoutubeCommentsExtractor.java:55)
	at org.schabi.newpipe.extractor.utils.ExtractorHelper.getItemsPageOrLogError(ExtractorHelper.java:19)
	at org.schabi.newpipe.extractor.comments.CommentsInfo.getInfo(CommentsInfo.java:40)
	at org.schabi.newpipe.extractor.comments.CommentsInfo.getInfo(CommentsInfo.java:25)
	at org.schabi.newpipe.util.ExtractorHelper.lambda$getCommentsInfo$7(ExtractorHelper.java:155)
	at org.schabi.newpipe.util.-$$Lambda$ExtractorHelper$60N_-UL7E5eaxFaFO1bZZmnfwM8.call(Unknown Source:4)
	at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:153)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15753)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
	at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
	at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:614)
	at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
	at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
	at java.lang.Thread.run(Thread.java:764)
Caused by: com.grack.nanojson.JsonParserException: Unexpected character: < on line 1, char 1
	at com.grack.nanojson.JsonTokener.createParseException(Unknown Source:44)
	at com.grack.nanojson.JsonTokener.advanceToToken(Unknown Source:118)
	at com.grack.nanojson.JsonParser.advanceToken(Unknown Source:12)
	at com.grack.nanojson.JsonParser.parse(Unknown Source:1)
	at com.grack.nanojson.JsonParser$JsonParserContext.from(Unknown Source:19)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeCommentsExtractor.getPage(YoutubeCommentsExtractor.java:98)
	... 30 more


@swarupbc

This comment has been minimized.

@codingicebear

This comment has been minimized.

@Disqu3-mirOir-qt

This comment has been minimized.

@ksapp-dell
Copy link

ksapp-dell commented Jul 31, 2021

It was getting better with disabled comments for many videos, but this one keeps buffering without comments - doesn't matter which resolution above 360p
https://www.youtube.com/watch?v=tw9VF1V-Lzc&t=148
The buffering stops if I hear just audio when the video plays in background.

@infinitewaveparticle
Copy link

infinitewaveparticle commented Aug 2, 2021 via email

@Dastardly-Entrench
Copy link

Now that the pr is merged, will there be a hotfix release?

@AbsurdlySuspicious
Copy link

AbsurdlySuspicious commented Aug 2, 2021

Comments fix is still unmerged AFAIK (TeamNewPipe/NewPipeExtractor#604)

@Somadima
Copy link

Somadima commented Aug 2, 2021

Everything is fine until the Newpipe reaches ~70 MB of cache then there is a problem with buffering, a small observation.

@20manas
Copy link

20manas commented Aug 13, 2021

This issue is still present in version 0.21.8 of NewPipe. This should be reopened.

@infinitewaveparticle
Copy link

infinitewaveparticle commented Aug 13, 2021 via email

@ghost
Copy link

ghost commented Aug 13, 2021

For me I just have to clear cache and then it works.

I don't think any of this is helpful though, this is not new information.

@conkerts
Copy link

conkerts commented Aug 14, 2021

Everything is fine until the Newpipe reaches ~70 MB of cache then there is a problem with buffering, a small observation.

My buffering & 70kb/s speed issues seem to be solved with the latest update.

Though my newpipe is currently at 128MB cache and is still fine.
But occasionally nothing works and I have to force close the app and clear the cache to make any video load again. With the cache bug, the app doesn't load any videos at all.

I think the cache thing/problem is something different and should go into another thread, but I agree, it is also extremely annoying.

@aleksfadini
Copy link

This issue is still present in version 0.21.8 of NewPipe. This should be reopened.

Agreed!

@bibin-v2020
Copy link

bibin-v2020 commented Aug 15, 2021

Buffering issue is fixed for me after 0.21.8 update but sometimes videos don't even play, it keeps on loading, may be a different issue!

@infinitewaveparticle
Copy link

infinitewaveparticle commented Aug 18, 2021 via email

@opusforlife2
Copy link
Collaborator

The problem this issue was opened for has been fixed in the current release. If you face any new problem, please investigate it thoroughly from scratch, assuming it's a different problem than this, and open a new issue if needed.

@TeamNewPipe TeamNewPipe locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug requires extractor change This issue requires a change to the extractor youtube Service, https://www.youtube.com/
Projects
None yet