Code Monkey home page Code Monkey logo

ipwebcam-gst's Introduction

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:

  • IP Webcam (on the phone) serves up a MJPEG live video stream and a WAV live audio stream through HTTP (port 8080 by default).
  • If the phone is plugged to USB and ADB is available, the HTTP port in the phone is bridged to the same port in the computer, using ADB port forwarding. This is much faster than using Wi-Fi, and the shell will be able to start the IP Webcam application on the phone directly. The script supports Wi-Fi as well, but it can be rather choppy with bad reception, so I wouldn't recommend it.
  • From the local port in the computer, a GStreamer graph takes the MJPEG live video stream and dumps it to a loopback V4L2 device, using v4l2loopback. The audio stream is dumped to a PulseAudio null sink.
  • Most videochat software in Linux is compatible with v4l2loopback: Skype 2.1 (not the latest 2.2, it seems), Cheese, Empathy, Google Talk video chats and Google+ hangouts should work.
  • The sound recording device for your videochat application should be changed to the 'Monitor of Null Sink' using pavucontrol.

This project includes prepare-videochat.sh, which does all these things, except for switching the recording device for your videochat application. It does open pavucontrol if it's not running, though. The 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.

To use this script, simply run it with ./prepare-videochat.sh and follow instructions. You may have to customize a few variables in the CONFIGURATION section before using it, though. You can also use something like ./prepare-videochat.sh horizontal-flip to flip the video horizontally, in case you might need it.

Please make sure that audio is enabled on IP Webcam, or the script won't work!

Here's an idea for future work: switch to Python and use the official GStreamer binding. I'd love to see that, but I don't have enough free time :-(.

Disclaimer: the script has only been tested in my local installation of Ubuntu 11.04 and on Arch Linux. I think it should work on most recent Debian-based distributions as well (and Debian, of course). If you need any help, drop me a direct message on Twitter at @antoniogado.

ipwebcam-gst's People

Contributors

agarciadom avatar

Watchers

Guillaume M. avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.