導航:首頁 > 操作系統 > 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相關的資料

熱點內容
數據挖掘中層次聚類演算法實驗 瀏覽:173
開發完app如何配置伺服器 瀏覽:817
汽車壓縮機工作但是壓力不變 瀏覽:84
開發編譯軟體好嗎 瀏覽:899
微信朋友圈發幾兆的圖片不會被壓縮 瀏覽:289
單片機怎麼讓燈循環流水 瀏覽:400
聯想伺服器是什麼晶元 瀏覽:710
山東西門子plc編程軟體 瀏覽:399
貴陽買菜app叫什麼 瀏覽:32
單片機直接驅動二極體優缺點 瀏覽:458
程序員和軟體測試 瀏覽:420
程序員改造品牌 瀏覽:278
動態溫度計編程 瀏覽:75
有什麼app可以鬧鍾語音播報的 瀏覽:285
放量突破頸線選股源碼 瀏覽:517
什麼看文章的app可以賺錢 瀏覽:272
51單片機通訊錯誤 瀏覽:324
打開導航顯示伺服器忙是怎麼回事 瀏覽:842
android應用框架設計 瀏覽:721
移動雲伺服器平台 瀏覽:782