Visitors

myspace visitor tracker

Support WS4GL

Download‎ > ‎

Manual Installation

Here is the full details for a manual installation starting from the source code.

See "Compiling for GNU/Linux" to compile WS4GL...

Ok, now you have a fully compiled WS4GL based on the latest source code, now what to do?

  • Install the module "webcamstudio" (previously named vloopback), you can find the source code in the trunk/src/vloopback
  • To compile the source code, make sure that you have installed all dependencies (in Ubuntu, the package build-essentials does the job...)
  • From the source folder of the module, type
make
sudo make install

  • This will install the module and two new video devices should show up in /dev/ folder
  • These video devices are available to the "video" group by default, so make sure that your user is part of that group
  • To have the webcamstudio module loaded automatically on each boot up, you can have this script running in your services:

#!/bin/sh
#
# WebcamStudio for GNU/Linux driver
# Linux kernel module init script
#
# 2009 Patrick Balleux
#


# chkconfig: 35 30 60
# description: WebcamStudio Linux kernel module
#
### BEGIN INIT INFO
# Provides:       webcamstudio
# Required-Start: $syslog
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:
# Short-Description: WebcamStudio kernel module
### END INIT INFO


KDIR="/lib/modules/`uname -r`/kernel/drivers/misc"
MODNAME=webcamstudio
LOG="/var/log/webcamstudio-install.log"
NOLSB=%NOLSB%


. /lib/lsb/init-functions

failure()
{
  echo ""
  log_failure_msg "$1"
  exit 0
}

running()
{
  lsmod | grep -q "$MODNAME[^_-]"
}

installModule(){
cd /usr/share/webcamstudio/webcamstudio-src
mkdir /tmp/webcamstudio-src
cp * /tmp/webcamstudio-src
cd /tmp/webcamstudio-src
make
make install
depmod -a
cd /
rm -R /tmp/webcamstudio-src
}

start()
{
  log_daemon_msg "Starting WebcamStudio kernel module" "$MODNAME";
  # ensure the module is loaded
  if ! running; then
    if [ ! -f "$KDIR/$MODNAME.o" -a ! -f "$KDIR/$MODNAME.ko" ]; then
      installModule
    fi
    if ! modprobe $MODNAME > /dev/null 2>&1; then
      failure "Modprobe $MODNAME failed. Please use 'dmesg' to find out why."
    fi
    sleep .2
  fi
  # ensure the character special exists
  log_end_msg 0
}

stop()
{
  log_daemon_msg "Stopping WebcamStudio kernel module" "$MODNAME";
  if running; then
    if ! rmmod $MODNAME 2>/dev/null; then
      failure "Cannot unload module $MODNAME."
    fi
  fi
  log_end_msg 0
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload|force-reload)
    stop
    start
    ;;
  status)
    if running; then
      log_success_msg "WebcamStudio kernel module is loaded."
    else
      log_failure_msg "WebcamStudio kernel module is not loaded."
    fi
    ;;
  *)
    log_failure_msg "Usage: $0 {start|stop|restart|status}"
    exit 3
esac

exit 0

  • So now your loopback module should be loading each time you boot up or change your kernel version.  Remember that when you upgrade your kernel version, you need to reinstall the module...
  • Once that is completed, create a folder somewhere in your home folder or in your system.  At the minimum, you need to copy WebcamStudio.jar (from the dist folder in the source code...) and the "lib" folder with all it's content.
  • From that folder, you can launch "java -jar Webcamstudio.jar"
  • Of course, make sure that you have installed OpenJDK or Sun's Java Runtime...
  • WS4GL is using a lot the GStreamer framework, so install all gstreamer-plugins packages to have the maximum compatibility with the videos especially.
  • All you need to do after that is a script to invoked "java -jar WebcamStudio,jar" available of the desktop shortcut...
  • At this point, WS4GL should be running.

Some tips!

  • Make sure that webcamstudio module is compiling.
  • Make sure that you have read/write access to /dev/videoX
  • Make sure to start WS4GL before Firefox to prevent Flash from locking access to the webcamstudio module devices
  • If WS4GL works when running as "root", you have a read/write access
  • If Flash tells you that there is no camera, make sure that you have /dev/video0 and /dev/video1.  If not, the module has not loaded or compiled
  • Avoid compiling custom kernel.  Often, compatibility will break between webcamstudio module and the custom libraries
  • Read the doc on the website and the forum, often, the answer is there

Hope this will help you!