Use adb screenrecord command to mirror Android screen to PC via USB

jason.chuang picture jason.chuang · Jul 17, 2015 · Viewed 50.6k times · Source

I've tried the suggestion from fadden to mirror the Android screen to PC, but the vlc player screen show nothing:

enter image description here

What would be the correct commands lines for this function? Thanks.

Answer

jason.chuang picture jason.chuang · Jul 18, 2015

Since vlc can't play the h264 file from adb std output, I turn to use ffplay as stream player and it works via the following command:

adb shell screenrecord --output-format=h264 - | ffplay -

OS X binary ffplay and streaming screens:

enter image description here

Thanks!!