Record video from VideoView

前端 未结 2 1341
生来不讨喜
生来不讨喜 2021-02-04 07:25

Currently doing project on live Streaming, and I succeed to play live video. Now my next task is to record the video which is playing in VideoView. I had searched, able to foun

2条回答
  •  时光说笑
    2021-02-04 07:50

    You can use platform-tools and record video using:

    adb shell screenrecord --verbose /sdcard/demo.mp4
    

    Replace Demo with whatever file name you want. Also this will be placed on your phone, and defaults to 6 minutes I believe. Check out the options of screen record.

    To pull the file to your computer.... (the following command, or use Android Device Monitor

    adb pull /sdcard/demo.mp4
    

    I have used this to record demo's of apps, and even played youtube, and had it record that. It does not have audio, so that may be a major problem. But this is included in the sdk, and records any screen showing while it is recording.

提交回复
热议问题