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

[Youtube] Very slow download #30715

Closed
1vanK opened this issue Mar 5, 2022 · 12 comments · Fixed by #30582
Closed

[Youtube] Very slow download #30715

1vanK opened this issue Mar 5, 2022 · 12 comments · Fixed by #30582

Comments

@1vanK
Copy link

1vanK commented Mar 5, 2022

youtube-dl.exe -v -f bestvideo+bestaudio https://www.youtube.com/watch?v=qqiC88f9ogU
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', 'bestvideo+bestaudio', 'https://www.youtube.com/watch?v=qqiC88f9ogU']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2020-09-27-git-a3a6b56200-full_build-www.gyan.dev, ffprobe 2020-09-27-git-a3a6b56200-full_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] qqiC88f9ogU: Downloading webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://rr2---sn-hxb54vo-hjml.googlevideo.com/videoplayback?expire=1646520062&ei=npIjYr2UFdHF7gTT4aPICw&ip=91.243.105.114&id=o-AEKgOJ1j2-kHJxPl0mOTR5hCFCGDZEb1_TjJRNWZcmmX&itag=315&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308%2C315%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&mh=xo&mm=31%2C29&mn=sn-hxb54vo-hjml%2Csn-n8v7snl7&ms=au%2Crdu&mv=m&mvi=2&pl=26&initcwndbps=678750&vprv=1&mime=video%2Fwebm&ns=ucG1TUcEhpeSw4ohdO1IsnAG&gir=yes&clen=387657800&dur=155.000&lmt=1646433355474676&mt=1646498229&fvip=15&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=4532434&n=-EhRi--_cKRtbWqKI&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgeyaayGRP2FBHrMf5O1E3P-c-kvT0r6hqZ_ycnY7C_esCIQCcD-rRbIrLofUy3_Gnn1MKvzlQsxObD_CD6_ZvUs_EwA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAK8Z0A9-t_YjWo-NpSzCEZuPFQ_wz2Jdm4kW7cpJBy9JAiA3ym1vnq9loK7J_SSmiYyqSlhQIH-tit7UnvVVEWZ1Lw%3D%3D'
[download] Destination: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f315.webm
[download]   0.1% of 369.70MiB at 56.25KiB/s ETA 01:52:02

But yt-dlp.exe downloaded with fullspeed:

yt-dlp.exe -v -f bestvideo+bestaudio https://www.youtube.com/watch?v=qqiC88f9ogU
[debug] Command-line config: ['-v', '-f', 'bestvideo+bestaudio', 'https://www.youtube.com/watch?v=qqiC88f9ogU']
[debug] Encodings: locale cp1251, fs utf-8, out utf-8, err utf-8, pref cp1251
[debug] yt-dlp version 2022.02.04 [c1653e9] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] exe versions: ffmpeg 2020-09-27-git-a3a6b56200-full_build-www.gyan.dev, ffprobe 2020-09-27-git-a3a6b56200-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=qqiC88f9ogU
[youtube] qqiC88f9ogU: Downloading webpage
[youtube] qqiC88f9ogU: Downloading android player API JSON
[debug] Loading youtube-nsig.0abde7de from cache
[debug] [youtube] Decrypted nsig GfxHZ9VHdfK5TRdvu => Qv-J_e1zfBsFlA
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] qqiC88f9ogU: Downloading 1 format(s): 315+251
[debug] Invoking downloader on "https://rr2---sn-hxb54vo-hjml.googlevideo.com/videoplayback?expire=1646520177&ei=EZMjYpOcHd6Fv_IP8cKlsAg&ip=91.243.105.114&id=o-ANXw3IK3uAiNtn5IOOVJ3yXwkqHGrY7oSEy2-9kcJ4Pq&itag=315&source=youtube&requiressl=yes&mh=xo&mm=31%2C29&mn=sn-hxb54vo-hjml%2Csn-n8v7znsk&ms=au%2Crdu&mv=m&mvi=2&pl=26&initcwndbps=678750&vprv=1&mime=video%2Fwebm&gir=yes&clen=387657800&dur=155.000&lmt=1646433355474676&mt=1646498229&fvip=15&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgPX4wkCi6wiMHLEt3ipBCmlJoNcsPvsF0zDz2QAWroo0CIGrB9fg8ovNSWcX_2lyBtVkIoKegBd_jCQOD-DaBuDra&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhANUUrZNMLyARdYHIbZugmrvzChSQEy6M6gfeup2Q5aGmAiB91-0iRwsRrv4Kha1YQBK5ECJYYtEjba88n2quVv1CqA%3D%3D"
[download] Destination: ELDEN RING – Rise, Tarnished _ Official Launch Trailer [qqiC88f9ogU].f315.webm
[download]  15.4% of 369.70MiB at  9.42MiB/s ETA 00:33
@1vanK
Copy link
Author

1vanK commented Mar 5, 2022

Maybe Google detects the program in some way and limits the speed.

@garoto
Copy link

garoto commented Mar 5, 2022

Known issue. A fix was already commited but not made into a release yet.

@dirkf dirkf changed the title Very slow download [Youtube] Very slow download Mar 5, 2022
@pmelikov
Copy link

pmelikov commented Mar 9, 2022

Известная проблема. Исправление уже было зафиксировано, но еще не выпущено.

So you can use actual version (if you don't want to wait for the new release):
(I think you are in C:\Users\pavel\Downloads)

git clone https://github.com/ytdl-org/youtube-dl.git
python youtube-dl\youtube_dl\__main__.py https://youtube.com/xxxxxx

I tested, for 99% of videos speed is normal, but for video with access by link, the speed is about 80 kbps.
But its better then stable release code, because release have up to 70 kbps for all videos.

Here's how it works for your video:

(base) C:\Users\pavel\Downloads>python youtube-dl\youtube_dl\__main__.py -f bestvideo+bestaudio https://www.youtube.com/watch?v=qqiC88f9ogU
[youtube] qqiC88f9ogU: Downloading webpage
WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f315.webm
[download] 100% of 369.70MiB in 00:09
[download] Destination: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f140.m4a
[download] 100% of 2.39MiB in 00:00

41mbit/s with 330mbit/s internet

If you need use ffmpeg just place ffmpeg.exe in Downloads folder and it will work:

(base) C:\Users\pavel\Downloads>python youtube-dl\youtube_dl\__main__.py -f bestvideo+bestaudio https://www.youtube.com/watch?v=qqiC88f9ogU --merge-output-format mp4 --write-description --write-thumbnail
[youtube] qqiC88f9ogU: Downloading webpage
[info] Writing video description to: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.description
[youtube] qqiC88f9ogU: Downloading thumbnail ...
[youtube] qqiC88f9ogU: Writing thumbnail to: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.webp
[download] Destination: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f315.webm
[download] 100% of 369.70MiB in 00:09
[download] Destination: ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f140.m4a
[download] 100% of 2.39MiB in 00:00
[ffmpeg] Merging formats into "ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.mp4"
Deleting original file ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f315.webm (pass -k to keep)
Deleting original file ELDEN RING – Rise, Tarnished _ Official Launch Trailer-qqiC88f9ogU.f140.m4a (pass -k to keep)

Using ffmpeg you can get best video and audio quality in single mp4 file (or another format). Get ffmpeg
you can here: https://github.com/BtbN/FFmpeg-Builds/releases. Download ffmpeg-n5.0-latest-win64-lgpl-shared-5.0 and copy all files from bin folder to Downloads. If you was git cloned repo youtube-dl to Downloads and using my commands.

@csimpi
Copy link

csimpi commented Mar 19, 2022

@pmelikov Thank you so much, this should be mentioned in the main readme

@RozvM
Copy link

RozvM commented Mar 20, 2022

For basic Windows users like me, my friend compiled a fresh .exe out of the repo 2 days ago:
youtube-dl_unofficial compile.zip

Also you can use yt-dlp as an alternative.

@Apromixately
Copy link

Any reason why this has not been released yet?

@dirkf dirkf linked a pull request Mar 25, 2022 that will close this issue
11 tasks
@optionsx
Copy link

ytdl-core downloads it at max speed, take a peak at their code.

@SeanRamey
Copy link

SeanRamey commented Mar 31, 2022

To make it clear for anybody with this issue, this is what you need to do until a new release is made with the patch:
git clone https://github.com/ytdl-org/youtube-dl.git
python youtube-dl\youtube_dl\__main__.py https://youtube.com/xxxxxx

@dirkf dirkf closed this as completed Apr 11, 2022
@g-berthiaume
Copy link

@SeanRamey is rigth. It's 10x faster on my machine.
Thanks to the youtube-dl team.

@basisbit
Copy link

basisbit commented Aug 3, 2022

Can this be reopened? There still is no new release, so this is still not "resolved" for majority of people...

@THGhost
Copy link

THGhost commented Feb 7, 2023

Still not resolved in 2023 🐌

@basisbit
Copy link

basisbit commented Feb 7, 2023

@THGhost This here project has not done a release since end of 2021. I'd consider it dead. However, there exist plenty of forks of it which are active and have current releases. For example take a look at https://github.com/yt-dlp/yt-dlp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.