Skip to content

Conversation

@AbdulWahab1539
Copy link

This PR fixes an issue where selecting a custom resolution preset from settings results in black bars or padding around the output video on various devices. The fix ensures that the video maintains the correct aspect ratio without unwanted padding.

Changes

  1. Adjusted resolution scaling logic to prevent black bars by introducing setResolution function & WindowUtils utility class.
  2. added documentation for setResolution in Readme file.
  3. Improved aspect ratio handling across different device screen sizes to prevent error.
  4. Tested on multiple resolutions (1080p, 720p, 480p) to ensure consistency.

Related Issues

  1. Fixes Recorded Video issue  #165
  2. Fixes Recorded videos have black bars on the sides. #180

Testing

Verified on multiple devices with different aspect ratios. Here is the list

  • Oppo CPH2557 - 34
  • Samsung S23 Ultra - 34
  • Motorolla G20 - 31 (Android 11)
  • Google 9 Pro XL - 34 - (Android 14)
  • Google Pixel 4a 5G - 34 - (Android 14)
  • Google Pixel 7 - 33 - Android 13
  • Lenovo Tab P12 - 30 (Android 10)

Ensured recorded videos match the selected resolution without additional padding/black bars.

Let me know if you need refinements! 🚀. I hope my PR gets merged.

… custom resolution

Changed resolution settings from dimensions to actual resolution options
Added comments and function docs for better understanding what the function does and parameters it takes.
new setResolution function documentation added in Readme
@HBiSoft
Copy link
Owner

HBiSoft commented May 28, 2025

Thank you for this. I will review it today, test it on my side, and then implement it. I'm sorry for only responding now.

@AbdulWahab1539
Copy link
Author

Thank you for getting back to me! I really appreciate it. I’m glad to hear you’ll be reviewing it soon. If there are any changes or improvements you’d like to see, I’d be happy to update the contribution accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recorded videos have black bars on the sides. Recorded Video issue

2 participants