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 - Remember video quality): Default resolution is not saved or set correctly when viewing vertical video #1552

Open
3 tasks done
32423d opened this issue Dec 20, 2022 · 16 comments
Labels
Bug report Something isn't working

Comments

@32423d
Copy link

32423d commented Dec 20, 2022

Type

Other

Bug description

Sometimes when I open random videos on Youtube Revanced the maximum resolution is not set. An example of this issue is that when I open a video that has a maximum resolution of 1080p 60 fps it sometimes opens the video with a resolution of 480p. I previously set the maximum resolution by going to a 4k 60 fps video and setting the resolution to 4k 60 fps so that Youtube Revanced would remember to set all videos to the maximum available resolution for videos.

Video of bug occuring:
test.webm

Video quality preferences in the Youtube Revanced app settings:
image
image

Steps to reproduce

Disclaimer: This issue cannot be reproduced reliably due to it occurring randomly on videos

  1. Open a video
  2. Check the resolution

Relevant log output

--------- beginning of system
12-20 17:11:00.085 28872 28872 W PackageParser: Unknown element under <manifest>: queries at /data/user/0/app.revanced.manager.flutter/cache/file_picker/com.google.android.youtube_17.49.37-1533275584_minAPI26(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com(1).apk Binary XML file line ReVanced/revanced-patches#41
12-20 17:11:03.110 28872 28872 W PackageParser: Unknown element under <manifest>: queries at /data/user/0/app.revanced.manager.flutter/cache/file_picker/com.google.android.youtube_17.49.37-1533275584_minAPI26(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com(1).apk Binary XML file line ReVanced/revanced-patches#41
12-20 17:19:48.105 28872 28872 W PackageParser: Unknown element under <manifest>: queries at /data/user/0/app.revanced.manager.flutter/cache/file_picker/com.google.android.youtube_17.49.37-1533275584_minAPI26(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com(1).apk Binary XML file line ReVanced/revanced-patches#41
12-20 17:19:50.074 28872 28872 W PackageParser: Unknown element under <manifest>: queries at /data/user/0/app.revanced.manager.flutter/cache/file_picker/com.google.android.youtube_17.49.37-1533275584_minAPI26(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com(1).apk Binary XML file line ReVanced/revanced-patches#41
--------- beginning of main
12-20 17:41:39.988 32099 32115 E OpenGLRenderer: Unable to match the desired swap behavior.
12-20 17:41:39.998 32099 32099 E SurfaceSyncer: Failed to find sync for id=0
12-20 17:41:39.998 32099 32099 E SurfaceSyncer: Failed to find sync for id=1
12-20 17:41:39.998 32099 32099 E SurfaceSyncer: Failed to find sync for id=2
12-20 17:41:39.998 32099 32099 E SurfaceSyncer: Failed to find sync for id=3
12-20 17:41:43.349 32099 32099 D FilePickerUtils: Allowed file extensions mimes: [application/vnd.android.package-archive]
12-20 17:41:43.350 32099 32099 D FilePickerDelegate: Selected type */*
12-20 17:45:04.483  4639  4639 E manager.flutter: Not starting debugger since process cannot load the jdwp agent.
12-20 17:45:04.496  4639  4639 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10274; state: ENABLED
12-20 17:45:04.501  4639  4639 D nativeloader: Configuring classloader-namespace for other apk /data/app/~~4wboQwiJntDkjGUof6Lc0g==/app.revanced.manager.flutter-v2dZkTW_b_S1K87FDnvtkA==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~4wboQwiJntDkjGUof6Lc0g==/app.revanced.manager.flutter-v2dZkTW_b_S1K87FDnvtkA==/lib/arm64:/data/app/~~4wboQwiJntDkjGUof6Lc0g==/app.revanced.manager.flutter-v2dZkTW_b_S1K87FDnvtkA==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/app.revanced.manager.flutter
12-20 17:45:04.509  4639  4639 V GraphicsEnvironment: ANGLE Developer option for 'app.revanced.manager.flutter' set to: 'default'
12-20 17:45:04.509  4639  4639 V GraphicsEnvironment: ANGLE GameManagerService for app.revanced.manager.flutter: false
12-20 17:45:04.509  4639  4639 V GraphicsEnvironment: Updatable production driver is not supported on the device.
12-20 17:45:04.510  4639  4639 D NetworkSecurityConfig: No Network Security Config specified, using platform default
12-20 17:45:04.510  4639  4639 D NetworkSecurityConfig: No Network Security Config specified, using platform default
12-20 17:45:04.531  4639  4639 W manager.flutter: type=1400 audit(0.0:9018): avc: denied { read } for name="max_map_count" dev="proc" ino=7579381 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=app.revanced.manager.flutter
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: QUALCOMM build                   : 4783c89, I46ff5fc46f
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Build Date                       : 11/30/20
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: OpenGL ES Shader Compiler Version: EV031.31.04.01
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Local Branch                     : QPR2
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Remote Branch                    : 
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Remote Branch                    : 
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Reconstruct Branch               : 
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Build Config                     : S P 10.0.4 AArch64
12-20 17:45:04.537  4639  4639 I AdrenoGLES-0: Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
12-20 17:45:04.540  4639  4639 I AdrenoGLES-0: PFP: 0x016dd093, ME: 0x00000000
12-20 17:45:04.542  4639  4639 W AdrenoUtils: <ReadGpuID_from_sysfs:197>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
12-20 17:45:04.542  4639  4639 W AdrenoUtils: <ReadGpuID:221>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
12-20 17:45:04.613  4639  4655 E OpenGLRenderer: Unable to match the desired swap behavior.
12-20 17:45:04.618  4639  4660 I flutter : ReVanced API: Using CronetEngine + true
12-20 17:45:04.626  4639  4682 W SQLiteLog: (28) double-quoted string literal: "221F04DDCF86133E6D2E6344BA97034F"
12-20 17:45:04.626  4639  4682 W SQLiteLog: (28) double-quoted string literal: "22D1CC376C54BE531C0A569AA1492CA8"
12-20 17:45:04.636  4639  4639 I DynamiteModule: Considering local module com.google.android.gms.cronet_dynamite:0 and remote module com.google.android.gms.cronet_dynamite:1611
12-20 17:45:04.636  4639  4639 I DynamiteModule: Selected remote version of com.google.android.gms.cronet_dynamite, version >= 1611
12-20 17:45:04.636  4639  4639 V DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
12-20 17:45:04.643  4639  4639 W System  : ClassLoader referenced unknown path: 
12-20 17:45:04.644  4639  4639 D nativeloader: Configuring classloader-namespace for other apk . target_sdk_version=33, uses_libraries=, library_path=/data/app/~~bGGnbbJGkQ7qUBEUOFuisA==/com.google.android.gms-dXEXJPJSh74h9qy1sDAKzg==/lib/arm64:/data/app/~~bGGnbbJGkQ7qUBEUOFuisA==/com.google.android.gms-dXEXJPJSh74h9qy1sDAKzg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
12-20 17:45:04.646  4639  4639 I DynamiteLoaderV2Impl: [71] com.google.android.gms.cronet_dynamite
12-20 17:45:04.650  4639  4639 W manager.flutter: ClassLoaderContext type mismatch. expected=PCL, found=DLC (PCL[] | DLC[];PCL[/data/app/~~4wboQwiJntDkjGUof6Lc0g==/app.revanced.manager.flutter-v2dZkTW_b_S1K87FDnvtkA==/base.apk*2113815621:/data/app/~~4wboQwiJntDkjGUof6Lc0g==/app.revanced.manager.flutter-v2dZkTW_b_S1K87FDnvtkA==/base.apk!classes2.dex*2942373131:/data/app/~~4wboQwiJntDkjGUof6Lc0g==/app.revanced.manager.flutter-v2dZkTW_b_S1K87FDnvtkA==/base.apk!classes3.dex*78547179])
12-20 17:45:04.655  4639  4639 D nativeloader: Configuring classloader-namespace for other apk . target_sdk_version=33, uses_libraries=ALL, library_path=/data/user_de/0/com.google.android.gms/app_chimera/m/00000120/CronetDynamite.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
12-20 17:45:04.659  4639  4639 I cr_CronetLibraryLoader: Cronet version: 108.0.5359.47, arch: aarch64
12-20 17:45:04.660  4639  4684 D TrafficStats: tagSocket(121) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:04.664  4639  4684 D TrafficStats: tagSocket(124) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:04.668  4639  4684 D TrafficStats: tagSocket(126) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:04.669  4639  4684 D TrafficStats: tagSocket(126) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:05.267  4639  4639 W pool-8-thread-1: type=1400 audit(0.0:9019): avc: denied { read } for name="version" dev="proc" ino=4026531958 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:proc_version:s0 tclass=file permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.302  4639  4703 D TrafficStats: tagSocket(131) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:05.305  4639  4682 W SQLiteLog: (28) double-quoted string literal: "129C81370C8C8A20B85E5575BDF12E85"
12-20 17:45:05.305  4639  4682 W SQLiteLog: (28) double-quoted string literal: "22D1CC376C54BE531C0A569AA1492CA8"
12-20 17:45:05.329  4639  4661 E BLASTBufferQueue: [SurfaceView[app.revanced.manager.flutter/app.revanced.manager.flutter.MainActivity]#1](f:0,a:0) rejecting buffer:active_size=1080x2264, requested_size=1080x2264 buffer{size=1080x2189 transform=0}
12-20 17:45:05.354  4720  4720 W sh      : type=1400 audit(0.0:9020): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.361  4720  4720 W sh      : type=1400 audit(0.0:9021): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.371  4720  4720 W sh      : type=1400 audit(0.0:9022): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.387  4720  4720 W sh      : type=1400 audit(0.0:9023): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.401  4720  4720 W sh      : type=1400 audit(0.0:9024): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.407  4720  4720 W sh      : type=1400 audit(0.0:9025): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.414  4720  4720 W sh      : type=1400 audit(0.0:9026): avc: denied { read } for name="/" dev="dm-8" ino=2 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 app=app.revanced.manager.flutter
12-20 17:45:05.784  4639  4639 E SurfaceSyncer: Failed to find sync for id=0
12-20 17:45:05.784  4639  4639 E SurfaceSyncer: Failed to find sync for id=1
12-20 17:45:05.795  4639  4655 W Parcel  : Expecting binder but got null!
12-20 17:45:05.912  4639  4682 W SQLiteLog: (28) double-quoted string literal: "484091CDFBF54C9C82180F6C7CC4C586"
12-20 17:45:05.912  4639  4682 W SQLiteLog: (28) double-quoted string literal: "220C3B128253FF6C4664FFE75582EBC1"
12-20 17:45:06.064  4639  4703 D TrafficStats: tagSocket(131) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:06.470  4639  4703 D TrafficStats: tagSocket(131) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:06.883  4639  4703 D TrafficStats: tagSocket(131) with statsTag=0xffffffff, statsUid=-1
12-20 17:45:07.290  4639  4703 D TrafficStats: tagSocket(131) with statsTag=0xffffffff, statsUid=-1

Screenshots or videos

No response

Solution

No response

Additional context

Revanced Manager Version: 0.0.52
Youtube Revanced Version: 17.45.37

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@32423d 32423d added the Bug report Something isn't working label Dec 20, 2022
@oSumAtrIX
Copy link
Member

You need to chose a quality from the advanced quality settings flyout menu.

@32423d
Copy link
Author

32423d commented Dec 20, 2022

You need to chose a quality from the advanced quality settings flyout menu.

I already did that when I first installed the Youtube Revanced app but the issue is that even after setting the quality to 4k 60 fps in the advanced quality settings flyout menu and setting the Youtube Revanced to remember the previously set resolution from the quality settings (I set Youtube Revanced to remember the previously set resolution first before setting the maximum video quality in the advanced quality settings flyout menu) the quality of some videos are randomly not set to the maximum resolution. Can you please reopen my issue?

@oSumAtrIX
Copy link
Member

Please record this issue.

@oSumAtrIX oSumAtrIX added the Waiting on author Further information is requested label Dec 20, 2022
@32423d
Copy link
Author

32423d commented Dec 20, 2022

Please record this issue.

test.webm

@oSumAtrIX
Copy link
Member

I can not reproduce this:

Record_2022-12-21-01-02-57.mp4

@32423d
Copy link
Author

32423d commented Dec 21, 2022

Can you reopen it to see if others can reliably reproduce it?

@oSumAtrIX oSumAtrIX reopened this Dec 21, 2022
@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Dec 21, 2022

I am seeing this on random dumb videos.

I have 720p set as default, and when watching this: https://youtu.be/bOSMdEBe1wE
(Note: video was found randomly for this example, and not something I would normally seek out or watch 🫤)

And this video plays back at 360p resolution, even though 720p is a playback option. If I pick 720p as the resolution, then the ReVanced toast says "default quality set to 1080p", which is not right.

The rotated aspect ratio of the video might be part of the problem.

A slightly different issue I sometimes see, is if 720p is not available then instead of picking the highest available resolution (such as 480p), YouTube will show 240p or 360p. It might be the same underlying bug as the problem in the video above.

@venkat2305
Copy link

This issue occurs with vertical videos. When we open shorts(displayed as videos on the home page or subscription page). It sets half the resolution of the actual video. If the original video is in 1080p it will set 480p and 360p for 720p videos. Hope this makes sense.

@wasiluk-dev
Copy link

I can definitely confirm what @venkat2305 has said. This issue seems to appear only when viewing vertical videos.

@airyimbin
Copy link

I have the same bug but I think I have it reproducable and not involving any portrait videos.

It remembers the last max resolution of the previous video.

  1. Watch a video with for example a 720p video
  2. Then watch a max 4k available video. It will keep the video at 720p.
  3. Now watch another 4k available video. It will then switch to 4k.

So if you watch back to back 4k videos it will remember the previous max quality as 4k and will always be at 4k. Again not watching any portrait videos.

@venkat2305
Copy link

@airyimbin hey, i set the default quality to 4k. Watched a video with Max resolution of 720p and then watched a 4k vid. It works fine for me

@airyimbin
Copy link

airyimbin commented Feb 26, 2023

@airyimbin hey, i set the default quality to 4k. Watched a video with Max resolution of 720p and then watched a 4k vid. It works fine for me

Now that you have 4k set to default, close the app and try it without setting default again.

Here is my recording of the issue. I can repeat this on my phone. Note it always takes 10seconds for the quality to "kick in".

Screen.Recording.20230226.021134.mp4

@airyimbin
Copy link

airyimbin commented Feb 26, 2023

You can even see in the example the video lowers down to 720p even though it started at 1080p.
I am on the latest available version of youtube for the manager.
I've tried it with the toggle on and off for remembering quality.

@airyimbin
Copy link

airyimbin commented Feb 26, 2023

Going from a 720p30fps video to a 4k60fps video does this. You can even have a video start off at 4k60fps or 1080p60fps and will snap to 720p60fps after 10 seconds.
Doesn't seem to be happening when going from 720p30fps to 4k30fps.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Mar 6, 2023

Going from a 720p30fps video to a 4k60fps video does this. You can even have a video start off at 4k60fps or 1080p60fps and will snap to 720p60fps after 10 seconds. Doesn't seem to be happening when going from 720p30fps to 4k30fps.

I believe the video is correctly loading and playing at 4K, and the issue is the UI quality picker is temporarily showing the default resolution of 720p.

It seems the UI resolution picker needs a few seconds to figure out the video resolution was changed by the remember video resolution patch.

Edit: this was later found to be a bug, where remember quality initially selected the wrong menu index. The menu would update after a few seconds. Bug has been fixed.

@oSumAtrIX
Copy link
Member

The patch was ported over from Vanced. Ideally, it is refactored into a ReVanced style patch such as the default-playback-speed patch, which simply remembers the last selection, and overrides it on the next selection. Unlike default-playback-speed , it would be important to fallback to the nearest quality if the remembered one does not exist

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: (Youtube Revanced) Resolution is not set to the maximum resolution on random videos bug:(remember-video-quality) Default resolution is not saved or set correctly when viewing vertical video Apr 15, 2023
@oSumAtrIX oSumAtrIX linked a pull request Jul 7, 2023 that will close this issue
9 tasks
@revanced-bot revanced-bot transferred this issue from ReVanced/revanced-patches-template Dec 14, 2023
@oSumAtrIX oSumAtrIX transferred this issue from another repository Dec 14, 2023
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug:(remember-video-quality) Default resolution is not saved or set correctly when viewing vertical video bug(YouTube - Remember video quality): Default resolution is not saved or set correctly when viewing vertical video Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants