Skip to content

v1.2.10.2

Compare
Choose a tag to compare
@yimelia yimelia released this 12 May 06:29
· 107 commits to master since this release

录屏相关

Android录屏目前提供两种模式,yosemiteffmpeg,区别如下:

  • yosemite:原有的默认模式,录屏清晰度和质量较高,但兼容性较差,部分机型可能有问题
    • 支持的参数:orientation, max_time, bit_rate, bit_rate_level
  • ffmpeg: 在1.2.9之后加入的新模式,录屏帧率和质量较低,但兼容性更好,能兼容绝大多数设备
    • 支持的参数: orientation, max_size, max_time, fps, snapshot_sleep

在1.2.10.2中的改动:

  • 在1.2.9中提供的cv2模式已经被舍弃,因为容易引发错误,效果也不如ffmpeg
  • win/ios的start_recording 就无需再有mode参数,只有android需要mode参数
  • 录屏的ffmpeg模式增加了max_size参数,能够指定录屏结果的图像大小,因为屏幕图片越大,在录屏时造成的系统负载越大(CPU和内存占用)

代码示例:

dev = connect_device("android:///")
dev.start_recording(output="test.mp4", mode="ffmpeg", max_size=800)  # Android 支持mode指定使用ffmpeg模式

其他改动

  • 如果Android出现了屏幕有一半黑屏的情况,可以再次重连
  • 去掉了numpy的版本号限制

Record screen

Android screen recording currently provides two modes, yosemite and ffmpeg, the differences are as follows:

  • yosemite: the original default mode, the recording resolution and quality are higher, but the compatibility is poor, and some models may have problems
    • Supported parameters: max_time, orientation, bit_rate, bit_rate_level
  • ffmpeg: a new mode added after 1.2.9, the screen recording frame rate and quality are lower, but the compatibility is better, compatible with most devices
    • Supported parameters: max_time, fps, max_size, snapshot_sleep

Changes in 1.2.10.2:

  • The cv2 mode provided in 1.2.9 has been abandoned, because it is prone to errors and the effect is not as good as ffmpeg
  • The start_recording of win/ios does not need to have the mode parameter, only android needs the mode parameter
  • The ffmpeg mode of screen recording adds the max_size parameter, which can specify the image size of the screen recording result, because the larger the screen image, the greater the system load caused by the screen recording (CPU and memory usage)

Code example:

dev = connect_device("android:///")
dev.start_recording(output="test.mp4", mode="ffmpeg", max_size=800) # Android supports mode to specify the use of ffmpeg mode

Other changes

  • If the Android screen is half black, you can reconnect again
  • Removed numpy version number restriction