agarciadom / ipwebcam-gst

Simple shell script for using IP Webcam as a V4L2 webcam / sound source
http://xmleye.wordpress.com
616 stars 154 forks source link

ipwebcam-gst

This is a shell script which allows Android users to use their phones as a webcam/microphone in Linux. The setup is as follows:

How to use

First, install all necessary dependencies with:

sudo ./install-videochat.sh

From then onwards, you should be able to bring up the webcam from your regular user account:

./run-videochat.sh

run-videochat.sh accepts a number of command-line flags: you can check these with ./run-videochat.sh --help.

Make sure you switch the recording device for your videochat application. The install-videochat.sh script installs v4l2loopback, the GStreamer tools and the "good" plugins and pavucontrol if required, but you will have to install the Android SDK by yourself.

If you want to avoid using the command-line flags, you can instead customize the variables in the CONFIGURATION section of run-videochat.sh before using it.

By default, the script captures both video and audio. If you only want video or audio, you can use the -v/--video or -a/--audio flags respectively. You can also simply change the value of CAPTURE_STREAM inside run-videochat.sh. Make sure that IP Webcam is streaming the corresponding streams: otherwise, the script won't work!

Future work

Ideas for future work:

If you need help with the script, feel free to add an issue. Pull requests are welcome!