baitisj / android_screen_mirror

Scripts to perform screen capture of Android devices
14 stars 8 forks source link

H264 Video Capture #1

Open jpihl opened 7 years ago

jpihl commented 7 years ago

Hi @baitisj,

Very cool project! I'm looking into doing something similar.

I don't know if you are already aware of this, but I just wanted to let you know that you can stream h264 video from the device with the following command:

 adb shell screenrecord --output-format=h264 - | cvlc --demux h264 -

The resulting video size and bitrate can be changed with --size WIDTHxHEIGHT and --bit-rate RATE. --output-format=h264 is a "hidden" experimental option introduced in the version shipped with Android 5.0+. http://www.bigflake.com/screenrecord/

It's somewhat very flaky but I don't know if that's VLC or screenrecord. With some tweaking it could maybe be a nice solution.

Btw, sorry for misusing the issue tracker on this repository. It was the only way I found to contact you.

baitisj commented 7 years ago

FYI I consider this a very appropriate use of the issue tracker. This is great; I'll definitely try this out and see if I can't integrate it into the script as needed.