Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PoomSmart/YTUHD
Unlock 1440p and 2160p resolutions in iOS YouTube app.
https://github.com/PoomSmart/YTUHD
4k ios unlock youtube
Last synced: 18 days ago
JSON representation
Unlock 1440p and 2160p resolutions in iOS YouTube app.
- Host: GitHub
- URL: https://github.com/PoomSmart/YTUHD
- Owner: PoomSmart
- License: mit
- Created: 2020-08-09T12:03:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-26T08:15:27.000Z (25 days ago)
- Last Synced: 2024-10-29T20:07:23.340Z (22 days ago)
- Topics: 4k, ios, unlock, youtube
- Language: Logos
- Homepage:
- Size: 254 KB
- Stars: 37
- Watchers: 4
- Forks: 25
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YTUHD
Unlock 1440p (2K) and 2160p (4K) resolutions in iOS YouTube app.
## Backstory
For a few years, YouTube had been testing 2K/4K resolutions on iOS as A/B (Alpha/Beta testing). The first group of users will see 2K/4K options while the others won't.
There are certain prerequisites for those options to show:1. Whether the iOS device support VP9 video decoding, which implies on Apple's end to be at least on iOS 14, and later YouTube says iOS 15 is the minimum requirement.
2. Whether YouTube decides on their end to include those options for that particular iOS device. The obviously slow devices are excluded.YTUHD attempts to bypass those restrictions for all 64-bit devices running iOS 11 or higher.
## VP9
Hardware accelerated VP9 decoder is technically added as of iOS 14 and YouTube has been utilizing it through a private entitlement `com.apple.coremedia.allow-alternate-video-decoder-selection` (All apps are equal is a lie).
This decoder handles up to 4K, although not all devices that can run iOS 14 get this decoder. The old iPhone SE (1st gen) is one example that hardware VP9 decoder is entirely absent from the firmware file.Those old devices don't get `AppleAVD` driver which is essential for VP9 decoding to work. Such attempt to load VP9 decoder (inside `AppleAVD` driver) from `/System/Library/VideoDecoders/AVD.videodecoder` (provided that you can extract that from dyld_shared_cache of a new device) will result in `AVDRegister - AppleAVDCheckPlatform() returned FALSE`. There is also no reliable way to extract this decoder so that it can be successfully loaded on a device as if the binary is standalone and not embedded inside a shared cache.
## Server ABR
If you look at the source code, there is an enforcement to not use server ABR. The author has yet to figure out what ABR stands for but its purpose is to fetch the available formats (resolutions) of a video.
When the flag is set to true, it's entirely up to YouTube server to respond to YouTube app of the video formats the user can be served.
YTUHD has no control over that and has to disable it and relies on the client code that allows for 2K/4K formats.## iOS version
The history has shaped YTUHD to spoof the device as iOS 15 (or higher) for those running lower. The user agent gets changed from spoofing for YouTube server to respond with VP9 formats and all the goodies.
## Sideloading
It's been reported that the sideloaded version of YouTube will not get 2K/4K even with YTUHD included. This is because of a big reason: VP9.
Normally when an app is sideloaded, the private entitlements get removed (including `com.apple.coremedia.allow-alternate-video-decoder-selection`) and the app won't be allowed to access the hardware VP9 decoder. There is no known solution to bypass this, unless you use [TrollStore](https://github.com/opa334/TrollStore) which allows for practically any entitlements, including the aforementioned, to be in your sideloaded app.