Viewing TV and Video


You can use Ubuntu tools and applications to view movies and other video presentations on your PC. This section presents some TV and motion picture video software tools included with the Ubuntu distribution you received with this book.

In addition to the information you read here, you should review Chapter 3, "Installing Ubuntu," and Chapter 6, "The X Window System," to learn more about installing and configuring your video graphics card.

TV and Video Hardware

To watch TV and video content on your PC, you must install a supported TV card or have a video/TV combo card installed. A complete list of TV and video cards supported by Ubuntu is at http://www.exploits.org/v4l/. See the Gatos Project at http://gatos. sourceforge.net for information on ATI video combo cards.

Freely available Linux support for TV display from video cards that have a TV-out jack is poor. That support must come from the X11 driver, not from a video device that Video4Linux supports with a device driver. Some of the combo TV-tuner/video display cards have support, including the Matrox Marvel, the Matrox Rainbow Runner G-Series, and the RivaTV cards. Many other combo cards lack support, although an independent developer might have hacked something together to support his own card. Your best course of action is to perform a thorough Internet search using Google.

Many of the TV-only PCI cards are supported. In Linux, however, they are supported by the video chipset they use, and not by the name some manufacturer has slapped on a generic board (the same board is typically sold by different manufacturers under different names). The most common chipset is the Brooktree Bt*** series of chips; they are supported by the bttv device driver.

If you have a supported card in your computer, it should be detected during installation. If you add it later, the Kudzu hardware detection utility should detect it and configure it. You can always configure it by hand.

To determine what chipset your card has, use the lspci command to list the PCI device information, find the TV card listing, and look for the chipset that the card uses. For example, the lspci output for our computer shows

# lspci 00:00.0 Host bridge: Advanced Micro Devices [AMD] AMD-760 [IGD4-1P] System Controller (rev 13) 00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-760 [IGD4-1P] AGP Bridge 00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40) 00:07.1 IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE (rev 06) 00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 1a) 00:07.3 USB Controller: VIA Technologies, Inc. USB (rev 1a) 00:07.4 SMBus: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40) 00:09.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02) 00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 02) 00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 02) 00:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8029(AS) 00:0f.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394 Controller 00:11.0 Network controller: Standard Microsystems Corp [SMC] SMC2602W EZConnect 01:05.0 VGA compatible controller: nVidia Corporation NV15 [GeForce2 Ti] (rev a4) 


Here, the lines listing the multimedia video controller and multimedia controller say that our TV board uses a Brooktree Bt878 Video Capture chip and a Brooktree Bt878 Audio Capture chip. This card uses the Bt878 chipset. Your results will be different, depending on what card and chipset your computer has. This card happened to be an ATI All-in-Wonder VE (also known as ATI TV-Wonder). (The VE means Value Edition; hence, there is no TV-out connector and no radio chip on the card; what a value!) The name of the chipset tells us that the card uses the bttv driver.

In the documentation directory, we find a file named CARDLIST, and in that file is the following entry, among others:

card=64 - ATI TV-Wonder VE


There are 105 cards listed as well as 41 radio cards, including:

card=0 - *** UNKNOWN/GENERIC ***


which is what we would have used had we not known the manufacturer's name for our card.

The file named Modules.conf, located in the same directory, gives us the following example of information to place in our /etc/modules.conf file:

# i2c alias char-major-89    i2c-dev options i2c-core       i2c_debug=1 options i2c-algo-bit   bit_test=1 # bttv alias char-major-81    videodev alias char-major-81-0  bttv options bttv           card=2 radio=1 options tuner          debug=1 


All we need do is enter this information into /etc/modules.conf and change the value for card=2 to card=64 to match our hardware. We can delete the reference to the radio card (radio=2) because we do not have one and leave the other values alone. Then we must execute

# depmod -a


to rebuild the modules dependency list so that all our modules are loaded automatically. When finished, all we need do is execute

# modprobe bttv


and our TV card should be fully functional. All the correct modules will be automatically loaded every time we reboot. Ubuntu is clever enough to detect and configure a supported TV card that is present during installation.

The development of support for TV cards in Linux has coalesced under the Video4Linux project. The Video4Linux software provides support for video capture, radio, and teletext devices in Ubuntu.

Video Formats

Ubuntu recognizes a variety of video formats. The formats created by the MPEG group, Apple, and Microsoft dominate, however. At the heart of video formats are the codecsthe encoders and decoders of the video and audio information. These codecs are typically proprietary, but free codecs do exist. Here is a list of the most common video formats and their associated file extensions:

  • .mpeg The MPEG video format; also known as .mpg

  • .qt The QuickTime video format from Apple

  • .mov Another QuickTime video format

  • .avi The Windows audio visual format

Tip

Win32 codecs (the common name for codecs that are supported under Windows) are not available with Ubuntu from the word go. Instead, you need to do a little hunting around in order to enable them. The easiest way to get a hold of the codecs is to download the EasyUbuntu script and use it to install the codecs (See Chapter 4).


If you need to convert video from one format to another, you use encoder applications called grabbers. These applications take raw video data from a video device such as a camera or TV card, and convert it to one of the standard MPEG formats or to a still image format, such as JPEG or GIF. Ubuntu does not supply any encoder applications (other than ppmtompeg which encodes MPEG-1 video), but you can find them at http://www.freshrpms.net/ or another online source (see the "Reference" section at the end of this chapter).

Viewing Video in Linux

Because of the patent and licensing issues mentioned earlier, the capability to play video files has been removed from Ubuntu. This functionality can be restored if you install the full version of the applications described in this section from the universe and multiverse repositories in synaptic. There, you will find multimedia applications such as Ogle, Xine, AlsaPlayer, Gstreamer, Grip, Mplayer, VCDImager, VideoLAN-client, Xmms, and Zapping.

You can use Linux software to watch TV, save individual images (take snapshots) from a televised broadcast, save a series of snapshots to build animation sequences, or capture video, audio, or both. The following sections describe some of the ways in which you can put Linux multimedia software to work for you.

The noatun viewer is provided with Ubuntu to use as an embedded viewer in the Konqueror browser. noatun is set up as the default association for the video file formats it plays. Open a video file in Konqueror, and the video will be shown in the viewer if it is supported. The viewer provides basic Start, Stop, and Fast-Forward VCR-type functions.

You can watch MPEG and DVD video with Xine. Xine is a versatile and popular media player that is not included with Ubuntu. Xine is used to watch AVI, QuickTime, OGG, and MP3 files.

Macromedia Flash

The Macromedia Flash plug-in for the Mozilla browser is a commercial multimedia application that isn't provided with Ubuntu, but many people find it useful. Macromedia Flash enables you to view Flash content at websites that support it. The Mozilla plug-in can be obtained from the multiverse repository using the package flashplugin-nonfree. This is actually a meta-package that will download and install the real Flashplayer from Macromedia. Once it is installed, all those fancy Flash animations will be enabled in Firefox.


Another interesting video viewer application is MPlayer, a movie player for Linux. MPlayer can use Win32 codecs and it supports a wider range of video formats than Xine, including DivX and some RealMedia files. MPlayer also uses some special display drivers that support Matrox, 3Dfx, and Radeon cards and can make use of some hardware MPEG decoder boards for better MPEG decoding. Look for Ubuntu packages at http://www.MPlayerHQ.hu/homepage/; a Win32 codec package is also available, as well as other codec packages and a GUI interface.

Viewing Television with Linux

You can configure a number of video input sources to feed television images to your computer. You can use any supported TV device as described previously to connect cable TV, an Xbox, Sega Dreamcast, PS/2, or even an external television antenna to your computer and view the images on your video display.

Ubuntu provides the tvtime TV viewing application to enable you to watch Battlestar Galactica without leaving your computer.

Note

The kdetv application (formerly known as QtVision) is steadily growing in terms of both popularity and features and is worth a look. It can be downloaded from http://www.kdetv.org/.


Start tvtime from the command line:

$ tvtime &


Right-clicking on it will toggle the display of the Options menu. Adjust the settings to suit your hardware.

$ scantv


The tvtime configuration file details are contained in the man page for tvtime.

An alternative TV-viewing application available at FreshRPMs.Net is Zapping, a GNOME viewer that supports Vide4Linux, Vide4Linux2, and Xvideo and is extensible in functionality through plug-ins. The home page is http://zapping.sourceforge.net/.

Personal Video Recorders

The best reason to attach a television antenna to your computer, however, is to use the video card and the computer as a personal video recorder.

The commercial personal video recorder, TiVo, uses Linux running on a PowerPC processor to record television programming with a variety of customizations. TiVo has a clever interface and wonderful features, including a record/playback buffer, programmed recording and pause, slow motion, and reverse effects. Ubuntu does not provide any of the many applications that attempt to mimic the TiVo functionality on a desktop PC running Linux. However, several such applications, including DVR, The Linux TV Project, and OpenPVR, are listed at http://www.exploits.org/v4l/. These projects are in development and do not provide .rpm files, so you will need to know how to download from CVS and compile your own binaries. For something a little easier, check out MythTV at http://www.mythtv.org/; it is available through the multiverse repository.

Linux, TiVo, and PVRs

Some TiVo users say that using this Linux-based device has changed their lives. Indeed, the convenience of using a personal video recorder (PVR) can make life a lot easier for inveterate channel surfers. Although PVR applications are not included with Ubuntu, open source developers are working on newer and better versions of easy-to-install and easy-to-use PVR software for Linux. For more information about TiVo, which requires a monthly charge and a phone line (or broadband connection with a newer TiVo2), browse to http://www.tivo.com/. Unrepentant Linux hardware hackers aiming to disembowel or upgrade a TiVo can browse to http://www.9thtee.com/tivoupgrades.htm or read the TiVo Hack FAQ at http://www.tivofaq.com/hack/faq.html. A PVR makes viewing television a lot more fun!

A number of Linux sites are devoted to PVR software development. Browse to the DVR project page at http://dvr.sourceforge.net/.


DVD and Video Players

You can now easily play DVDs using Ubuntu as long as you install the appropriate software. (Ubuntu doesn't provide any.) Browse to http://www.videolan.org/, and then download, build, and install the vlc client.

You will need a CPU of at least 450MHz and a working sound card to use a DVD player. The default Ubuntu kernel supports the DVD CD-ROM file system. As mentioned earlier, Xine and MPlayer do a great job of playing DVD files.

Note

The VideoLAN HOWTO found at http://videolan.org/ discusses the construction of a network for streaming video. Although you might not want to do that, a great deal of useful information about the software and hardware involved in the enterprise can be generalized for use elsewhere, so it is worth a look. The site also contains a link to a HOWTO about cross-compiling on Linux to produce a Windows binary.


Enabling Java

Some multimedia content relies on Sun's Java and Java web browser plug-ins.

Getting the Java plug-in to work correctly with the Mozilla browser used to be something of a nightmare, but Ubuntu makes it very easy. All you have to do is enable the multiverse repository in synaptic and search for the sun-j2re1.5 package. Once installed, this will enable Java on a system-wide basis, saving what used to be a lot of work!


Relevant Ubuntu Linux Commands

You will use these commands when working with multimedia applications for Ubuntu:

CD/DVD Disks

cdda2wav Copies WAV files from CDs; used by other applications

cdlabelgen Creates labels for CD jewel cases; used in scripts

cdp A text-mode CD player

cdparanoia A CD ripper

cdrecord A command-line tool to record CDs

dvd+rw-tools A command-line tool to create DVDs

grip A CD music ripper

mkisofs Creates ISO files

xcdroast A CD recorder

Sound and Music

alsamixer A console audio mixer

kmid A MIDI player

mikmod A MOD music player

rhythmbox The default music player; it can play from playlists or Internet radio stations

sox A sound conversion tool

sound-juicer A CD ripping tool

system-config-soundcard Default sound card configuration utility

vorbis-tools The OGG Vorbis codecs

xmms An MP3 player

Video

kaboodle A KDE media player

noatun KDE media player

tvtime A television viewer

xine A video player

xmms An MPEG1/2/3 player




Ubuntu Unleashed
Ubuntu Unleashed 2011 Edition: Covering 10.10 and 11.04 (6th Edition)
ISBN: 0672333449
EAN: 2147483647
Year: 2006
Pages: 318

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