如何通过亚行捕获屏幕尽可能快? [英] How to capture the screen as fast as possible through adb?

查看:227
本文介绍了如何通过亚行捕获屏幕尽可能快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我写了一个PC客户端可实时显示和控制我的Andr​​oid手机的屏幕使用的亚洲开发银行。我用猴子来控制设备,它工作正常。问题是如何抢在手机屏幕和流畅显示。

我想出了是不断抢帧缓冲的第一个解决方案亚洲开发银行(如DDMS的截屏功能)。现在,当我做到这一点,表现相当不能接受的。从帧缓冲拍摄的帧速率可低至5每秒(帧大小为800 * 480)。我的程序看起来像它打嗝时,我滑了电话。

我的程序是用Java编写的 ddmslib 帧缓冲

补充:
我发现它更慢的编码生帧缓冲数据转换成巴纽格式,否则这将是一个快速的方式来发送一个COM preSS原始图像。

我怎样才能提高捕捉画面平稳水平的速度?

解决方案

 亚行外壳screencap -p | perl的-pe的/ \ X0D \ X0A / \ X0A / G'> screen.png
 

来源:

<一个href="http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html">http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html

Recently, I wrote a PC client which can display and control my android phone screen in real-time using adb. I use the monkey to control the device and it works fine. The problem is how to grab the phone screen and display it smoothly.

The first solution I have come up with is to continually grab the framebuffer through adb (like DDMS's screen capture function). Now when I do it, the performance is quite unacceptable. The frame rate captured from framebuffer is as low as 5 per second (the frame size is 800 * 480). My program looks like its hiccuping when I slide on the phone.

My program is written in java using ddmslib to grab framebuffer.

add:
I found it much slow to encoding the raw framebuffer data into .png format, otherwise this will be a fast way to transmit a compress raw image.

How can I improve the speed of capturing the screen to a smooth level?

解决方案

adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png

Source:

http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html

这篇关于如何通过亚行捕获屏幕尽可能快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆