Closed ghost closed 2 years ago
Could you please test the APK of #6537 which makes the app use the streaming URLs of the
WEB
YouTube client first (with then
param unthrottled (it is the case for these URLs since version 0.21.8 of the app) and with some other params of official clients too) and see if you have buffering issues with this APK? Thank you in advance.Direct link of the APK: https://github.com/TeamNewPipe/NewPipe/suites/4224687319/artifacts/109290035
It didn't solve the problem
After installing VancedYT and VancedMicroG NewPipe actually started buffering faster. Idk if it's a coincidence.
Installing vancedMicroG alone worked for me. Thank you for the tip. https://github.com/YTVanced/VancedMicroG
It kind of helps, not actually solved the problem completely
I thought zeroPi2021 had an interesting lead with the DNS topic as I use the app PersonalDNSFilter and piholes with my devices.
I'm seeing this issue at lower resolutions 480/360/240/144 and will often just switch to a lower resolution and it will start again. Seemingly it happens when there's about 45 seconds left in a video for me. However it's also happening a minute or so into other videos. Could just be about every ten minutes it's freezing up.
For sure feels like rate limiting, props to those who linked to other repositories having similar bugs. Sounds like the JavaScript challenge is likely the cause.
Keep up the great work. It looked like this is on the right track.
I don't think it will help to include device and app versions here, as it seems to be understood to not be device specific.
A small statement about what we are using and what we already do:
n
parameter of videoplayback URLs of the web client since the version 0.21.8 of the extractor and the app;I tried to spoof better YouTube clients when trying to get streams and here is an APK with my changes:
app-debug.zip app-debug.zip app-debug.zip app-debug.zip
(Note that I opened a PR with my changes, in the case it helps someone with the throttling issues: TeamNewPipe/NewPipeExtractor#780
)
App source code: https://github.com/TiA4f8R/NewPipe/tree/yt-more-params-innertube-requests Extractor source code: https://github.com/TiA4f8R/NewPipeExtractor/tree/yt-more-params-innertube-requests
Are you getting better results/less buffering with it or not?
Thank you TiA4f8R. I'm answering from my created and closed issue #7639
I installed your debug version and tried it again, the timespan, the buffering occurs is massively reduced but the buffering while watching a video is so often active that i prefer do download the video and watch it completely fluent after.
@TiA4f8R your apk drastically reduces buffering, can actually watch videos without downloading now, thank you
Would it be possible to have this testing app with #7734 fix applied, please? I would like to test these changes but I cannot play any video with it, as the source code is older than youtube crash. Thank you in advance.
I will update it when I will have some time.
@djuarezr You can now test with the new debug APK in my comment above.
Thank you! I will use it as daily driver for some days and write my results, but the changes look promising.
After using the app these two days, it seems that the poblem is almost solved; just some minor bufferings.
Check the following log. I played a video (at 2x speed just if it helps to see the bug). After 8 seconds it buffers just a moment. After 2:40 (aprox) I jump to minute 8:49, and at 9:15 the video starts to buffer again for some time until it continues. There is when I stop logging.
Hope this could help. Just let me know if you need more logs.
@djuarezr Sorry for the very late reply, I forgot this issue. Maybe that's because of the playback speed you are using.
Anyway, could you (and others) try this APK and see if the issue is less present? It uses a custom HttpDataSource
(based on DefaultHttpDataSource
), which spoof better the YouTube clients and uses DASH to fetch progressive contents, instead of progressive HTTP.
Note: this APK contains all my work for the support of other delivery methods than progressive HTTP, for which I will try to open a new app PR in the coming days.
Thank you in advance!
There is something weird happening with the resolutions and video formats available with this debug version (sometimes no MPEG-4 available, but it's definitely there, sometimes weird resolutions like here: https://www.youtube.com/watch?v=MjljCEqiE74, but I can't reproduce the problems with long buffering at the start of in between with it which I see with the normal release. And that's really fine! :+1:
It was impossible for me to reproduce the problem with the last app, even at 1080p 3x. Thank you very much!
There is something weird happening with the resolutions and video formats available with this debug version (sometimes no MPEG-4 available, but it's definitely there, sometimes weird resolutions like here: https://www.youtube.com/watch?v=MjljCEqiE74
Indeed, I tried to set dynamically resolution based on what the resolution is really, but it seems it create some weird issues. I will revert this.
I can't reproduce the problems with long buffering at the start of in between with it which I see with the normal release.
Thanks for confirming!
@TiA4f8R Finally! This APK loads most videos almost instantaneously for me!
A bit of bad news, though: for those videos that aren't loaded immediately, they take even longer to load, or need workarounds (skipping ahead/restarting) to be used more often, compared to the current release.
I can confirm the resolutions thing too. For a lot of videos, both WebM and MP4 streams are shown at the same time, making the drop-down very long. And others have non-standard numbers, like 237p, 518p, etc.
for those videos that aren't loaded immediately, they take even longer to load, or need workarounds (skipping ahead/restarting) to be used more often, compared to the current release.
@opusforlife2 Could you post a few sample links that reproduces this problem? If skipping ahead starts the playback right away, then it might be fixed by skipping the first keyframe.
I tried to spoof better YouTube clients when trying to get streams and here is an APK with my changes: ~app-debug.zip~ ~app-debug.zip~ ~app-debug.zip~ app-debug.zip
(Note that I opened a PR with my changes, in the case it helps someone with the throttling issues:
TeamNewPipe/NewPipeExtractor#780
)App source code: https://github.com/TiA4f8R/NewPipe/tree/yt-more-params-innertube-requests Extractor source code: https://github.com/TiA4f8R/NewPipeExtractor/tree/yt-more-params-innertube-requests
Are you getting better results/less buffering with it or not?
I'm using this app-debug apk since last week-end and unfortunately it doesn't solve any problem in my case.
As it is my first post on this thread, I describe the app behavior for me (official Newpipe or fork mentioned in this post seem to have the same behaviour here) :
The double tap left & right gesture let me think that it's not a Youtube limitation of bandwidth : same client, same IP, same video and the buffering go away. This workaround is very annoying to do, but it's the best I found for now.
Hello @Mer0me. The app you should try is in the comment https://github.com/TeamNewPipe/NewPipe/issues/6949#issuecomment-1081067331.
Hmm, how could I miss this comment ? I've installed this new app. First loading is always very long (for a 2 hours video). First buffering after 2 minutes of playback of a 18 minutes video (720p - speed *1.6). The "double-double-tap" method continue to work. Second buffering at 3'21''...
I'll give a try in the next days, but it is not perfect I guess.
Could you post a few sample links that reproduces this problem? If skipping ahead starts the playback right away, then it might be fixed by skipping the first keyframe.
@karyogamy Probably opus uses WEBM, and no WEBM OTF streams are returned for the Android client.
Streams from the WEB
client which are right now extracted are throttled by YouTube (not all streams), this should be improved when TeamNewPipe/NewPipeExtractor#780 is merged.
The changes should be again tested when this PR is merged and I rebased the extractor part of my changes at the top of the dev branch, to test if there is a difference with the current situation.
@Mer0me We are agree the name of the latest APK you are using is ending delivery-methods-v2, right?
Could you take a look at Android's logcat and see if you get an error or a warning from PlaybackResolver
or any strange error from NewPipe and/or its extractor, please? Also, what codec are you using for playback? Are you watching videos from big channels, or some videos from small channels with a small amount of views?
Other issues which may be related:
Yep, it's the delivery-methods-v2 apk that I've just installed. I will try to log something and post it here but I'm not familiar with android debugging. Give me a couple of days. Codec is MPEG-4. Videos are from big and small channels. Buffering occurs indifferently on both. I'm using Newpipe on this device and this connection/ISP since several years. Buffering problems began mid-2021, I guess. It shouldn't be a DNS issue or the hardware, even if it's an old Galaxy Tab GTP5110 under Dhollmen/Android 4.4.4. Other devices on same connection are OK with Newpipe or Youtube.
Thank you for your help, I come back soon after more tests of this version of the app.
This morning, 2 videos watched without any buffering in 720p speed *1.5. I can't remember the last time I could do that ! I will continue to test.
Instead of the latest debug APK I uploaded on the issue, please use the APK generated in #8153.
Because I have to update mocks.
Anyway, that's off-topic to this issue (and you don't need to delete your comment when it's hidden as off-topic, like you like to do).
I compared several videos with SkyTube, which uses the same extractor, NewPipe took much longer time in loading and buffering, and sometimes even endless. This phenomenon did not happen when I tested last year.
After 1 week, I can confirm that the "delivery-methods-v2" apk is resolving most of the problem. The first buffering continue to be quite slow (~30s) but no more buffering after that, except random instant buffering maybe due to my hardawre, Wifi or Internet link. I've not tested the #8153 APK yet.
I compared several videos with SkyTube, which uses the same extractor, NewPipe took much longer time in loading and buffering, and sometimes even endless. This phenomenon did not happen when I tested last year.
@NanyangTaiji With what NewPipe version did you test this? The release version, or the APK in the last pull request I linked? Note also #7919, which will be included in the next release, should help you anyway, by waiting for DASH playback of YouTube contents (added in my pull request) to come in the app.
Note also if you tried SkyTube Extra, it can use the YouTube official player for Android, which is proprietary and uses the YouTube app to play contents (hence maybe why everything is smoothly played on this app).
Google actively limits their server download speeds to slow external downloaders.
Version 0.23.0 made this issue a lot worse!
0.23 also made this much much worse for me vs 0.22.2. I reinstalled the old version to make sure I'm not imagining things. I can play 720p at 2.5x fine on the old version but on the new one, even 144p at 2.5x buffers all the time and is not very usable.
0.23 also made this much much worse for me vs 0.22.2. I reinstalled the old version to make sure I'm not imagining things. I can play 720p at 2.5x fine on the old version but on the new one, even 144p at 2.5x buffers all the time and is not very usable.
I also watch videos at high speed. The buffering happens 100% of the time, i.e. on all videos. This makes newpipe unusable to me. Currently I watch 5s of video, wait a 7s, watch another few second and wait again some seconds etc.
I'm on Samsung Galaxy devices with Android 12 and it seems to work fine. The only adjustment I had to make was lowering the playback load interval size to 16 KiB since I was using 360p on the phone. Who knows, but this might be a bug of not communicating or documenting what to do if experiencing buffer issues to the public.
I can confirm this, the latest release has solved the buffering issue for me on S22. Previously, x1.6 speed was unwatchable because of the constant buffering, there was more buffering than playback 😃 I always had to watch 720p to get rid of the buffering issue :( Now, high res videos with speedup are playing fine as they should. It's been a rough year of pain/buffering. Please don't break this!
For me this new version has totally fixed the problem. I tried several videos in 1080p60 with 1.5x speed, and there is no buffering anymore except the 3 seconds at the beginning (on LineageOS 17.1)
For me this new version has totally fixed the problem. I tried several videos in 1080p60 with 1.5x speed, and there is no buffering anymore except the 3 seconds at the beginning (on LineageOS 17.1)
I am also on lineageos 17, so that does not seem to be the problem. I do not have google play services installed.
Where do you set that option?
@Donkey-Doug found it: settings -> video and audio -> playback load interval size
I'm not sure if related, but I noticed that videos and audio load faster when downloading then watching.
If I try to download a 44min video, 720p, it will finish in a minute or two. But if I try to watch it, even after waiting a minute, it will stop to buffer many times during the video, because the buffering speed seems to be slow.
It happens more frequently at high speeds like 2x, with fast-forward during silence enabled.
Is it the same issue?
Possibly related: I downloaded a video or several and watched the download speed: there were periods of saturating the wireless connection and getting some 40MByte/s and every couple of seconds, there's massive throttling to less than 50KByte/s.
If it's not possible to fix the periodic throttling, can the allowed amount to buffer ahead of playback be increased instead? My connection can grab like half the video in a couple of seconds, as soon as the throttling is relaxed.
Also, as suggested, I messed with the playback interval size trying every value, restarting the app between, and it had no obvious effect. I think this lack of effect is in line with YouTube periodically throttling the heck out of the video load.
If it's not possible to fix the periodic throttling, can the allowed amount to buffer ahead of playback be increased instead? My connection can grab like half the video in a couple of seconds, as soon as the throttling is relaxed.
That would be a good solution for my case.
Constant buffering doesn't matter the resolution or the configuration. Only audio works more or less okey, but videos are unwatchable
I couldn't find this information but why doesn't NewPipe just use https://github.com/yt-dlp/yt-dlp instead of having their own https://github.com/TeamNewPipe/NewPipeExtractor implementation?
After testing old and new version I found out that buffering is present in new version if we increase speed there is more buffer and clearing cache also not work in new version
I have tried both version on Samsung one UI and they have the same problem.
This bug has opened long time back. Any recent updates?
It seems something is causing the app to either (just download at a slow speed) or (use only a single thread for download)
Does the app use multiple threads while watching? Or only downloading?
It's possible that it may be faster using HTTP/2 and maybe google is throttling HTTP/1 as well, but it might need reworking? And possibly websockets?
Yeah I also think same but why newpipe team is not taking the issue serious
Yeah I also think same but why newpipe team is not taking the issue serious
No, we are, everything is explained in this Reddit post: https://www.reddit.com/r/NewPipe/comments/u5wf7m/about_youtube_buffering_issues/
It's possible that it may be faster using HTTP/2 and maybe google is throttling HTTP/1 as well, but it might need reworking? And possibly websockets?
That's not possible, unfortunately, see the post.
For now just use apk in Checks tab of this PR https://github.com/TeamNewPipe/NewPipe/pull/8153 its debug apk so its little slow but there is no buffering. Using it since last few weeks.
The Firefox browser and UC browser have support to increase the cache size for faster viewing. NewPipe can refer to features and updates. https://www.reddit.com/r/firefox/comments/i9kmdo/comment/g1fp3vv/?utm_source=share&utm_medium=web2x&context=3 https://www.reddit.com/r/firefox/comments/ukh2tv/does_firefox_browser_support_speeding_up_like_uc/
Checklist
Steps to reproduce the bug
I use WebM, if that matters.
Actual behavior
Eventually, seemingly at random, a video will decide it wants to endlessly buffer on/off, making it unwatchable.
When this happens, I can see that download speed consistently stays at around 60 KB/s. Closing out of the video, clearing cached metadata, then returning to that same video makes it work as normal again, varying between 100 B/s to 1-2 MB/s as you would expect.
Expected behavior
For one, the app is supposed to buffer at least 25 seconds ahead before playback resumes, as per https://github.com/TeamNewPipe/NewPipe/issues/5516#issuecomment-901382592. Simply enforcing the 25 second minimum probably wouldn't fix the underlying issue, though.
Screenshots/Screen recordings
https://user-images.githubusercontent.com/43770697/130306929-8e92318c-5629-47ca-99ef-df0826f8ccae.mp4
Logs
Cleaned up to remove screen recorder spam, from the moment I enabled the recorder to the end of the recording. I hope that's enough?
Click to reveal
Device info