TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.35k stars 3.05k forks source link

Slow buffering #1294

Closed azat11 closed 4 years ago

azat11 commented 6 years ago

I have a 50mbps Wi-Fi and videos do still buffer very slowly, especially when it comes to 60fps. So much so that I can not even watch the video for a minute or two without the loading circle appearing. And with the 0.13.1 version it's now the loading circle for a couple of seconds every couple of seconds of the video. Is it just me, or is this just how NewPipe is?

theScrabi commented 6 years ago

50mbps Wi-Fi

lucky mann, my connection barely has 10mbps.

And with the 0.13.1 version it's now the loading circle for a couple of seconds every couple of seconds of the video.

I noticed that as well but I was not sure yet. I'll need to see during the next days. However for me it helped to just close the video and restart it.

azat11 commented 6 years ago

However for me it helped to just close the video and restart it.

Seems to help for now. Although it buffers so slowly I can't even see it on the progress bar.

lucky mann, my connection barely has 10mbps.

Well, it's Russia man. $9 for a month at 50mbps. Double at double the speed. And it's really like 30mbps of those 50 at my smartphone, says speedtest.net.

theScrabi commented 6 years ago

xD you've never been to germany. Everyone says we have a shitty net... its because we have a shitty net. You are lucky if you get 50mbps there but you pay up to 40$ for it.

Right now I life in Spain, where we have fibber everywhere... except my landlord decided that fibber was to expensive and gave me and my room mates copper/DSL again -.-

karyogamy commented 6 years ago

This is our current buffering strategy. In short, once we enter buffering state (at the start or not enough data while playing), and the player have loaded initialPlaybackBufferMs, the playback will start immediately. When playing, the buffer will zigzag between the minimumPlaybackbufferMs and optimalPlaybackBufferMs watermarks.

And with the 0.13.1 version it's now the loading circle for a couple of seconds every couple of seconds of the video.

I imagine the constant buffering on 13.1 is because the initialPlaybackBufferMs might be too low for unstable network, though it really makes starting up a video faster under stable situations. So, it might be a good idea to create a setting in the player that allows the user to change the initialPlaybackBufferMs parameter, to let the player buffer for a little more before start playing.

azat11 commented 6 years ago

However for me it helped to just close the video and restart it.

Update. This only helps for a minute or so. After that it's back to couple seconds of loading and playing for 720p60, and a second/half a second of loading and playing for 720p. With the new version I now can not watch videos at all, though with these speeds it shouldn't be a problem. BTW, tried SkyTube, and it works fine for the 720p (no 60fps option there). So it's likely not not the connection that is the culprit.

theScrabi commented 6 years ago

create a setting in the player that allows the user to change the initialPlaybackBufferMs parameter, to let the player buffer for a little more before start playing.

I think this sounds like a good idea. :D ... but i think we maybe need an advanced settings view one day.

BTW, tried SkyTube, and it works fine for the 720p (no 60fps option there). So it's likely not not the connection that is the culprit.

Of coerce when you say you have 50mbps it has to be NewPipe.

azat11 commented 6 years ago

Someone wrote here about clearing the cache. Seems the comment was deleted. I assume what was meant is metadata cache, and that helped me today. Were able to watch in 720p60 without any buffering lags at all.

azat11 commented 6 years ago

Update: Clearing the cache helps for a minute or two now, and then back to buffering glitches.

theScrabi commented 6 years ago

Hm :/ I could think so. What could be the reason. To less storage space? Should we consider to clear the cache periodical.

azat11 commented 6 years ago

Nothing changed on 0.13.2. I guess I'm deleting NewPipe. Hope this will get solved in the future (if anyone cares about this at all, maybe it's too rare of an issue). Cheers.

bmccoy11 commented 6 years ago

I've been having this issue as well. Sometimes the issues goes away shortly if I switch to a higher or lower quality stream or clear my cache, but it makes NewPipe unusable for me.

azat11 commented 6 years ago

I've been having this issue as well. Sometimes the issues goes away shortly if I switch to a higher or lower quality stream or clear my cache, but it makes NewPipe unusable for me.

I switched to OGYouTube, like it less, but it works.

theScrabi commented 6 years ago

@azat11 instead of creating pressure you could help us solve this issue. We are all people that have our daily job and our daily tasks. It's not like we don't care that the app has a problem, but finding time for that is kind of hart, and so far we seem to dick in the dark.

@bmccoy11 @azat11 maybe the log says anything useful. Could you provide use one.

ghost commented 6 years ago

I think this happens because John changed the amounts of buffer iirc. I think we can fix it by just changing it back. Btw I don't have this issue (even at 1080p60 at 2×).

karyogamy commented 6 years ago

@bmccoy11 @azat11

Does this type of buffering problem still occur when you bring down the quality (e.g. to 360p)?

If you have external video players such as VLC, does this problem also happen if you open the video in them (with your usual quality: 720p60, 720p, etc.)?

Since you mentioned clearing caches make things faster, can you check the memory usage during playback? Just want to make sure you are not running out of memory while playing video, which can cause stutters and buffering. Would appreciate if you can provide your device info.

If possible, can you please also include a video capture of this happening? Any further details will help us to debug this problem.

OGYouTube

OGYouTube lost support for quite some time now, I recommend giving iYTBP or YMusic a shot, if you are willing to overlook the FOSS and multiservice aspects.

@theScrabi @wb9688

We can try reverting the buffering strategy, though I'm not sure this will solve the root cause, since @azat11 mentioned the problem happened every minute instead of the couple seconds now. As the playback start time was 2500ms compared to the 500ms now, it's strange as to why there would be such a difference, since the buffer being consumed shouldn't affect the stream downloading.

It's even stranger that clearing the metadata cache would alleviate this problem, since the cache has a hardlimit on how many entries we can have in there, being LRU and all, which can't really be a memory issue on a recent device.

azat11 commented 6 years ago

@karyogamy I'll provide the info as soon as I get to installing NewPipe again and checking it all.

since @azat11 mentioned the problem happened every minute instead of the couple seconds now

It really did this: a minute or two of playback without issues, and then buffering stutter started (video stops to buffer every two-three seconds). Sometimes clearing the cache would help, sometimes not, so I can not pinpoint that that solution works 100%.

I have a question though: should it not show buffered video in the progress bar? It never really buffered more than a few seconds with me, so I couldn't even see that on the progress bar (different shade of red). Or is that normal and as is intended?

karyogamy commented 6 years ago

should it not show buffered video in the progress bar?

With 720p on 50mbps, it absolutely should. If there is no buffering at all, then maybe the player failed to create a cache file. How much storage space do you have left?

azat11 commented 6 years ago

How much storage space do you have left?

Uhmm.. It's mostly unused, around 60 GB..

theScrabi commented 6 years ago

@azat11 I've created a test build with the changes made in https://github.com/TeamNewPipe/NewPipe/pull/1389. Please tell me if it works: https://cloud.damken.com/index.php/s/wSyRd2yC15x2ZwT passwort is: buffertest

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Stypox commented 5 years ago

Is this still an issue? I can't reproduce it... I can only play 1080p60 videos on my phone, since that's the screen resolution, but they buffer as expected. On slow networks (e.g. 5mbps) the bandwidth is almost completely used by NewPipe, and the buffer progress bar is always some seconds ahead of the playing progress bar.

gkeegan commented 5 years ago

@stypox I believe this was fixed in 0.16.2. It was a separate issue from the one with music videos not loading.

Stypox commented 5 years ago

Mmh I see... it was probably fixed by #1392 , since 0.16.2 release notes have nothing about slow buffering

PinkSerenity commented 4 years ago

I still have that problem though.

opusforlife2 commented 4 years ago

@Tojaw Wait for 0.20.0 to release and try it. If it is still a problem, then open a new issue.

PinkSerenity commented 4 years ago

Thank you. I will do that.

1reverseengineer commented 3 years ago

Update for future readers, the buffering issue is back. Version 0.21.9, installed via Fdroid.

infinitewaveparticle commented 3 years ago

I second this... Every few minutes videos buffer. Only this time you can usually change it to any other resolution and it works again... For a few minutes. The only way to get it to not buffer at all is to put it at 240p or 144p.

1reverseengineer commented 3 years ago

I second this... Every few minutes videos buffer. Only this time you can usually change it to any other resolution and it works again... For a few minutes. The only way to get it to not buffer at all is to put it at 240p or 144p.

For me it buffers a ton at the beginning, even vanced and youtube original play almost immediately.

Is there even a way we can even submit diagnostics/help dev? It's a buffering issue, not crashes, java exceptions etc...

Still want to thank the newpipe devs, the app is free, quite impressive and they put their free-time into this.

infinitewaveparticle commented 3 years ago

There's a more recent buffering issue that was opened - and closed with version 0.21.8, I think...?... That's the one that is happening again for me. You may want to create a new issue for what you're experiencing, or search for one that matches exactly what you're seeing and add your message there. These issues definitely need revisited. I appreciate NewPipe too, but when it buffers so much and issues like this keep reappearing it's basically unusable.

Sent from ProtonMail mobile

-------- Original Message -------- On Sep 10, 2021, 11:16 AM, 18iteration wrote:

I second this... Every few minutes videos buffer. Only this time you can usually change it to any other resolution and it works again... For a few minutes. The only way to get it to not buffer at all is to put it at 240p or 144p.

For me it buffers a ton at the beginning, even vanced and youtube original play almost immediately.

Is there even a way we can even submit diagnostics/help dev? It's a buffering issue, not crashes, java exceptions etc...

Still want to thank the newpipe devs, the app is free, quite impressive and they put their free-time into this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

frak0d commented 2 years ago

Can we just have option to set buffer manually ? (Just like YT Vanced gives you the option)

opusforlife2 commented 2 years ago

@Tanishq-Banyal Don't ping 12 people by commenting on an old closed issue, please. Search for relevant open ones, or open your own.