jason.chuang jason.chuang - 1 year ago 399
Android Question

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

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 Source

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