iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.08k stars 1.78k forks source link

Downloads are slow and unrelyable #562

Closed elypter closed 5 years ago

elypter commented 5 years ago

Quite some time ago as far as i remember downloads were quite fast and without problems. Now it feels like it is a lot slower. It seems that they are proxied through invidio.us. however i do not have the proxy setting enabled and umatrix shows the googlevidio sources. is it a bug that the downloads run over the proxy all the time or did something change with how youtube provides the video which makes it impossible to download directly? i am downloading 720p

omarroth commented 5 years ago

Downloads are proxied to provide correct title= and for when playback is restricted in the user's region. Likely the issue is high load, see #532.

elypter commented 5 years ago

could you add an alternative direct download button? the occasional slow speed isn't that bad but i don't want to waste your bandwidth and slow down other users if i don't feel the need for it. maybe the renaming could be done by a userscript or an extension.

omarroth commented 5 years ago

Looks like I didn't mention this above, but proxying is also used to trigger downloads. Otherwise they appear as a media element, similar to &raw=1&local=true.

I don't think a direct download button would have much utility since it would be functionally identical to Right-click -> Save as....

omarroth commented 5 years ago

I've pushed out e5fa5df7be38d60ce9e4835bae170d805482afc0 which should improve download speed significantly. From some brief testing most files download about 10x faster (limited by local network), although I would appreciate other reports.

In short, YouTube will throttle downloads when requesting segments >10MB (see Rudloff/alltube#217, or ytdl-org/youtube-dl@e4a60912b8345536387ae14d0d0611eb0b82c23a). For downloads this commonly results in throttling down to ~300Kb or lower.

elypter commented 5 years ago

maybe add video download helper to the addon list. it downloads directly and provides a proper filename.

omarroth commented 5 years ago

Closed in favor of #616.