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

bug(YouTube): Spoof client patch - various side effects (watch history, auto resume playback, ...) #3208

Closed
15 tasks done
kazimmt opened this issue May 21, 2024 · 60 comments · Fixed by #3220, #3230, #3468, #3480 or #3504
Closed
15 tasks done
Labels
Bug report Something isn't working

Comments

@kazimmt
Copy link
Contributor

kazimmt commented May 21, 2024

Update: All known issues are now fixed.

Bug description

Android VR spoof

  • No HDR video
  • Low quality Shorts seekbar thumbnails
  • No playback of videos intended for children
  • Player download action button is always hidden
  • Video end screen cards are always hidden
  • Paused videos can randomly resume playback

iOS spoof

  • Live videos do not work on Android 8.0 devices
  • Higher video qualities may be missing (Appears to be fixed by 3468)
  • Live videos do not work with audio only background playback
  • Watch history does not work with a brand account
  • HDR video may not be available
  • Watch in VR not working

Acknowledgements

  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@0xrxL
Copy link

0xrxL commented May 21, 2024

I think that iOS spoof should be the first thing to enable, because TestSuite it's too limited.

@LisoUseInAIKyrios
Copy link
Contributor

iOS spoofing fails for some videos and Shorts. HDR videos seem to fail more often than other videos, and it's not known why.

Maybe there is a robust way to detect a failed playback, and retry the video again but switch from iOS to the test client. But the best solution is to figure out how to fix iOS playback so it's 100% reliable.

@oSumAtrIX
Copy link
Member

I don't know if iOS supports HDR playback at all, but if it does, one of the request parameters may be responsible. For example currently the device type is still Android, things like that could be cause of the problem.

@0xrxL
Copy link

0xrxL commented May 22, 2024

I don't know if iOS supports HDR playback at all, but if it does, one of the request parameters may be responsible. For example currently the device type is still Android, things like that could be cause of the problem.

It seems: https://www.iphoneincanada.ca/2018/05/01/youtube-ios-hdr-iphone-x/

...along with 60fps. Therefore the spoof should be improved, like you said.

@eldepor
Copy link

eldepor commented May 22, 2024

Hi. I don't know if this is spoof client patch side effect, but when I open a clip, YTRV plays the original video form the beginning, not the clip fragment.

@inotia00
Copy link

inotia00 commented May 22, 2024

It seems: https://www.iphoneincanada.ca/2018/05/01/youtube-ios-hdr-iphone-x/

...along with 60fps. Therefore the spoof should be improved, like you said.

I was looking through the NewPipeExtractor repository and found a hint about this:
TeamNewPipe/NewPipeExtractor#680 (comment)

You can play 60fps video by spoofing the model name to iOS device with the modelName field of the InnertubeContext$ClientInfo class.

In YouTube v19.11.43, the modelName field name is w:

const-string v1, "iPhone15,4"
iput-object v1, v0, Lcom/google/protos/youtube/api/innertube/InnertubeContext$ClientInfo;->w:Ljava/lang/String;

Also, checking the response of clientName can be helpful in finding side effects that have not yet been discovered.

For example, the ANDROID client includes a response for availablePlaybackSpeeds, but the ANDROID_TESTSUITE client does not.

├─variableSpeedConfig
│    │    ├─[availablePlaybackSpeeds] (8)

: This causes spoofing with the ANDROID_TESTSUITE client makes the playback speed menu to be unavailable.

@oSumAtrIX
Copy link
Member

oSumAtrIX commented May 22, 2024

That aligns with my assumptions. I set the field to a supporter iOS device but no 60fps or HDR playback was available.

@inotia00
Copy link

inotia00 commented May 22, 2024

I may have missed something.
I will upload the code I tested to the repository.

EDIT:
https://github.com/inotia00/revanced-patches-test/commit/57a3fd30d54236ea0a614862c83522433ff313c6
inotia00/revanced-integrations@0231318
Test it when you have time and let me know the results.

Since this change was merged via PR, I removed the test repository.

@cyberboh
Copy link

On my old tab running android 8, all live stream are showing Video unavailable after turned on Client spoof patch.

Screenshot

But it works (even 480p only) on my android 14 phone.

@kazimmt
Copy link
Contributor Author

kazimmt commented May 23, 2024

On my old tab running android 8, all live stream are showing Video unavailable after turned on Client spoof patch.

Spoof client to iOS

@LisoUseInAIKyrios
Copy link
Contributor

On my old tab running android 8, all live stream are showing Video unavailable after turned on Client spoof patch.

Spoof client to iOS

The Test suite spoof automatically switches to iOS for live streams.

@cyberboh
Copy link

@kazimmt @LisoUseInAIKyrios Spoof to iOS does not work. Live streams not available still like on my screenshot above.

@LisoUseInAIKyrios
Copy link
Contributor

@cyberboh The issue might be fixed with #3220

@n1cKz1
Copy link

n1cKz1 commented May 24, 2024

Are qualities and background play for live videos still not supposed to be fixed? I just tested the new iOS spoof and they seem to work fine on my end, can someone else try to verify? History is indeed still broken for brand accounts

Edit: seekbar thumbnails don't show for live videos though

@cyberboh
Copy link

@LisoUseInAIKyrios Still, live streams aren't playing in Android 8. Just tested new patches

@n1cKz1
Copy link

n1cKz1 commented May 24, 2024

They seemingly work fine on A12, all qualities background play etc.

@Pamilg8
Copy link

Pamilg8 commented May 24, 2024

Playback error when returning to app from background. Playback sometimes breaks when switching from background to app, but no error. But at certain times I see this error. Battery optimization is disabled for MicroG. Not live streaming. Android 12. Is there a solution?
Screenshot_20240524-091921

@LisoUseInAIKyrios
Copy link
Contributor

@n1cKz1 not all live streams have seekbar thumbnails, check the same video with unpatched app.

Background live streams play ok if the video is still playing, the issue is when switching to audio only mode.

@Pamilg8 turn on test suite spoofing.

@Pamilg8

This comment was marked as outdated.

@oSumAtrIX

This comment was marked as resolved.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Jun 17, 2024

Perhaps this logic should be removed, and instead it always uses a non av1 iOS device.

The stuttering may be from the device overheating and throttling. Even though the Android device has AV1 hardware it might be too much to do av1 decoding and run the bloated stock YT code at the same time.

Or maybe the av1 YT stream has features found on iOS hardware but not on some android av1 devices, such as 10-bit depth color or 4:4:4 chroma sampling (both appear to be optional for av1 hardware decoders, and if present would force software decoding). Just speculation for this.

Edit: I just noticed this is for avc1 and not av1. So this might be fixed by checking if the device supports both avc1 and av1.

@oSumAtrIX oSumAtrIX changed the title bug(YouTube): Spoof client patch - various side effects bug(YouTube): Spoof client patch - various side effects (history, background playback, auto resume, ...) Aug 6, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug(YouTube): Spoof client patch - various side effects (history, background playback, auto resume, ...) bug(YouTube): Spoof client patch - various side effects (watch history, auto resume playback, ...) Aug 10, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios linked a pull request Sep 18, 2024 that will close this issue
1 task
@ReVanced ReVanced unlocked this conversation Sep 19, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios unpinned this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment