-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
fix(YouTube - Spoof video streams): Update Force AVC
client data
#4064
fix(YouTube - Spoof video streams): Update Force AVC
client data
#4064
Conversation
68bd945
to
fe6709c
Compare
Can the unspoofed app play AVC? |
I don't know. I don't have any devices old enough to try. I'll try a really old Android emulator and see. |
With Android emulator, Pixel 3, Android 8.0, it uses AVC for both iOS and Android VR spoofing. Maybe it's still possible to force AVC, but all the spoof device values I tried no longer work. |
There may be a flag in the body that controls if AVC has to be used |
Success. AVC can be forced with an extremely old version of YouTube (tried |
This could cause other issues. For example some qualities that were introduced in later versions may not work, or other side effects due to using an old version of the app. v17 is also going to be shut down soon as YouTube always keeps 2 major versions up to date each year. AVC also works on the latest version which means some other field in the request is responsible to return AVC streams. |
Some 18.x targets also work. it may also be because the iOS version makes no sense. It was spoofing an youtube version that requires at least iOS 15 and the spoofed iOS version was 13. Edit: iOS 13 must be spoofed, and iOS 14 always uses AV1 or VP9. The last version of YouTube for iOS 13 is v17.40.5, and it seems to work without any difference in video features except it's always AVC. |
Force AVC
client data
For now this can be fixed by using a client version and iOS version that makes sense. It's possible the client is receiving multiple video streams with different codecs and it always favors using VP9 and AV1. If that's true then when spoofing to iOS 13 and an old app version the client only receives AVC so it has no choice. |
If the client is changed to an old version, OPUS streams wouldn't work, for example. So some side effects can occur |
Weird, force AVC is working for me. (iOS client is |
Spoofing to any client above 17.40.5 with iOS 13 is an impossible situation since 17.40.5 is the last version with iOS 13 support. iOS 14 added VP9 hardware acceleration and for me if spoofed it always uses VP9 or AV1. I think why the existing force AVC works for some but not for others is a glitch in how the backend is picking what streams to use, possibly because of hard coded logic that assumes the client and os is a valid combination. Lack of Opus codec can be added to the user dialog disclaimer. If iOS13/17.40.5 stops working then something else can be figured out. |
fe6709c
to
19229f6
Compare
19229f6
to
916982a
Compare
I tried fixing the client info to A device only has AVC support -> This codec choosing logic was added back in the Spoof client era, so we may have missed that it is not needed in Spoof video streams. Also, with this method, Opus will be used as the audio codec even if the device only supports AVC. |
Yes I'm seeing the same behavior. |
|
3bc3560
to
6ebe267
Compare
6ebe267
to
021c4ed
Compare
hmm... Is But I don't have a device that have a "problematic" VP9 HW decoder, so I can not say for sure... |
Force AVC still works for devices with hardware AV1 or VP9. I know some older devices struggle with VP9/AV1 and can overheat or drain the battery quickly. I assume Apple waited so long to add VP9/AV1 because of the increased battery usage. |
extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/spoof/ClientType.java
Outdated
Show resolved
Hide resolved
bf8262f
to
01aa0b9
Compare
…ce_avc # Conflicts: # extensions/shared/library/src/main/java/app/revanced/extension/shared/spoof/ClientType.java # extensions/shared/library/src/main/java/app/revanced/extension/shared/spoof/DeviceHardwareSupport.java
01aa0b9
to
05642ba
Compare
How about removing the condition of the Force AVC preference? Before this PR, the behavior on VP9 unsupported devices was the exact same as enabling the force AVC setting. (Spoofing to iOS 13) Currently the best codec for the device is automatically selected, but possibly that may no longer work. My thought of settings descriptions: Just a suggestion. |
Yeah it's possible that in the future VP9 might be forced onto devices that don't have hardware support, like recently when AV1 was forced onto everyone for a few months. I'll change the force preference to work with any device. |
extensions/shared/library/src/main/java/app/revanced/extension/shared/spoof/ClientType.java
Outdated
Show resolved
Hide resolved
2180492
to
3f4d514
Compare
# [5.3.0-dev.3](v5.3.0-dev.2...v5.3.0-dev.3) (2024-12-09) ### Bug Fixes * **YouTube - Spoof video streams:** Update `Force AVC` client data ([#4064](#4064)) ([7d537dd](7d537dd))
# [5.3.0](v5.2.3...v5.3.0) (2024-12-09) ### Bug Fixes * **Change package name:** Prevent applying the patch to known incompatible apps ([#3943](#3943)) ([44936e7](44936e7)) * **Reddit:** Fix patches by using correct extension class ([70bdc68](70bdc68)) * **Sync for Reddit:** Fix patches by using correct extension name ([030093e](030093e)) * **Twitter:** Merge correct extension by depending on correct extension patch ([8281cf6](8281cf6)) * **YouTube - Spoof video streams:** Add missing preferred language preference to the settings ([630633c](630633c)) * **YouTube - Spoof video streams:** Enable opus codec by updating iOS client version ([#4063](#4063)) ([0af156f](0af156f)) * **YouTube - Spoof video streams:** Update `Force AVC` client data ([#4064](#4064)) ([7d537dd](7d537dd)) * **YouTube Music - Permanent shuffle:** Remove obsolete and non functional patch ([#4073](#4073)) ([fbc6ab6](fbc6ab6)) ### Features * **Nyx:** Remove broken `Unlock pro` patch ([1fe8b16](1fe8b16)) * **YouTube - Spoof video streams:** Allow picking a default audio language track ([#4050](#4050)) ([ede666b](ede666b)) * **YouTube Music:** Add `Spoof video streams` patch to fix playback ([#4065](#4065)) ([cf3116a](cf3116a)) * **YouTube:** Add `Open videos fullscreen` patch ([#4069](#4069)) ([296d63b](296d63b))
# [5.0.0](v4.16.0...v5.0.0) (2024-12-11) ### Bug Fixes * Add missing dependency to patch ([97f5240](97f5240)) * **Change package name:** Prevent applying the patch to known incompatible apps ([ReVanced#3943](https://github.com/Chr0matic1/revanced-patches/issues/3943)) ([44936e7](44936e7)) * **My Expenses - Unlock pro:** Constrain compatible version to working version ([ReVanced#3974](https://github.com/Chr0matic1/revanced-patches/issues/3974)) ([ba3bf69](ba3bf69)) * **MyFitnessPal - Hide ads:** Constrain patch to last working version ([ReVanced#3847](https://github.com/Chr0matic1/revanced-patches/issues/3847)) ([f9fa526](f9fa526)) * **Reddit:** Fix patches by using correct extension class ([70bdc68](70bdc68)) * **Sync for Reddit - Fix /s/ links:** Fix patch by using correct fingerprints ([a0ad07e](a0ad07e)) * **Sync for Reddit - Spoof client:** Fix patch by using correct fingerprints ([5776de3](5776de3)) * **Sync for Reddit:** Fix patches by using correct extension name ([030093e](030093e)) * **Sync:** Fix patches by not throwing unnecessarily ([2ee1316](2ee1316)) * **Tiktok - Settings:** Fix the patch by depending on the correct settings patch ([0c75929](0c75929)) * **Twitch:** Resolve setting menu crashes ([ReVanced#4025](https://github.com/Chr0matic1/revanced-patches/issues/4025)) ([62df596](62df596)) * **Twitter - Change link sharing domain:** Support latest app version ([ReVanced#3786](https://github.com/Chr0matic1/revanced-patches/issues/3786)) ([b54592c](b54592c)) * **Twitter - Unlock downloads:** Make it work with latest versions ([ReVanced#3782](https://github.com/Chr0matic1/revanced-patches/issues/3782)) ([5189122](5189122)) * **Twitter:** Fix patches by depending on patch that merges required extension ([c330e9d](c330e9d)) * **Twitter:** Fix patches by matching fingerprint using correct class ([6ae0d12](6ae0d12)) * **Twitter:** Merge correct extension by depending on correct extension patch ([8281cf6](8281cf6)) * **YouTube - Change header:** Apply header changes to A/B layout ([ReVanced#3907](https://github.com/Chr0matic1/revanced-patches/issues/3907)) ([6ccf114](6ccf114)) * **YouTube - Copy video URL:** Support A/B player layout ([0f42574](0f42574)) * **YouTube - Custom branding:** Change icon correctly on 19.34+ ([ReVanced#3866](https://github.com/Chr0matic1/revanced-patches/issues/3866)) ([2e47903](2e47903)) * **YouTube - GmsCore support:** Add more replacements ([4d39770](4d39770)) * **YouTube - GmsCore support:** Remove unclear patch changes ([021d858](021d858)) * **YouTube - Hide ads:** Hide new types of ads ([454281a](454281a)) * **YouTube - Hide layout components:** Adjust settings text ([ReVanced#3745](https://github.com/Chr0matic1/revanced-patches/issues/3745)) ([13998bb](13998bb)) * **YouTube - Hide layout components:** Move hide chips settings to Feed menu ([1ed677f](1ed677f)) * **YouTube - Hide layout components:** Remove obsolete 'Hide gray separator' ([a697701](a697701)) * **YouTube - Hide Shorts components:** Add missing options to patch ([65f62fc](65f62fc)) * **YouTube - Hide Shorts components:** Do not hide Shorts action buttons on app first launch ([ReVanced#3933](https://github.com/Chr0matic1/revanced-patches/issues/3933)) ([0d78815](0d78815)) * **YouTube - Playback speed:** Add 'Auto' speed. Always override speed if default is set to 1.0x ([ReVanced#3914](https://github.com/Chr0matic1/revanced-patches/issues/3914)) ([497739e](497739e)) * **YouTube - Playback speed:** Allow long press 2x speed when using custom playback speeds ([ReVanced#3990](https://github.com/Chr0matic1/revanced-patches/issues/3990)) ([79a543a](79a543a)) * **YouTube - Playback speed:** Remember playback speed when using non 1.0x default speed ([05b9f87](05b9f87)), closes [ReVanced#3810](https://github.com/Chr0matic1/revanced-patches/issues/3810) * **YouTube - Playback speed:** Remember playback speed with new speed menu ([ReVanced#3810](https://github.com/Chr0matic1/revanced-patches/issues/3810)) ([c3a5e14](c3a5e14)) * **YouTube - Playback speed:** Restore old playback speed menu ([ReVanced#3817](https://github.com/Chr0matic1/revanced-patches/issues/3817)) ([806b210](806b210)) * **YouTube - Player controls:** Show player control buttons with A/B layout ([ReVanced#3901](https://github.com/Chr0matic1/revanced-patches/issues/3901)) ([bb526bc](bb526bc)) * **YouTube - Remember video quality:** Correctly set default quality when changing from a low quality video ([ReVanced#3879](https://github.com/Chr0matic1/revanced-patches/issues/3879)) ([ddb73e8](ddb73e8)) * **YouTube - Remove background playback restrictions:** Enable for Shorts as well ([ReVanced#3671](https://github.com/Chr0matic1/revanced-patches/issues/3671)) ([7db1a77](7db1a77)) * **YouTube - Return YouTube Dislike:** Show Shorts dislikes with new A/B button icons ([084e0a5](084e0a5)) * **YouTube - Return YouTube Dislike:** Use latest separator height ([ae160a3](ae160a3)) * **YouTube - Seekbar:** Use latest shade of YouTube red ([4b77648](4b77648)) * **YouTube - Settings:** Do not clip settings menus when using an Android 15 device ([ReVanced#3999](https://github.com/Chr0matic1/revanced-patches/issues/3999)) ([7382a02](7382a02)) * **YouTube - Settings:** Show navigation back button in setting sub menus ([ReVanced#3991](https://github.com/Chr0matic1/revanced-patches/issues/3991)) ([e61686c](e61686c)) * **YouTube - Settings:** Use multiline preference title for localized languages ([ReVanced#3821](https://github.com/Chr0matic1/revanced-patches/issues/3821)) ([ff85d49](ff85d49)) * **YouTube - SponsorBlock:** Fix create new segment crash on tablet custom roms ([ReVanced#3946](https://github.com/Chr0matic1/revanced-patches/issues/3946)) ([a0da377](a0da377)) * **YouTube - SponsorBlock:** Show correct segment behavior in settings UI after importing ([e3f25a0](e3f25a0)) * **YouTube - Spoof app version:** Adjust legacy spoof targets ([ReVanced#3934](https://github.com/Chr0matic1/revanced-patches/issues/3934)) ([f5794c1](f5794c1)) * **YouTube - Spoof app version:** Remove broken spoof targets when patching 19.25+ ([ReVanced#3915](https://github.com/Chr0matic1/revanced-patches/issues/3915)) ([9e18eca](9e18eca)) * **YouTube - Spoof app version:** Remove obsolete 17.33.42 spoof target ([ReVanced#3825](https://github.com/Chr0matic1/revanced-patches/issues/3825)) ([33aeba2](33aeba2)) * **YouTube - Spoof app version:** Update spoof target to resolve library tab crashes ([ReVanced#4014](https://github.com/Chr0matic1/revanced-patches/issues/4014)) ([c8eced5](c8eced5)) * **YouTube - Spoof app version:** Update spoof target to resolve library tab crashes ([ReVanced#4019](https://github.com/Chr0matic1/revanced-patches/issues/4019)) ([d89ad65](d89ad65)) * **YouTube - Spoof video streams:** Add missing preferred language preference to the settings ([630633c](630633c)) * **YouTube - Spoof video streams:** Enable opus codec by updating iOS client version ([ReVanced#4063](https://github.com/Chr0matic1/revanced-patches/issues/4063)) ([0af156f](0af156f)) * **YouTube - Spoof video streams:** Fix playback for Android VR by removing invalid body as well ([ReVanced#3769](https://github.com/Chr0matic1/revanced-patches/issues/3769)) ([5150a15](5150a15)) * **YouTube - Spoof video streams:** Log out the iOS client to restore kids videos playback ([ReVanced#4000](https://github.com/Chr0matic1/revanced-patches/issues/4000)) ([cc2ac4e](cc2ac4e)) * **YouTube - Spoof video streams:** Update `Force AVC` client data ([ReVanced#4064](https://github.com/Chr0matic1/revanced-patches/issues/4064)) ([7d537dd](7d537dd)) * **YouTube - Spoof video streams:** Use system language as default iOS audio stream ([ReVanced#4042](https://github.com/Chr0matic1/revanced-patches/issues/4042)) ([4017185](4017185)) * **YouTube Music - GmsCore support:** Resolve patching errors ([ReVanced#4056](https://github.com/Chr0matic1/revanced-patches/issues/4056)) ([38a4bad](38a4bad)) * **YouTube Music - Hide category bar:** Add support for latest release ([ReVanced#3968](https://github.com/Chr0matic1/revanced-patches/issues/3968)) ([b63fdeb](b63fdeb)) * **YouTube Music - Permanent shuffle:** Remove obsolete and non functional patch ([ReVanced#4073](https://github.com/Chr0matic1/revanced-patches/issues/4073)) ([fbc6ab6](fbc6ab6)) * **YouTube:** Merge `Restore old seekbar thumbnails` into `Seekbar thumbnails` ([ReVanced#3860](https://github.com/Chr0matic1/revanced-patches/issues/3860)) ([e377b1e](e377b1e)) ### Build System * Bump ReVanced Patcher ([eee1692](eee1692)) ### Features * **Backdrops - Pro unlock:** Support latest versions by removing version constraint ([a62b506](a62b506)) * **Facebook:** Add `Hide sponsored stories` patch ([ReVanced#3627](https://github.com/Chr0matic1/revanced-patches/issues/3627)) ([214c72b](214c72b)) * **Nyx:** Remove broken `Unlock pro` patch ([1fe8b16](1fe8b16)) * **Sync for Reddit:** Add `Fix video downloads` patch ([ReVanced#3739](https://github.com/Chr0matic1/revanced-patches/issues/3739)) ([a47ee38](a47ee38)) * **TikTok:** Add ReVanced settings about screen ([ReVanced#4009](https://github.com/Chr0matic1/revanced-patches/issues/4009)) ([12ea26b](12ea26b)) * **Twitter:** Add `Change link sharing domain` patch ([ReVanced#3753](https://github.com/Chr0matic1/revanced-patches/issues/3753)) ([9269a07](9269a07)) * **VSCO:** Remove non functional `Unlock pro` patch ([4fddb19](4fddb19)) * **Willhaben:** Add `Hide ads` patch ([ReVanced#3740](https://github.com/Chr0matic1/revanced-patches/issues/3740)) ([1fe3a52](1fe3a52)) * **YouTube - Hide layout components:** Add option to hide Yoodles (YouTube Doodles) ([ReVanced#3743](https://github.com/Chr0matic1/revanced-patches/issues/3743)) ([b8c8916](b8c8916)) * **YouTube - Hide layout components:** Hide player shopping shelf ([ReVanced#3804](https://github.com/Chr0matic1/revanced-patches/issues/3804)) ([1952f3b](1952f3b)) * **YouTube - Hide player flyout menu items:** Hide stable volume ([ReVanced#3827](https://github.com/Chr0matic1/revanced-patches/issues/3827)) ([b91e932](b91e932)) * **YouTube - Hide Shorts components:** Add option to hide `Use template`, `Upcoming`, `Green screen` buttons ([ReVanced#3752](https://github.com/Chr0matic1/revanced-patches/issues/3752)) ([f71c406](f71c406)) * **YouTube - Hide Shorts components:** Add option to hide like fountain ([ReVanced#3731](https://github.com/Chr0matic1/revanced-patches/issues/3731)) ([00a99dd](00a99dd)) * **YouTube - Hide Shorts components:** Hide `Hashtag` button ([ReVanced#3787](https://github.com/Chr0matic1/revanced-patches/issues/3787)) ([828a634](828a634)) * **YouTube - Miniplayer:** Add horizontal drag gesture ([ReVanced#3859](https://github.com/Chr0matic1/revanced-patches/issues/3859)) ([e32b19e](e32b19e)) * **YouTube - Miniplayer:** Add option to disable miniplayer ([ReVanced#3961](https://github.com/Chr0matic1/revanced-patches/issues/3961)) ([e565cdb](e565cdb)) * **YouTube - Player flyout menu:** Hide sleep timer ([ReVanced#3637](https://github.com/Chr0matic1/revanced-patches/issues/3637)) ([7e1bdab](7e1bdab)) * **YouTube - Spoof video streams:** Allow picking a default audio language track ([ReVanced#4050](https://github.com/Chr0matic1/revanced-patches/issues/4050)) ([ede666b](ede666b)) * **YouTube - Theme:** Apply custom seekbar color to splash screen animation ([ReVanced#3978](https://github.com/Chr0matic1/revanced-patches/issues/3978)) ([98d57e2](98d57e2)) * **YouTube Music:** Add `Spoof video streams` patch to fix playback ([ReVanced#4065](https://github.com/Chr0matic1/revanced-patches/issues/4065)) ([cf3116a](cf3116a)) * **YouTube:** Add `Open videos fullscreen` patch ([ReVanced#4069](https://github.com/Chr0matic1/revanced-patches/issues/4069)) ([296d63b](296d63b)) * **YouTube:** Add `Seekbar thumbnails` patch ([ReVanced#3813](https://github.com/Chr0matic1/revanced-patches/issues/3813)) ([5988b75](5988b75)) * **YouTube:** Add `Shorts autoplay` patch ([ReVanced#3794](https://github.com/Chr0matic1/revanced-patches/issues/3794)) ([96b5aed](96b5aed)) * **YouTube:** Hide player shopping shelf in playlists ([ReVanced#3806](https://github.com/Chr0matic1/revanced-patches/issues/3806)) ([a553a13](a553a13)) * **YouTube:** Merge multiple layout patches into `Hide Layout Components` ([ReVanced#3799](https://github.com/Chr0matic1/revanced-patches/issues/3799)) ([bbcb57a](bbcb57a)) * **YouTube:** Merge multiple player overlay patches into `Hide player overlay buttons` ([ReVanced#3800](https://github.com/Chr0matic1/revanced-patches/issues/3800)) ([4ba0300](4ba0300)) * **YouTube:** Support version `19.43.41` ([ReVanced#3854](https://github.com/Chr0matic1/revanced-patches/issues/3854)) ([85de5c7](85de5c7)) * **YouTube:** Support version `19.45.38` ([ReVanced#3938](https://github.com/Chr0matic1/revanced-patches/issues/3938)) ([7c4e3fe](7c4e3fe)) * **YouTube:** Support version `19.46.42` ([ReVanced#4010](https://github.com/Chr0matic1/revanced-patches/issues/4010)) ([122aac6](122aac6)) * **YouTube:** Support versions `19.25` and `19.34` ([ReVanced#3629](https://github.com/Chr0matic1/revanced-patches/issues/3629)) ([049e7f0](049e7f0)) ### Performance Improvements * Check for extension without a class proxy ([a6a74e2](a6a74e2)) * Move variables to local scope ([43c0421](43c0421)) * **YouTube - GmsCore support:** Improve performance by using hashsets ([2c5d390](2c5d390)) ### BREAKING CHANGES * Various APIs have been changed or removed.
Fixes
Force AVC
no longer working. The spoofed client version and iOS version need an update.