I\'ve tried the suggestion from fadden to mirror the Android screen to PC, but the vlc player screen show nothing:
Using any of the adb shell commands produced corrupted data for me. Using adb exec-out, as noted by lord-ralf-adolf in a comment on the accepted answer, fixed the problem.
I used this exact command to get optimal video quality and minimal lag from a Galaxy S6:
adb exec-out screenrecord --output-format=h264 --size 540x960 - | ffplay -framerate 60 -framedrop -bufsize 16M -