yt-dlp: [Youtube] Did not get any data blocks for format 22
Checklist
- I’m reporting a broken site
- I’ve verified that I’m running yt-dlp version 2022.04.08 (update instructions) or later (specify commit)
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
United States
Description
Hello, I’m attempting to download this video, but every time I try, I get “ERROR: Did not get any data blocks”.
This is the video URL: https://www.youtube.com/watch?v=Crt__iGLuoc
Verbose log
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=Crt__iGLuo
c']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8 (No ANSI), err utf-8 (No A
NSI), pref cp1252
[debug] yt-dlp version 2022.04.08 [7884ade] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-7-6.1.7601-SP1
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: avconv -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] Checking exe version: avprobe -bsfs
[debug] exe versions: none
[debug] Optional libraries: brotli, certifi, Cryptodome, mutagen, sqlite, websoc
kets
[debug] Proxy map: {}
Latest version: 2022.04.08, Current version: 2022.04.08
yt-dlp is up to date (2022.04.08)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=Crt__iGLuoc
[youtube] Crt__iGLuoc: Downloading webpage
[youtube] Crt__iGLuoc: Downloading android player API JSON
[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
[debug] Default format spec: best/bestvideo+bestaudio
[info] Crt__iGLuoc: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://rr3---sn-nx5s7n76.googlevideo.com/videop
layback?expire=1649559160&ei=GPJRYoO_BYKSsfIPjcmymAM&ip=2601%3A602%3A8a80%3A6a80
%3Ab8fb%3A5a05%3A8046%3A13d1&id=o-AOjk_BNMvIoqJKbwt-bJl12F5R4tNk6pklRKncW83062&i
tag=22&source=youtube&requiressl=yes&mh=V-&mm=31%2C29&mn=sn-nx5s7n76%2Csn-nx57yn
ld&ms=au%2Crdu&mv=m&mvi=3&pl=36&initcwndbps=2032500&vprv=1&mime=video%2Fmp4&cnr=
14&ratebypass=yes&dur=854.819&lmt=1649515077461736&mt=1649537103&fvip=6&fexp=240
01373%2C24007246&c=ANDROID&rbqsm=fa&txp=4432434&sparams=expire%2Cei%2Cip%2Cid%2C
itag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0
QJ8wRAIgf1T5hQxYvQ6ahKlDtcrh-5hEjqp4i2pB7WjZ_HOgCOkCIBtSXTi50m6Z4YZcKfibhWAFrjCu
u_39F-7a96mttRaQ&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=A
G3C_xAwRQIgVoH7K2ESLMWHtHtFiNcG3TIKYxsDb48Gcjx2YsupAD0CIQCZafBSCdy4hOFJdXVlCqPSc
5e0nT2ib25ON40MMuuJGw%3D%3D"
[download] Resuming download at byte 395115
ERROR: Did not get any data blocks
File "yt_dlp\__main__.py", line 19, in <module>
File "yt_dlp\__init__.py", line 869, in main
File "yt_dlp\__init__.py", line 859, in _real_main
File "yt_dlp\YoutubeDL.py", line 3264, in download
File "yt_dlp\YoutubeDL.py", line 3237, in wrapper
File "yt_dlp\YoutubeDL.py", line 1399, in extract_info
File "yt_dlp\YoutubeDL.py", line 1408, in wrapper
File "yt_dlp\YoutubeDL.py", line 1492, in __extract_info
File "yt_dlp\YoutubeDL.py", line 1548, in process_ie_result
File "yt_dlp\YoutubeDL.py", line 2648, in process_video_result
File "yt_dlp\YoutubeDL.py", line 3138, in process_info
File "yt_dlp\YoutubeDL.py", line 2846, in dl
File "yt_dlp\downloader\common.py", line 457, in download
File "yt_dlp\downloader\http.py", line 370, in real_download
File "yt_dlp\downloader\http.py", line 339, in download
File "yt_dlp\downloader\common.py", line 178, in report_error
File "yt_dlp\YoutubeDL.py", line 950, in report_error
File "yt_dlp\YoutubeDL.py", line 884, in trouble
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 78 (27 by maintainers)
Commits related to this issue
- [youtube] Deprioritize format 22 Reduces chance of encountering #3372 — committed to yt-dlp/yt-dlp by pukkandan 2 years ago
…and solved.
Got a hint from this that the issue was downloading mp4 in some cases, so I listed the formats and chose a webm stream instead. Then it worked.
Facing same problem with broken 22 in my own script I resorted to this kludge:
tldr: start by trying to download 100 bytes from last 100KB of file. YT broken 22 files usually break either at the start or middle, I dont remember ever experiencing one that would refuse to play last couple seconds.
IMO its the combination of those three: 1 composite formats got deprioritized once they had dynamic switching in the player. No one ever looks if if infra is working anymore 2 In theory only old legacy outdated unpatched clients use 22, breaking it randomly will nudge those people to upgrade. 3 https://www.zdnet.com/article/former-mozilla-exec-google-has-sabotaged-firefox-for-years/
Formats 17, 18 and 22 are legacy formats. Your web browser is never gonna play these. They are not a priority for Youtube to fix. Format 17 was completely removed a few weeks ago, even
It certainly is one in regard to biting me away from here. Noted.
Interesting 🤔
It would be nice if there was a way to filter out 17, 18, and 22. I couldn’t see in the documentation a way to skip or sort specific format numbers
If you start getting zero-byte segments then drop the existing format as invalid, then go back and restart the process from a different format.
Closing since
the issue seems to have fixed itself. Even if not,we have had no reason to believe there is a way to work around the issueOpen a new issue with all relevant details including verbose log
Format 22 is identical to 136+140, and it is not even served in the browser anymore by youtube. Besides, the point here is that the format is broken from YouTube’s side. There is nothing that can be done about it
@YellowSM
mp4[height<=720]
meansbest[ext=mp4][height<=720]
, which is why it selects22
. What you want is-S res:720,ext
I’m stating the obvious here, but I still want to throw this in. Format 22 in likely the most popular. It provides the best balance between quality and size.
@someziggyman From my observation it seems recently uploaded videos take some time to get format 22 downloadable.