7

I would like to use my Android smartphone as a webcam and found the app "IP webcam", which creates various outputs of the camera.

One such output is a MJPG stream, and I want to know if there is a way to get this stream to work as a webcam-source on my Arch Linux

I know there is Droidcam, but I just can't get it to work on my machine.

6

I can't test this because the app crashes on ICS, but this should be possible using v4l2loopback and gstreamer.

Compile and load the v4l2loopback kernel module. Note down the v4l2 device it creates (/dev/videoX).

Then use something like the following:

gst-launch-0.10 -v souphttpsrc location='http://<your_phones_ip>:<port>/' is-live=true user-id=<user> user-pw=<pass> ! multipartdemux ! decodebin2 ! v4l2sink device=/dev/videoX

While the gstreamer pipeline is running, the video should appear in /dev/videoX and the device can be used like a normal webcam.

  • 1
    awesome! Works perfectly. Note for "IP Webcam" users: use http://ip:port/videofeed as source. – SkaveRat Feb 1 '12 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.