There are 2 ways to capture video streams, but both have the same source adb shell screenrecord
.
Important: device must be POWERFULL!
This will use "Raw frames". It can wait for user to continue
adb shell screenrecord --size=360x640 --output-format=raw-frames - | mplayer -demuxer rawvideo -rawvideo w=360:h=640:format=rgb24 -
This will use H264, but when cache is empty, it will quit.
adb shell screenrecord --output-format=h264 - | mplayer -cache 5120 -