【问题标题】:how to redirect adb screenrecord output to pc(windows/linux) storage如何将 adb screenrecord 输出重定向到 pc(windows/linux) 存储
【发布时间】:2019-05-02 17:12:19
【问题描述】:

在linux中,我使用以下代码将android屏幕投射到pc,效果很好

adb shell "screenrecord --time-limit 1 --output-format=h264 -; screenrecord --time-limit 180 --output-format=h264 -" | ffplay -

所以我认为存在将屏幕记录输出重定向到 pc 存储的方法,所以我尝试以下代码

adb shell "screenrecord --time-limit 1 --output-format=h264 -; screenrecord --time-limit 180 --output-format=h264 -" >> /tmp/t.mp4

但是输出的视频文件无法被vlc和google-chrome打开,如何解决?

ffplay 属于 ffmpeg,所以我猜 ffmpeg 中存在类似的 cli 来将输入视频流输出到视频文件中

【问题讨论】:

标签: android linux shell ffmpeg adb


【解决方案1】:

我找到了解决方案,使用默认的ffmpeg,在最新的linux mint中,它使用avconv代替ffmpeg,但是2个clis语法相同,以下是我的代码

adb shell "screenrecord --time-limit 1 --output-format=h264 -; screenrecord --time-limit 180 --output-format=h264 -" | avconv -i - /tmp/t.mp4

【讨论】:

    猜你喜欢
    • 2015-10-07
    • 1970-01-01
    • 1970-01-01
    • 2018-05-02
    • 2019-04-18
    • 1970-01-01
    • 2014-07-11
    • 1970-01-01
    • 2014-09-30
    相关资源
    最近更新 更多