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 a 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 Ekiga 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 the ATrpms.net Fedora software repository. A description of xawtv is available from the Web site that accompanies this book at www. wiley .com/go/fedora6bible .

Getting a Supported TV Card

Video4Linux is the video interface included with Fedora and RHEL. 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-doc package installed. You'll find the CARDLIST.tuner file in the following location on your Linux system:

 /usr/share/doc/kernel-doc*/Documentation/video4linux/ 

The CARDLIST.bttv file applies to the Video4Linux bttv driver, which lists many TV capture cards by card number, name , and sometimes by chip set. Also, the CARDLIST.tuner lists tuner types that might be associated with different TV cards.

Video4Linux is designed to auto-detect your TV capture card and load the proper modules to activate it. So, physically install the TVcard hardware (with the appropriate connection to your TV reception ), boot Fedora or RHEL, 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:

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

     $  /sbin/lspci  less  

    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. My Hauppauge WinTV Go card appears as:

     Multimedia video controller: Brooktree Corporation Bt878 Video Capture 
  • 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 or RHEL. 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 ).

Starting tvtime

To start up the tvtime viewer, simply select the TVtime Television 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 the current channel number, current time, and current video source (Television, Composite1, and so on). Click the right mouse button to see the on-screen Setup menu.

If your card seems to have been detected and the needed modules were properly loaded, but you don't see any video, try using the keyboard arrow keys to step forward until you find a valid channel. If that doesn't work, try going through the following adjustments (most important, the video source and television standard), to get tvtime working properly:

  • 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. To change the video source to Composite1, S-Video, Television, or other input source, right-click the TVtime window, select Input configuration Change video Source. To change Television standard, select Television standard and choose NTSC (U.S.), PAL (Europe), or other available settings.

  • Set up the picture - Adjust the brightness, contrast, color , and hue. Right-click the TVtime window, select Picture settings, and then choose Brightness, Contrast, Saturation, or Hue to adjust those attributes.

  • Adjust the video processing - You can control the attempted frame rate, configure the deinterlacer, or add an input filter. Right-click the TVtime window, select Video processing, and then choose Attempted framerate (to slow the frame rate) or a Deinterlacer option (to change other processing features). You can also try Input filters to do some fun things like invert color, flip the video as though in a mirror image, or put the video in black and white (using Chroma killer).

If you view television often from your computer, consider adding an icon to your panel (right-click the panel and select Add to Panel Application Launcher Sound & Video TVtime). With TVtime running, you can put it on top by right-clicking the title bar and selecting On Top.

Selecting Channels in tvtime

With video input working and the picture adjusted to your liking, you should set up your channels. Right-click the TVtime window, select Channel management Scan channels for signal. Tvtime will scan for all available channels and note which ones have active signals. Once channels have been scanned, you can use your mouse wheel to change among the active channels. If tvtime missed an active channel, use your keyboard arrow keys to go to the missed channel and select Channel management Current channel active in list.

Tip 

The xmltv project provides a means of identifying and downloading TV listings for your area. TVtime includes support for xmltv listing files, allowing you to display current television shows and station names while you go through tvtime channels. It can be tricky getting xmltv going. If you are interested, I suggest you start at the XMLTV project site ( http://membled.com/work/apps/xmltv ).

Video Conferencing and VOIP with Ekiga

The Ekiga application (formerly called GnomeMeeting) lets you communicate with other people over a network through video, audio, and typed messages. Because Ekiga supports the H323 protocol, you can use it to communicate with people using other video-conferencing clients , such as Microsoft NetMeeting, Cu-SeeMe, and Intel VideoPhone. Besides video conferencing, Ekiga also supports VOIP and IP telephony, to make telephone calls over the Internet.

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 Ekiga 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.

Finding a Webcam to work in Linux is a bit of an adventure. Few (if any) Webcams come with Linux drivers or specs to allow open source developers to create those drivers. Webcam drivers that have been created often have limited features and sometimes break with new kernel releases. Also, Webcam vendors sometimes switch the chip sets they are using without changing the Webcam's name. And there are times when the same Webcam is marketed under different names.

So, instead of just telling you what Webcam to buy, I'll tell you what Webcams are supported by drivers that come with Fedora and RHEL. I suggest you use this information as a starting point. Combining that information with some sites where you can do further research should help you make the best choice before purchasing a Webcam.

  • IBM C-it USB Webcams ( ibmcam driver) - Webcams that work with this driver have been sold under the names Xirlink C-It, IBM PC Camera, Veo Stingray, and Envision 123 Digital Camera. Before purchasing one of these Webcams, refer to the Web site for this driver ( www.linux-usb.org/ibmcam ) for further information on supported cameras, tips for getting different models to work properly, and insights on how these cameras work.

  • Konica Webcams ( konicawc driver) - This driver should work with the Intel YC76 or any USB Webcams that have the following vendor or product codes: 0x04c8 or 0x0720. This includes the Intel Create and Share Camera Pack. Information about the driver is available from www.si.org/konica .

  • OmniVision Webcams ( ov511 driver) - Webcams supported by this driver include USB Webcams based on OmniVision camera chips ( www.ovt.com ). Webcams include Creative WebCam 3, MediaForte MV300, AVERmedia Webcam, and D-Link DSB-C300.

  • Philips USB Webcams ( pwc driver) - This driver supports a varietyof Philips USB Webcams, including PCA645, PCA646, PCVC675, PCVC680, PCVC690, PCVC730, PCVC740, and Askey VC010. These include a several inexpensive Logitech Webcams, including the QuickCam Pro 3000.

  • EndPoints Webcams ( se401 driver) - Supports Webcams that contain the EndPoints SE401 chip sets. These include the Kensington VideoCam PC cameras (67014, 67015, 67016, and 67017) and the Aox se401 camera (se401).

  • SONiX PC Cameras ( sn9c102 driver) - USB cameras based on the SONiX PC camera controllers are supported by this driver. These include the Sweex 100K, X-Eye, and Chicony Twinklecam Webcam. The sn9c10x driver is maintained by Linux Projects ( www.linux-projects.org ).

  • STMicroelectronics Webcams ( stv680 driver) - Webcams containing the USB version of STV0680B chips from STMicroelectronics ( www.st.com ) are supported by this driver. Cameras include the Aiptec Pencam and Nisis Quickpix 2 (Vendor/product ID 0553/0202). For information on the driver, refer to the Linux STV0680 USP Support page ( http://stv0680-usb. sourceforge .net ).

  • Ultracam Webcams ( ultracam driver) - Supports Webcams such as the IBM UltraPort Camera II. See the ultracam driver page ( www.gutwin.org/cam/source ) for information about the driver.

  • Vicam Webcams ( vicam driver) - The 3Com HomeConnect USB Webcam is supported by this driver. Refer to the driver's project page for further information ( http://homeconnectusb.sourceforge.net ).

  • Winbond Webcams ( w9968cf driver) - Supports the W9668cf JPEG USB dual mode camera chip from Winbond Electronics. Webcams that use that chip include the ADG-5000 Aroma Digi Pen, Ezonics EZ-802 EZMega Cam, and the Pretec DigiPen-480. Refer to the Linux Projects site ( www.linux-projects.org ) for further information.

Check out the following Web sites for a more complete list of Webcams that are and are not supported in Linux. Keep in mind, however, that not all of the drivers for these Webcams will work in the latest kernels in Fedora or RHEL.

  • Kamerstd i Linux ( www.cs.umu.se/~c00ahs/exjobb/linuxcams.html )

  • Linux USB Device Drivers ( www.linux-usb.org/devices.html )

The Logitech QuickCam Pro 300 Webcam that I used for examples in this chapter works well with the pwc driver that comes with Fedora Core 6.To check that it was working, I ran the lsmod command to see that the pwc driver was loaded and associated with the videodev module:

 #  lsmod  pwc 43392 0 compat_ioctl32 5569 1 pwc videodev 5120 1 pwc 

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 Ekiga

To start Ekiga, select Applications Internet IP Telephone, VOIP and Video Conferencing. To start Ekiga from a Terminal window, type ekiga &. If it is not installed, you can install the ekiga package from the DVD that comes with this book. The first time you run Ekiga, the Ekiga 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 Ekiga ILS directory.

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

  • Audio Manager - Typically you would choose ALSA as your audio manager.

  • Video Manager and Devices - Typically you would choose Video4Linux as the video manager and your Webcam as the input device.

Note 

If you want to reconfigure Ekiga later, run the following command to clean out the old settings: ekiga-config-tool --clean . Make sure all instances of Ekiga are stopped before running that configuration tool. Run ekiga again to re-enter your settings.

Figure 8-11 shows the Ekiga window with the history log to the right.

image from book
Figure 8-11: Connect to ILS servers to video-conference with Ekiga.

In the Ekiga window that opens, you can click the rolodex icon to open an address book. From the address book, select Ekiga White Pages. By typing a name into the search filter, you can search for people who might be connected to Ekiga 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.

By selecting View Control Panel, you can select to have tabs appear beneath the video window to adjust your audio levels and video appearance. The History tab shows a log of your activities.




Fedora 6 and Red Hat Enterprise Linux Bible
Fedora 6 and Red Hat Enterprise Linux Bible
ISBN: 047008278X
EAN: 2147483647
Year: 2007
Pages: 279

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