Viewing TV and Webcams


Getting TV cards, Webcams, and other video devices to play in Linux is still a bit of an adventure. Most manufacturers of TV cards and Webcams are not losing sleep to produce Linux drivers. As a result, most of the drivers that bring video to your Linux desktop have been reverse-engineered (that is, they were created by software engineers who watched what the video device sent and received, rather than seeing the actual code that runs the device).

The first, and probably biggest, trick is to get that TV card or Webcam that is supported in Linux. Once you are getting video output from that device (typically available from /dev/video0), you can try out a couple of applications to begin using it. This section describes the Tvtime program for watching television and the GnomeMeeting program for video conferencing.

Watching TV with tvtime

The tvtime program (tvtime command) lets you display video output, in particular television channels, on your desktop. You can change the channels, adjust volume, and fine-tune your picture. In addition, tvtime sports a slick on-screen display and support for a widescreen display.

Tvtime will display, by default, any device producing video on the /dev/video0 device. Therefore, you can use tvtime to view Webcams as well as receive television channels. The following sections describe how to choose a TV capture card and use tvtime to watch television on your desktop.

Note 

Tvtime will not display output from some low-quality Webcams. To use your Webcam, consider obtaining the xawtv package, which is available from most Fedora software repositories. A description of xawtv is available from the Web site that accompanies this book at www.wiley.com/go/fedora3bible.

Getting a supported TV card

Video4Linux is the video interface included with Fedora. It supports a variety of TV capture cards and cameras.

To see a list of supported TV cards that you can use with tvtime, refer to the CARDLIST and Cards files. To view these files, you need to have the kernel-source package installed, as described in Chapter 27. You’ll find the Cards file in the following location on your Linux system:

/usr/src/redhat/BUILD/kern*/linux*/Documentation/video4linux/bttv/Cards 

The Cards file applies to the Video4Linux bttv driver. In addition, look at all files starting with CARDLIST in the following location:

/usr/src/redhat/BUILD/kern*/linux*/Documentation/video4linux/CARDLIST* 

Video4Linux is designed to autodetect your TV capture card and load the proper modules to activate it. So install the TV-card hardware (with the appropriate connection to your TV reception), boot Fedora, and run the tvtime command as described in the next section. You should be able to see video displayed on your tvtime window.

If your card appears not to be working, here are a few things you can try:

  1. To see if your TV card was properly seated in its slot and detected by Linux, type the following:

     $ /sbin/lspci 

    This will show you a list of all valid PCI cards on your computer. If nothing shows up for the card that says something like “Multimedia video controller,” you probably have a hardware problem.

  2. It is possible that the card is there, but the right card type is not being detected. Improper detection is most likely if you have a card for which there are several revisions, with each requiring a different driver. If you think your card is not being properly detected, find your card in the CARDLIST files. Then add the appropriate line to the /etc/modprobe.conf file. For example, to add a Prolink PV-BT878P, revision 9B card, add the following line to /etc/modprobe.conf:

    options bttv card=72 

You can also add other options listed in the Insmod-options file for the bttv driver. If you are still having problems getting your card to work, a mailing list is available on which you can ask questions about Video4Linux issues. The location is:

http://listman.redhat.com/mailman/listinfo/video4linux-list 

One possible reason that you don’t see any video when you try to run tvtime or other video applications is that some other person or video application already has the video driver open. Only one application can use the video driver at a time in Fedora. Another quirk of video4linux is that the first person to open the device on your system becomes the owner. So you might need to open the permissions of the device file (such as /dev/video0) to allow people other than the first person to use it to access the video4linux driver (for example, chmod 666 /dev/video0).

Running tvtime

To start up the tvtime viewer, simply select the TVtime Televison Viewer choice from the Sound & Video menu. Or, type the following from a Terminal window on your desktop:

 $ tvtime & 

A video screen should appear in a window on the desktop. Click the left mouse button on the window to see a list of stations. Click the right mouse button to see the on-screen Setup menu.

Here are a few things you can now do with your tvtime on-screen display:

  • Configure input — This choice allows you to change the video source, choose the television standard (which defaults to NTSC for the USA), and change the resolution of the input.

  • Set up the picture — Adjust the brightness, contrast, color and hue.

  • Adjust the video processing — You can control the attempted frame rate, configure the deinterlacer, or add an input filter.

  • Adjust output — Control the aspect ratio (for 16:9 output, for example), apply a matte, or set the overscan mode.

Video conferencing with GnomeMeeting

The GnomeMeeting window lets you communicate with other people over a network through video, audio, and typed messages. Because GnomeMeeting supports the H323 protocol, you can use it to communicate with people using other popular video-conferencing clients, such as Microsoft NetMeeting, Cu-SeeMe, and Intel VideoPhone.

Note 

GnomeMeeting does not support the NetMeeting shared whiteboard functions, just video conferencing.

To be able to send video, you need a Webcam that is supported in Linux. Although not all Webcams are supported in Linux, you still have a few dozen models to choose from. The following sections show you how to set up your Webcam and use GnomeMeeting for video conferencing.

Getting a supported Webcam

As with support for TV capture cards, Webcam support is provided through the video4linux interface. Some of the supported cameras have a parallel-port interface, although most Webcams currently supported in Linux require a USB port.

To see if your Webcam is supported, check the /usr/src/linux*/Documentation directory. A few parallel-port video cameras are described in the video4linux subdirectory; however, the bulk of the supported cameras are listed in the usb directory.

Tip 

After doing some research myself, I purchased a Logitech QuickCam Pro 3000. The driver for thisWebcam was made for a Philips USB Webcam, but it also works for Webcams from Logitech, Samsung, Creative Labs, and Askey. Before making the purchase, I checked out the description of the driver at www.smcc.demon.nl/webcam. Although the driver is no longer officially supported from that site, you can find an update to that camera's driver (pwc) from www.saillard.org/pwc. Follow the instructions in the INSTALL.en file to install the driver.

Supported USB cameras should be autodetected, so that when you plug them in the necessary modules are loaded automatically. Just start up GNOME Meeting (gnomemeeting command), and if everything is working you should see video from your Webcam on your Linux desktop. Here are a few things I typed to check that my Webcam was working properly:

# lsmod  pwc                     43392     0  videodev                 5120     1  [pwc] 

The output from lsmod shows that the pwc driver was loaded and associated with the videodev module. To see information about the pwc module (which is specific to this Webcam), I typed the following modinfo command:

 # modinfo –p pwc  size:Initial image size. One of sqcif, qsif, qcif, sif, cif, vga  fps:Initial frames per second. Varies with model, useful range 5-30  fbufs:Number of internal frame buffers to reserve  mbufs:Number of external (mmap()ed) image buffers  trace:For debugging purposes  power_save:Turn power save feature in camera on or off  compression:Preferred compression quality. Range 0 (uncompressed) to 3        (high compression)  leds:LED on,off time in milliseconds  dev_hint:Device node hints  

Running GnomeMeeting

To start GnomeMeeting from a Terminal window, type gnomemeeting &. If it is not installed, you can install the gnomemeeting package from the DVD that comes with this book. The first time you run GnomeMeeting, the GnomeMeeting Configuration Assistant starts. The assistant lets you enter the following information:

  • Personal Data — Your first name, last name, e-mail address, comment, and location. You can also select whether or not you want to be listed in the GnomeMeeting ILS directory.

  • Connection Type — Indicate the speed of your Internet connection (56K modem, ISDN, DSL/Cable, T1/LAN or Custom).

Figure 8-7 shows the GnomeMeeting window with the history log to the right and the address book behind.

image from book
Figure 8-7: Connect to ILS servers to video-conference with GnomeMeeting.

In the GnomeMeeting window that opens you can click on the book icon to open a search window (shown to the upper right in Figure 8-7). The search window enables you to connect to an ILS directory. By typing a name into the search filter, you can search for people who might be connected to that server by first name, last name, e-mail address, or location. Select a person from the list that appears and, if he or she accepts your call, you can begin video- conferencing.

Tabs beneath the video window let you adjust your audio levels and video appearance. The History tab shows a log of your activities.




Red Hat Fedora Linux 3 Bible
Red Hat Fedora Linux 3 Bible
ISBN: 0764578723
EAN: 2147483647
Year: 2005
Pages: 286

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net