Videoconferencing for Linux

Though videoconferencing/videophone is harder to set up on Linux than it is on Mac or Windows, it's still a useful tool, and an alternative to Vonage and Skype. In general, videoconferencing works best (or at all) when using the same client, including versions running across platforms.

For this recipe, I recommend using a telephone-style headset to work through this piece with. But even then, feedback between a microphone and speakers will be difficult to avoid. You can use headphones if you're using a digi/webcam microphone, but your sound quality will most likely be better with a microphone in a headset assembly.

Though I used the Debian Linux distribution, Ubuntu users should be able to use the same instructions. If you aren't using a Debian-based distribution, you should use the instructions for automated installation (for example, yum install filename for Fedora/RHEL) or the installer GUI that works with your distribution. The program filename should be the same.

Video4Linux (v4l, v4l2 - gspca)

id
unit-1659132512259
type
Sponsored post

This is the basic building block underlying most Linux video applications.

The first step is selecting a webcam with a Linux driver.

Compatible USB (only) Videocams

You can find a list of cameras with compatible drivers here.

This is a good place to use your Web browser's page search feature—usually, control + F—to look up model names or USB ID codes. My camera is an inexpensive Aiptek DV4100M digicam with "live video" and flash disk storage for digital images and video.

If you have a camera you want to use, but it doesn't seem to appear on the list, plug it in and get a list of all plugged-in USB devices. Assuming it isn't a pure webcam, make sure your camera is set to "live" or "video" mode once your USB cord is plugged into the computer. If you don't have a camera already, use the list to guide you in finding a camera that will work for Linux video without problems.

Note that a

monospace

font means that this is text that should be entered or displayed via Linux terminal application. $ means do this from a user prompt, # means a root (admin) command given from a root login, a user with the root password accesses a root login by:

$ su root Password:

To discover the USB identification information from your camera:

username@workstation:~$ lsusb Bus 002 Device 007: ID 08ca:2040 Aiptek International, Inc. Bus 002 Device 005: ID 050d:0551 Belkin Components Bus 002 Device 006: ID 04a9:220e Canon, Inc. CanoScan N1240U/LiDE 30 Bus 002 Device 004: ID 04a9:1094 Canon, Inc. PIXMA iP3000x Printer

The first hex 4-digit number after the ID is the product ID. The second is the vendor. I'd search on product ID. If both numbers match something in the driver list, then you are in business with Linux video. If not, I recommend finding a supported camera. Either a digicam or webcam that's listed should work fine.

INSTALLING VIDEO4LINUX "Use the Source, Luke!" here $ tar xzvf gspca* $ cd gspca* $ su root # make && make install && depmod "ae $ ls /dev/vid*

You should see a video0 file in that directory. If you do, you've got video.

INSTALLING A VIEWER / WEBCAM APP

The Camorama or Camstream viewer/webcam applications are adequate to verify camera operations. Either will automatically upload via FTP to a webpage. You may already have either or both programs preinstalled by default. If not, then:

# aptitude install camorama

or

# aptitude install camstream

Non-Debian/Ubuntu users should use the equivalent automated installer commands for their distribution. If neither is available, you can download source from these two pages, camorama or camstream. Download to a convenient directory. For build-from-source applications, the following is the generalized method for building the great majority of applications provided as source code: ...for files ending in tar.gz or tgz:

$ tar xvzf programname.tar.gz $ cd [top of new directory tree created by unpacking tarball]

...for files ending in bz2:

$ tar xvjf programname.tar.bz2 $ cd [top of new directory tree created by unpacking tarball]

Follow the instructions in the README files after unpacking the tarballs and opening the directories into which the tarballs were unarchived, open as:

$ nano README

Further information should be available on the developer sites, including a pointer to the web forums or mailing lists to ask for help in if need be.

Configuring these things once installed to point them at ftp sites/directories, and frame size, frame rate, and in some cases, choice between V4L and V4L2 is point and click on the GUI. The following figures feature screenshots of the Camorama Webcam Viewer and Controls and the Online Camorama ftp setup respectively:

Displaying a continuously updating webcam image is a server-side operation and therefore beyond the scope of this article. Some website hosts have a built-in setup for this. Otherwise, you'll need to set it up on your Apache or whatever Web server.

HOW TO INSTALL VIDEOCONFERENCING

Every videoconferencing application has its advantages and disadvantages. The only ones I discuss here are cross-platform. Video modes work best (or at all) when the different computers in the connection are all running the same videoconferencing application.

PHONE FORMATS: SIP VS. H.323

The two most common protocols found in the VoIP world are sip and H.323. Basically, H.323 is a telco-oriented protocol maintained by the ITU, and sip is an Internet-oriented protocol maintained by IETF. Most Internet VoIP implements sip. H.323 seems to me to be a standard with declining support in the Internet community. While support of both is preferable, if one has to choose one or the other as an end user, I'd go with sip.

You can find a much more technologically oriented and detailed comparisons here and here.

Linux for Skype: This is a proprietary format with no video support, unlike the Mac/Win products. While it appears to work, it is still not recommended. There's no longer any reason to recommend a product for Linux that doesn't have a feature set as good as that of Win/OSX versions.

Ekiga (formerly gnomemeeting): Ekiga installation and setup works, is relatively easy, fairly well supported, and can easily be connected to the PSTN (Public Switched Telephone Network). That is, you can videoconference computer-to-computer and make phone calls with it, too. It supports both sip and h.323. The instructions provided here will be for sip setup; if you need H.323, you can get setup information from the documentation. It may already be installed. If not, you can probably install it through your distribution's automated installer.

Supported Distros: Fedora Core/RHEL, OpenSUSE, Debian, Ubuntu, Windows, source.

Install Ekiga:

First, see if it's already installed with your distro by checking the menus.

In KDE, find it in Start > Internet > Ekiga

Debian / Ubuntu:

# aptitude install ekiga

To install with other distros, use the automatic installer for your distro to try installing it You might as well wait to run the configuration utility until after you've set up the firewall and done any router setup necessary. If not, go to the Ekiga download page and if possible, download and manually install the ekiga binary for your distro via distro installation tool. For example, if rpm,

# rpm -i ekiga*

. If there isn't one, build from source. First, download all the source tarballs on the page. Then follow the build-from-source instructions in the Camorama / Camstream section above for each tarball.

Other Libraries Required: here # aptitude search libpt i A libpt-plugins-alsa - Portable Windows Library Audio Plugin for the ALSA Interface i libpt-plugins-oss - Portable Windows Library Audio Plugins for the OSS interface i libpt-plugins-v4l - Portable Windows Library Video Plugin for Video4Linux i libpt-plugins-v4l2 - Portable Windows Library Video Plugin for Video4Linux2 i A libpth20 - The GNU Portable Threads

In the display, i = installed, A=automatically installed (usually to satisfy a dependency.) Bold face indicates the ones I actually installed.

Use the equivalent search feature in your distro's automatic installer. Or download and install the plug-ins manually that you need from the above URL. Your distribution will probably install it automatically. (The ones in bold were the ones I had to install.)

If you need more information, the Ekiga FAQ entry is here. FIREWALL SETUP

Modern distributions usually use ipchains. You can update the various files that configure ipchains by simply running the script from here in section 6.2 entitled "What iptables rules could I use for GNU/Linux?" Cut and paste the script into the text editor of your choice. Save it as ekiga-iptables-setup.sh anywhere convenient.

Note: Do not run it until you've changed ppp0 in the line

EXTERNAL_DEVICE="ppp0"

...to whatever actually matches your system. Of course, if you're running dialup, ppp0 is probably right. But dial-up users are a shrinking minority. The script should now be running eth0 by default, and it should have a comment line showing what's most likely to be changed. In most cases, you'll want to change that line to eth0 as follows:

EXTERNAL_DEVICE="eth0"

Run it by:

# sh ekiga-iptables-setup.sh

If you don't know what your EXTERNAL_DEVICE is, run:

# ifconfig

Ignore lo, and if you're running VMware Server, all vmnet* entries, it's the connection to the Net you're looking for.

ROUTER SETUP


ports: 3478-3479 (labeled stun-voip1 above) ports 5000-5100 (labeled stun-voip1 above)


Ports triggered: 3478-3479 Ports Forwarded: 3478-3479 Ports triggered: 3478-3479 Ports Forwarded: 5000-5100

Hit "Apply," "Enable," or whatever is appropriate for your router. Then repeat the Ekiga Configuration Druid. You should see the image above labeled "correct configuration." Go on to the next step, and select ALSA as the first choice. Here's a shot of the audio driver screen:

The audio device can be any microphone device you can plug into your PC, including microphones plugged into the audio input. In the picture above, I'm using the microphone built into my digicam and getting it via the same USB connection that provides video. If you can't hear anything, check the volume controls. Make sure the appropriate I/Os are switched on and that the input / output volumes are at a reasonable level. If that fails, go back a step and try changing ALSA to OSS.

Next, you'll be asked to select the Video Manager. Pick the one (either V4L or V4L2) that matches your camera type. Try V4L if you don't know. On the next step, select your camera device. Simply pull down the menu below "Please choose your video input device" and select the entry that matches your camera. After that, you should see this configuration-complete screen:

Now you are ready to test Ekiga. If you need to change the device data later, you can do this from Main Menu > Tools > Preferences. The videophone test screen looks like this:

Making a test call:

sip:[email protected]

This is the ekiga.net echo test number. I recommend using "side by side" video (View > Side-by-Side) to let you see what your video looks like from the other end. You can also dial [email protected] if you know the username. To let you see what you're sending out, you can put the image into side-by-side mode by going to the main menu and pulling down Tools > Side-by-Side. The image to the left is the remote image, the right is local. TO CALL OFF THE NETWORK VOIP-VOIP

I'll use examples from the Ekiga Fun Numbers page. Video won't work unless you're talking to another Ekiga client.

*010-600 Echo test from Voxalot (USA) Enter it as *010600 (equivalent of sip:*[email protected] ) via URL bar or telephone keyboard. Do not enter spaces or dashes. DO enter the asterisk. Simply enter the numbers either by dial pad or keying into the phone number slot as a continuous string as you would on a physical telephone dial pad, with no spaces.

Also, you don't have to enter the provider part of the sip URL, as long as you're using ekiga.net.

There's a server that'll get you into toll-free numbers in the "Fun Numbers" listing: A listing of VoIP provider prefixes..

If you want to use the PSTN, you'll have to buy an account. Click on the Ekiga Tools > PC to Phone menu item. Then click "Get an Ekiga PC-To-Phone Account." That will open your browser to a Web page for a telephone VOIP service. Start an account, and charge it with money; the minimum charge to credit / debit card, e-gold, etc., is $10. Go back to the menu item and fill in the account number and password. Then click the Use PC-To-Phone checkbox, and hit Apply.

The U.S rate is 0.017 cents per minute (that's right, 17 one-thousandths of a cent). Foreign rates are fairly typical for a U.S.-based VOIP-based provider. For rate information, visit here.

For incoming calls, being listed in the white pages directory is optional. Do that from the ekiga.net account you made when setting up Ekiga via the Ekiga Configuration Druid. The Documentation / FAQ can be found here.

COMMON PROBLEMS

If you unplug your digicam and your CPU usage suddenly goes to 100 percent, open a console and do:

# ps -A

...and look for the Ekiga process ID in the list. Then do:

11532 ? 00:00:04 ekiga # kill -9 11532

RECONFIGURING WEB/VIDEOCONFERENCE CAMERA AS DIGICAM

Qnext: here http://java.com/en/download/help/testvm.xml # aptitude install j2re here user not $ cd [path-to-wherever you downloaded qnext] $ tar xvjf qnext* $ cd qnext* $ ./qnext

To make an icon: right-click the desktop and on the pull-down, go to: Create new Link to Application

In the General tab, Click left button in the Select Icon window. Click browse Enter [path-to]/qnext/errors Select the .png image In the text box next to button, enter qnext In Description tab: Description: qnext video IM Command: Hit the browse button. Use the directory window to get to the qnext directory. Select qnext. Hit the Open button. Work Path: [path-to]/qnext

Push the OK button, your Qnext icon is on the desktop as thus:

In IM mode: start the program. After you've finished registering, close the program. Then reopen it; the Quick Start Guide will come up. Follow the instructions to start adding buddy lists. Click the icon on the bottom left (everything's got tool tips, just hover your mouse cursor for labels) corresponding to the network you want to use.

Go to Main Menu > Tools > Options. Then click the Devices tab and push the Detect button to pick up your camera.

For audio conferencing, go here for the procedure.

For videoconferencing, go here for the procedure

Alternative Products

Wengophone supports Linux / OSX / Windows, PC-to-PC or PSTN.

WHERE TO GET HELP

A. Lizard, is an Internet consultant in the San Francisco Bay area. He has been writing for technology magazines and Web sites since 1987.