Cooking with Linux - Watching the Community Network
The program creates an initial directory for its configuration as well as for skins. That's right, the program is skinnable. Not only can you download skins, but GQradio comes with a built-in skin editor so you can unleash your creative spirit. Right-click on the GQradio GUI for a drop-down menu that lets you modify the program at will.
Next, we turn our attention to the world of video broadcasts and my own early community network brush with television reporting. François, perhaps you had better pour me a glass as well. After all your laughter, it occurs to me that I may need a little courage.
For the impatient among you, most Linux distributions come with a television viewing application called xawtv by Gerd Knorr (of ncurses radio fame). If you simply start up the xawtv program, you'll likely find that you get nothing but a blank screen, particularly if you are in North America. The program defaults to the PAL format among other things. To lock xawtv into some saner settings for your particular location, you need to edit the $HOME/.xawtv configuration file. Here's what mine looks like:
[global] freqtab = us-bcast [defaults] input = Television norm = NTSC [vcr] channel = 3 key = 3
The file is broken up into sections, denoted by a title inside square brackets (for all the possible settings, do a man xawtvrc). The global and defaults section are the most important ones, because they allow us to set our local transmission standards as well as the input device. The [vcr] section is one I added. Quite simply, it represents channel 3, the output from my VCR.
Many programs are available for watching TV. MPlayer (www.MPlayerHQ.hu) is a popular, do-it-all kind of player. Once again, check your distribution—you may already have a copy. Using codecs, it can play all those AVI or MPG files you have floating around. You may know this already, but MPlayer also can handle a TV tuner card. Here's how:
mplayer -tv \ on:driver=v4l:channel=3:input=0:norm=NTSC\ :width=640:height=480
The backslashes in the above command are there because I couldn't fit the entire command on one line. You can type it as one, unbroken line, if you prefer. To use the MPlayer GUI, use gmplayer instead. The driver parameter selects the video4linux driver (v4l). The channel setting is obvious, and the norm setting lets me choose the NTSC broadcast standard for North America. The final settings are for height and width.
These programs are great ways to watch TV on your Linux system, but if you are like me, you've looked with some amount of envy at the entertainment systems your friends with digital cable have a nasty habit of showing off. With their TiVos and their PVR (personal video recorder) units, they have access to on-screen displays of upcoming shows, which they can schedule and watch whenever the mood takes them. Well, envy no more, mes amis. To have an entire video entertainment system under the control of your Linux system, look no further than MythTV, a full-featured personal video recorder and television master control.
Imagine if you will, a digital video recorder that lets you view live TV, with instant replay so you can pause, rewind and fast-forward through the action. MythTV lets you program shows on a timer and view on-line television listings on which you can do string searches—looking for a particular episode of a Buffy rerun? Combine this with support for multiple TV tuner cards, multiple simultaneous recordings and a distributed system so you can set up different MythTV boxes on your network. Wrap it all up in a slick, themeable package and you are starting to get an idea of what I am talking about.
Does this sound like something you can't wait to get your hands on? Then, head on over to www.mythtv.org and pick up the packages. RPM packages are available for different distributions, as are Debian packages and Gentoo ebuild and digest files. Check out the “Software” section of www.mythtv.org/docs/mythtv-HOWTO-3.html for links to prebuilt packages. This fine package is also available in a source archive bundle.
MythTV is a very cool package, but making it run requires some work and that you install a few prerequisites. Most of these are development libraries comprising of freetype2-devel, XFree86-devel, qt-devel, lame and libexpat. MythTV recommends that you get the latest libexpat from sourceforge.net/projects/expat. Finally, to use MythTV's XMLTV channel information grabber and scheduling tool, you definitely need Perl and a handful of modules. It also is possible to use an infrared remote with MythTV (using lirc), but that is one nuance I did not sample.
You may find, as I did, that you need a few additional modules to get XMLTV actually working. These modules are XML::Twig, Date::Manip, LWP and XML::Writer. The easiest way to install them is with the perl -MCPAN -e shell command. Start the CPAN shell as root, and you'll see a cpan> prompt. If this is the first time you use CPAN, you'll encounter a question-and-answer session to help the software identify your local CPAN mirrors. Then, enter the following at the cpan> prompt:
cpan> install XML::Twig cpan> install Date::Manip cpan> install LWP cpan> install XML::Writer cpan> exit
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- New Products
- Integrating Trac, Jenkins and Cobbler—Customizing Linux Operating Systems for Organizational Needs
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds
- Non-Linux FOSS: Remember Burning ISOs?
- Returning Values from Bash Functions
- EdgeRouter Lite
- Cooking with Linux - Serious Cool, Sysadmin Style!