• Stars
    star
    618
  • Rank 72,605 (Top 2 %)
  • Language
    Shell
  • Created over 13 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple shell script for using IP Webcam as a V4L2 webcam / sound source

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/Opus 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.

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:

  • switch to Python and use the official GStreamer binding. I'd love to see that, but I don't have enough free time :-(.
  • make a separated config file (system-wide and user-defined)

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

More Repositories

1

xeger

Maintenance fork of the Xeger Java library for generating strings according to a regexp
Java
92
star
2

swtbot-pure-maven-example

Example on using SWTBot with pure Maven (no Tycho, no Ant PDE)
Java
9
star
3

redmine_wiki_backlinks

Redmine plugin that adds reports about backlinks, orphan pages and wanted pages to wikis
Ruby
8
star
4

xquery-parser

ANTLR4-based XQuery 1.0 parser (XQTS 1.0 compliant)
ANTLR
6
star
5

pun2-tic-tac-toe

Unity + Photon 2 online multiplayer Tic-Tac-Toe sample game
C#
4
star
6

jade-booktrading

Mavenized version of the official JADE Book Trading example
Java
2
star
7

rover-demo

Materials for interactive demo of Papyrus-RT with the Papyrus IC rover
TeX
2
star
8

examples-eclipse-tycho

Example projects using Tycho to build Eclipse plugins with Maven
Java
2
star
9

curso-git

Materiales de varios cursos de Git
TeX
1
star
10

sodmt

Model-driven design of performance requirements
Java
1
star
11

cli-edit-anymemo

Simple Python script for quickly editing AnyMemo databases
Python
1
star
12

simplified-bpmn-example

Simplified BPMN editor example for Eugenia
Java
1
star
13

eugenia-epsilon-example

eugenia-spanish-example
1
star
14

cxf-wsdl-first

Example API + Implementation WSDL-first Web Service based on CXF + Spring
Java
1
star
15

euler

My collection of solutions for some problems in Project Euler
Python
1
star
16

seminario-svn

Spanish slides for a 2-hour intro on SVN
TeX
1
star
17

pentaho-artifactCatalog

Pentaho plugin for organizing the assets in a Pentaho 5.4 installation as a forest of tags.
CSS
1
star
18

phd-posters-session

Spanish materials with recommendations on how to make a scientific poster for a 1h 30min session. Slides licensed under CC-BY-SA.
TeX
1
star