-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[fd/sabr] Add YouTube SABR protocol downloader #13515
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
base: master
Are you sure you want to change the base?
Conversation
How will the SSAP ads be? |
My current main gripe is that yt-dlp with SABR doesn't print the name of the video it is downloading until after download is complete. |
It will if you download the thumbnail. Anyway, I am testing it right now on some DRM+SABR experiment burner account (no premium), with BgUtils POT provider plugin (also got some random DRM+SABR experiment without cookies). Seems like it works perfectly fine. Best formats (checked against "stats for nerds" in normal browser) are downloaded. Thanks a lot. |
we don't have full technical details nor able to reproduce them, so can't say at this time. hoping the guards we have will cause the downloader to fail if the server tries to do anything funny with ad insertion for videos. similarly, SSDAI and SSLIFA ads for livestreams (which I have been able to reproduce) do not impact the downloader at this stage as the client has to ask the server to stitch them (lol). |
fixed, thanks (I presume you are referring to the destination filename message) |
# Conflicts: # yt_dlp/extractor/youtube/_video.py
# Conflicts: # yt_dlp/extractor/youtube/_video.py
# Conflicts: # .github/workflows/build.yml
Tip
How to test
Install
Latest build: https://github.com/coletdjnz/yt-dlp-dev/releases/tag/2025.07.12.000932
Using pip:
pip install --force-reinstall "yt-dlp[default] @ git+https://github.com/coletdjnz/yt-dlp-dev@feat/youtube/sabr"
Example usage:
Default clients: To force SABR formats, use
--extractor-args "youtube:formats=duplicate" -f "ba[protocol=sabr]+bv[protocol=sabr]"
With
web
client:--extractor-args "youtube:formats=duplicate;player-client=web" -f "ba[protocol=sabr]+bv[protocol=sabr]"
Debug/trace logging with
web
client:--extractor-args "youtube:formats=duplicate;player-client=web;sabr_log_level=debug" -f "ba[protocol=sabr]+bv[protocol=sabr]"
Note for web: you will need to provide a PO Token
If encountering reproducible issues, please run with debug (or trace) logging and provide the output as this contains key information to help with debugging.
Adds support for YouTube's Server Adaptive Bit Rate (SABR) streaming protocol.
SABR formats are available for all clients that provide a SABR URL in the player response.
By default, yt-dlp will prioritize
https
formats oversabr
formats. SABR formats can always be included withformats=duplicate
extractor arg.Closes #12482
Requires the protobug library to handle protobuf data (thanks @Grub4K for developing it). This is included in all builds by default.
Features:
--live-from-start
and post-live--retry-sleep
--audio-multistreams
/--video-multistreams
supportNot supported but may be considered in the future:
--download-sections
--rate-limit
-N
/ concurrency supportOther notes:
Useful resources:
Template
Before submitting a pull request make sure you have:
In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check those that apply and remove the others:
What is the purpose of your pull request? Check those that apply and remove the others: