SkyTubeTeam / SkyTube

Copylefted libre / open source YouTube player for Android
GNU General Public License v3.0
2.36k stars 329 forks source link

Slow video stream performance #999

Open instylegithub opened 3 years ago

instylegithub commented 3 years ago

A few days ago I noticed that the stream downloads or video downloads are extremely slow.

I'm guessing YouTube changed something with their api back end. It almost feels like I'm being throttled, but I can't see any evidence on the YouTube side (and I tried various isps and vpns)

Skytube is basically unusable now, so thought I'd open a ticket in case it's still being developed.

drogga commented 3 years ago

It seems like any app I have that uses included YouTube API Keys is rate limited now, for me SkyTube, NewPipe-legacy v.0.20.8 and a old ver. of YMusic (VLC too, at least on Android) are all basically useless now, because there's simply not enough network speed to play anything, especially in HD, being even only 720p, the net speed is under 128 KB/s now, there is no issue with the Official YouTube app (or Vanced) and when playing from a browser, tho I'm forced to use super outdated browser, so I can't adjust (increase\bump) the playback speed when using an invidious instance (playing at x1.0 speed is pain for me and I prefer to not watch anything at all, except playing music) and that's my only option for now, until it isn't, then IDK what will I do...

instylegithub commented 3 years ago

Crazy, I switched to newpipe, and it seems to be working OK. Too bad YouTube started to throttle their api. :(

gzsombor commented 3 years ago

Skytube doesn't use the official API to get the video streams - I'm not sure, if there is an API for that - but the NewPipeExtractor library. The same library what NewPipe is using. Of course, as the latest release is a 'bit' old, it is possible, that it can't find some streams. If you can test a snapshot build, which contains a more recent NewPipeExtractor, maybe your issue disappears.

drogga commented 3 years ago

The debug / snapshot builds now work, at least on a test A.8.0 Oreo device, I haven't tested it on Android 4.x where I actually need it, but there are some changes after 2.977 that I don't like, so is it possible to rebuild that with the latest NewPipeExtractor ?

Actions artifacts were always called "SkyTube-Extra.apk" & "SkyTube-Oss.apk", but that's not correct, since I don't see a way downloading those in .apk directly, they instead are packed in .zip archives (each separately) with the actual .apk inside, that also includes the version in the file name, but doesn't mention the actual one - "Snapshot" or "Debug", also when installing and in the app drawer & manager/info (everywhere) they both are called the same - "SkyTube Snapshot", which is confusing as there's no "Extra" in the extra one's name or "Oss" in the oss one's app_name in the resources (probably to save space) and the icons are the same, so you can't tell which is which / differentiate the 2, other than by checking the Package Names or launching and checking in the "About", under "Version", so the artifact's ".apk" file extension can probably be removed or replaced and the "Snapshot" with versionName & versionCode (build) be added.

There are other differences in the UI and functionality between Oss and Extra, besides/other than the "Official YouTube player support" & "Chromecast Support", as the src is a mess, "extra" has AndroidManifest.xml 13 months old, "main" 6, and they are more different than they should be, actually the Oss build is the better one, I can edit the search input in it, while in Extra, I can only perform a new search.

Preferences > Others > "NewPipe back-end" < this doesn't seem to make any difference or to have any effect, also in the description of the option, there are "..." after "YouTube", IDK why, since that's the whole text, there's nothing to be cut in short, so why the 3 dots ?, one is enough.

"Sort Channels A - Z" > this is wrongly named, including its description under, since if not enabled, the channels in the side panel will be custom sorted - in the order of which you subscribed to a channel, before it was called "Sort Channels Alphabetically", which was correct.

Also, why there's no longer a tablet UI for the settings / preferences ?, it was much better and convenient in the old versions, plus there were line separators / dividers...

The pull down to refresh animated icon not only seems endless, but performing/triggering the refresh action doesn't seems to work or do anything at all when in Search results, Channel or Feed ! (...maybe in other places too...)

The auto-refresh (fetch/update) of the Feed (Subscriptions) on startup is annoying (along with the Extra's dialog, which can be hidden by taping outside of it), it also tries to do it when there are no subscriptions at all, which makes it to only show a "No new videos." toast message, especially when I'm not even on the "Feed" tab, as my default tab on startup/launch is set by choice to "Bookmarks", but this seems to be the only way to update them currently.

IDK why it has to color the status bar, but that seems to cause some other layout/UI issues when showing/hiding the video player elements in fullscreen, or I might be wrong and both might not be related at all, this happens on 4.4/5.0+, it's also annoying having to tap twice to show the controls on 4.3 JB, because on the first tap only the status bar shows up, I understand if this was on purpose in order to have left-right side 5 sec. skip (double-tap to seek) gestures, but this isn't the case.

Invidious instances need updating - again.

Also, can at least the channel images/avatars be made higher rez. ?, the quality is too bad when searching MKBD for example, it's the same when in channel, the avatar is smaller, but the same bad quality, probably because it's the exact same image fit in smaller space, that in the search results. In the subscriptions list the thumbnails are often cut-off a bit, videos show with greater upload time than it actually is, like the upload will be from before 3 h., but only in the feed it will show 4 hours, I also have to refresh twice, switching between tabs before they are sorted/aligned correctly by the time of upload or when they are publicly visible on the uploader's channel.

Rotating Portrait<>Landscape does a refresh, but it shouldn't.

From the Feed of videos, under/below the thumbnail and above the views count, when I click on the channel name to go to the channel and then go back to the Feed, the list scroll position is lost and reset back to the top.

Video player > 3 dots context menu > "Continuous repetition" should be called "Loop", it's self explanatory, no need to make the dialog that wide with this description.

Sometimes the video title is with too big font size than it normally / usually is and don't fit in landscape / fullscreen.

I also noticed that when I bookmark a video from another app (say browser) by the Share With/Open With dialog, a message with the app name shows in the center/middle of the screen that doesn't go away by itself, along with a "Bookmarked" toast and nothing can be pressed or anything (blocked touch), until I hit the back button (hardware one in my case, others with software NavBar might not be able to even do that), then it disappears and everything is touchable again. This text message seems to be wrapped around/inside of a fullscreen invisible overlay and is using a new activity/process for some reason, which seems to be the reason of the problem.

Live streams still aren't playing on old devices / OS versions where the "Try new Video formats" is disabled and the problem isn't that there're no available and suitable streams, since other apps do play them on the same device(s), on newer with the option enabled they play for 2 seconds and stop, that's it.

The "Back up Database" (settings, subscriptions & bookmarks) should backup only those and not every video title, description or thumbnail, making the .skytube file MBs in size.

kvoit commented 2 years ago

I can also confirm this. Old and newly generated keys. Together with #978, this seems to render the app unusable, as far as I can see as a potential new user. The New pipe backend does not seem to make a difference. [extra version + f-droid]

drogga commented 2 years ago

I'm getting a lot of these toast messages...:

"Server error:The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>., reason: quotaExceeded"

" Server error:Requests from this Android client application free.rm.skytube.oss are blocked., reason: forbidden "

" Server error:API key expired. Please renew the API key., reason: badRequest "

Also on S20 FE with A11 and Dark Mode enabled, for some reason the context (3-dots) menu is in white with white text color, making it unreadable.

drogga commented 11 months ago

Attempt to invoke virtual method 'void org.schabi.newpipe.extractor.Extractor.fetchPage()' on a null object reference