mortenjust / androidtool-mac

One-click screenshots, video recordings, app installation for iOS and Android
Apache License 2.0
5.43k stars 325 forks source link

Dynamically determine smartwatch resolution for videos #27

Closed rock3r closed 9 years ago

rock3r commented 9 years ago

I was reading the code of postprocessmovieforserial.sh and I've noticed that you're currently using an hardcoded resolution for the videos. I know the reason is that watches record raw streams instead of mp4s, but I was wondering if we could be a bit creative and sidestep the issue. We could get the resolution from some other source. One idea would be to look for that info in dumpsys output (see [here}(https://github.com/dtmilano/AndroidViewClient/issues/41), for example, or we could directly parse that out of dumpsys SurfaceFlinger output), or if that doesn't work, go on a hackier solution, which would be to grab a screenshot and see its dimensions, which will match the video.

Thoughts?

mortenjust commented 9 years ago

yes, thanks for pointing this out. In a recent commit I added screen resolution detection for both watches and phones