Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Fix: Black Bars Around Output Video on Custom Resolutions (#165, #180)#189

Open
AbdulWahab1539 wants to merge 2 commits intoHBiSoft:master from
AbdulWahab1539:black-bars-fix
Open

Fix: Black Bars Around Output Video on Custom Resolutions (#165, #180) #189
AbdulWahab1539 wants to merge 2 commits intoHBiSoft:master from
AbdulWahab1539:black-bars-fix

Conversation

@AbdulWahab1539
Copy link

@AbdulWahab1539 AbdulWahab1539 commented Feb 7, 2025

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
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 reacted with heart emoji

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

AltStyle によって変換されたページ (->オリジナル) /