Connecting adb over WiFi.

1) Connect your phone over USB.

2) Set the TCP port $ adb tcpip 5555.

3) Run

$ adb kill-server
$ adb connect 192.168.2.5 

you will see

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 192.168.2.5:5555

Recording video

4) While in a shell, the syntax is screenrecord [options] <filename>.

To use screenrecord from the command line, type the following: $ adb shell screenrecord /sdcard/demo.mp4

5) (press Ctrl-C to stop)

More info on bitrate settings and stuff here : http://developer.android.com/tools/help/shell.html#screenrecord