MarathonLabs / marathon

Cross-platform test runner
https://docs.marathonlabs.io
GNU General Public License v2.0
564 stars 121 forks source link

Workaround android screen recorder 3 minutes limit #796

Open Nikitae57 opened 1 year ago

Nikitae57 commented 1 year ago

Is your feature request related to a problem? Please describe. Google increased video limit up to 30 minutes starting from android 14, but all older versions have the 3 minutes limit which makes us to capture a screenshots GIF with a low framerate and quality on most of the tests

Describe the solution you'd like Capture a new video after the screen recorder exits and glue them all together when test ends

Malinskiy commented 1 year ago

Gluing videos together is a huge undertaking that requires supporting codecs that Android devices produce. For kotlin ecosystem this hard to achieve. I understand why, but maybe just capturing more than one video is better?

Nikitae57 commented 1 year ago

@Malinskiy sure, why not? Better than nothing

Malinskiy commented 1 year ago

Can you take a stab at this and create a PR? If so, do you need any guidance?

Nikitae57 commented 1 year ago

I'll take a look and contact you if I got any questions

mikepenz commented 10 months ago

Android 14 may bring some changes to this: https://twitter.com/MishaalRahman/status/1694872392529522739?s=20

tokou commented 8 months ago

Here's an interesting approach for this issue https://blog.mobile.dev/fixing-androids-3-minute-screen-recording-limitation-4839abc74aee

Malinskiy commented 7 months ago

While this may work for hacking purposes, modifying the binaries bundled with OS should be done by patches to the OS's source code, not runtime. For older devices we can present multiple files in the future instead of changing the limit.