导航:首页 > 操作系统 > androidlevel19

androidlevel19

发布时间:2023-08-27 13:20:21

❶ ADB录制视频 android 视频录制命令 screenrecord

在Android 4.4(Kitkat - API level 19)上集成了一个比较好用的视频(.mp4格式)录制功能 – screenrecord 。

使用方法

1.  基本用法

$ adb shell screenrecord /sdcard/myscreenrecord.mp4

/sdcard/myscreenrecord.mp4 为视频录制文件路径

录制默认分辨率,默认4Mbps,默认180s的视频,保存到sdcard上名为myscreenrecord.mp4

2.  旋转(参数:–rotate)

$ adb shell screenrecord --rotate /sdcard/myscreenrecord.mp4

旋转90度

3.  指定分辨率(参数:–size)

$adb shell screenrecord --size 112x112 /sdcard/myscreenrecord.mp4

分辨率为112x112,建议不要指定分辨率,使用默认分辨率效果最佳;

注意,分辨率不是完全可以随意定制的,比如在我手机上录制100x100的会提示错误:

The max width/height supported by codec is1920x1088

100x100is not supported by codec, suggest to set it as112x112

4.  指定比特率(参数:–bit-rate)

$adb shell screenrecord --bit -rate 8000000 /sdcard/myscreenrecord.mp4

设置比特率为8Mbps,比特率越大,文件越大,画面越清晰;

5.  限制录制时间 (参数: –time-limit)

$adb shell screenrecord --time -limit 10 /sdcard/myscreenrecord.mp4

限制视频录制时间为10s,如果不限制,默认180s

6.  导出视频

$adb pull /sdcard/myscreenrecord.mp4

7.  注意

请关注视频文件生成大小,根据自身情况而定;

暂不支持声音;

咱时不支持模拟器录制( 模拟器录制看这里 ),出现如下提示:Unable to get output buffers (err=-38)

Encoder failed (err=-38),可认为是此原因;

8.  命令查看

adb shell screenrecord --help

Usage: screenrecord [options]

Records the device's display to a .mp4 file.

Options:

--size WIDTHxHEIGHT

Set the video size, e.g."1280x720".  Default is the device's main

display resolution (if supported),        1280x720if not.  For best

results,use a size supported by the AVC encoder.

--bit -rate RATE

   Set the video bit rate, in megabits per second.  Default4Mbps.

--time -limit TIME

   Set the maximum recording time, in seconds.  Default / maximum is180.

--rotate

    Rotate the output90 degrees.

--verbose

    Display interesting information on stdout.

--help

    Showthis message.

Recording continues until Ctrl-C is hit or the time limit is reached.

❷ android studio为什么创建的时候选择的API最低版本是19,最后都变成23

刚刚注意到你的问题,感觉之前的回答都没有答到点上,不知道现在回答对你是否还有帮助。
出现这种问题,可能是由于build.gradle(app)中minSdkVersion被手动改过。但是我认为更有可能是你在android studio编辑时使用了高api代码(如tint等等)并用灯泡或alt+enter推荐修改中的Add requires API() annotation来处理call requires API level 23(Current min 19)之类的错误。
解决方法:在这些位置使用if判断环绕并且在else中给出低api的处理方法。

阅读全文

与androidlevel19相关的资料

热点内容
为什么服务器流量那么贵 浏览:256
读取pdf文件内容 浏览:488
如何给脚本链接加密 浏览:80
多服务器云部署方案 浏览:441
如何把一个安卓应用改为中文版 浏览:450
带求补器的源码 浏览:722
程序员掉入能力陷阱 浏览:671
中百超市多点app如何充值 浏览:331
仙剑奇侠传4codex未加密 浏览:194
如何搭建服务器ss端口 浏览:62
国外代理服务器地址服务器端口密码 浏览:754
phpthrownew 浏览:681
java从入门到精通pdf百度云 浏览:55
linuxhdf5安装 浏览:469
java继承编程练习题 浏览:652
云记app怎么写字视频 浏览:598
如何进入我的世界脏小豆的服务器 浏览:42
哪里找到转转app 浏览:580
苹果二次app怎么注册 浏览:587
国际服体验服服务器为什么爆满 浏览:114