How to traverse camera from device via adb to my Ubuntu? What is the best way to traverse web camera?

E.g. there is great number of web servers for android with video translations. How to get access to its via adb?

Or wi-fi would be a easiest way?
Connect the smartphone via USB, start the IP camera server app and use adb port forwarding or usb tethering to access the server from PC.

Then you can connect directly to the mjpeg video stream at http://yourphoneip:8080/video.

This script also creates a v4l virtual device if you need it.

I've measured that the streaming latency is a bit higher than a regular USB camera (&lt;500ms vs &lt;100ms).